Rik_StHelens
Registered User.
- Local time
- Today, 20:47
- Joined
- Sep 15, 2009
- Messages
- 164
I have the following sql code which i have written to search our current and archived records by vehicle registration number. I get an error in the FROM clause, but as i don't really know sql (i poached the code from forums) im not sure why
Where have i gone wrong?
Thanks for your help
Code:
SELECT CUSTOMER, INVNUM, [CAN Number], DELIVERY, INVDATE, [Status Lookup], Destination, REGNUM, POSITION, TREADM, SERIALON, SERIALOFF, SECTION, PROFILE, RIM, SIZE, [New or Rems], STCODE, Brand, [Removal Description], DESCRIPN, [Post Code], OLDADVNUM, [Retreader Agent], SUMCODE, NAME1,VAN
FROM ALLCasingJobs
Union All
SELECT CUSTOMER, INVNUM, [CAN Number], DELIVERY, INVDATE, [Status Lookup], Destination, REGNUM, POSITION, TREADM, SERIALON, SERIALOFF, SECTION, PROFILE, RIM, SIZE, [New or Rems], STCODE, Brand, [Removal Description], DESCRIPN, [Post Code], OLDADVNUM, [Retreader Agent], SUMCODE, NAME1,VAN
FROM Historical Casing Jobs
Union All
WHERE ((([AllCasingJobs].[REGNUM]) or ([Historical Casing Jobs].[REGNUM]) Like [Vehicle Reg]));
Where have i gone wrong?
Thanks for your help