Gunner,
 
Cleaned this up a bit
 
Here is my problem.
 
I am trying to project a view based on to variables.
 
vinvoice1 and vinovice2
 
I need to select all rows as follows where cdinv includes these record and all 
those in between from master and the other tables designated.
 
IE:
 
If vinvoice1 = 1 (column cdiinv in master =1)
 
if vinovice2 = 20 (column cdiinv in master = 20)
 
Just can't figure out how to design the were clause.
 
Any help is appreciated.
 
Stephen Breen
CDI Services, Inc.
Road Support Division
 
DROP VIEW atvinv_master_cust
CREATE TEMP VIEW atvinv_master_cust AS SELECT +
address1 +
address2 +
billadd1 +
billattn +
billcity +
billdate +
billname +
billst +
billtitl +
billzip +
breakdat +
cause +
cdiinv +
country +
custappv +
custattn +
custcity +
custname +
custnub2 +
custphon +
custpo +
custstat +
custtilt +
custzip +
datasource+
disparts +
doornam +
drivname +
drivtime +
drn +
estlabor +
estpart +
estsc +
esttire +
faxn +
finalnm +
hours +
hub +
hub2 +
macola +
mileest +
miles +
nabpo +
parentcustid +
pofax +
pon +
problem +
reefer +
remedy +
shopest +
timein +
timetot +
tractor_plate +
tractor_state +
tractorn +
tractyr +
tracvin +
trailer_plate +
trailer_state +
trailern +
trctmake +
trlmake +
trlvin +
trlyear +
vehcity +
vehstate +
vehstrt +
FROM master t1, customer t2 WHERE t1.custnub2 = t2.custnub2

DROP attinv_master_cust

PROJECT TEMP attinv_master_cust FROM atvinv_master_cust USING * +
WHERE cdiinv = .vinvoice1 and cdiinv = vinvioce2

CREATE INDEX #none ON `attinv_master_cust` (`pon` ASC)
CREATE INDEX #none ON `attinv_master_cust` (`billdate` ASC)

RETURN

Reply via email to