Thanks,
 
Will give this a try.
 
Steve

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] Behalf Of Gunnar Ekblad 
Sent: Tuesday, March 18, 2008 8:25 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Help with Where clause



Steve  consider the difference between the  following 2 statements. 

 

 

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

 

 

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

 

 

 

Gunnar Ekblad

 

-----Ursprungligt meddelande-----
Från: [email protected] [mailto:[EMAIL PROTECTED] För Steve Breen
Skickat: den 18 mars 2008 12:34
Till: RBASE-L Mailing List
Ämne: [RBASE-L] - RE: Help with Where clause

 

Gunner,

 

Ops the table is not master but the view attinv_master_cust 

 

Sorry

 

Steve

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] Behalf Of Steve Breen
Sent: Tuesday, March 18, 2008 7:28 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Help with Where clause

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