Subquery?
I have 3 tables.
customer general
customer detail
location
I have used a join to list all the required customer general data based on a sub query against the customer detail records that have been update.
select substr(b.customername,1,10) name
from (
select a.customercode, a.custcreationdate, a.custlocation
from customer.detail a)
join customer.general b
a.custlocation is a two digit code that I want to lookup on another table to get the location name.
How do I do this?
I have the O'reilly oracle sqlplus book, but I'm not getting a good feel for using substrings and how to cut down the fields and the column they feed back. For example, in my informix query, I could ask for customername[1,10] and get back the first 10 positions of the name and the column in the report would also scale down. My report is cutting down the field value to 10 positions, but its still lusing the 40 position field for the header which is causing my report to wrap. How do I avoid that?
Any good reference books or websites?
thanks,



