Thanks, this worked perfectly (needed + syntax due to other such joins in the not-simplified query)
select orders.name, orders.country,
orders.postcode, nvl(charges.charge,30)
from orders, charges
where orders.country = charges.country (+)
and postcode >= lowpc (+)
and...
Oh, this worked:
select orders.name, orders.country,
orders.postcode, charges.charge
from orders
left outer join charges
on orders.country = charges.country
and postcode between lowpc and highpc
Will figure out later why...
How about the default value? This gives...
Thanks, I have been playing around with outer joins but without luck.
For example,
select orders.name, orders.country,
orders.postcode, charges.charge
from orders, charges
where orders.country = charges.country(+)
and postcode between lowpc and highpc(+)
This did no...
Apologies for this probable newbie question!
Given
table orders
id name country postcode
---------------------------
1 A NL 1330
2 A NL 7320
3 B NL 002100
4 C CZ 13005
5 D GB AB3
table charges
country lowpc highpc charge...
hoinz: Its YYYYMMDD so should be ok with min.
Dagon: Thanks, interesting! Ill try it out now.
It is actually a more complicated query, it should also get the highest date where code is X,Y,Z and a few more things. But this gives me something to start with!
Thanks, unfortunately I simplified the example too much. Need more data from PACKAGE table. So the result should be something like
RESULTSET
id desc date
----------------------
1 aaaaaa 20070103 (code A)
2 bbbbbb 20070106 (code C)
3 cccccc 20070108 (code A and B)...
Hi,
I was hoping someone here is able to help me out, more of a general SQL query maybe but it is on a 10g database!
Some what simplified I have two tables:
PACKAGES
id name desc
----------------------
1 namea aaaaaa
2 nameb bbbbbb
3 namec cccccc
4 named...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.