Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiple join query

Status
Not open for further replies.

sdh

Programmer
Apr 30, 2001
121
GB
SELECT PCHIST.Field1 as Sear,PCHIST.field4 as Sboar,PChist.field3 as Type,PChist.field2 as date,PigIDs.field1 as unit INTO PCSERVE FROM (PCHIST inner join tblcodes on pchist.field3=tblcodes.PigChampName)LEFT JOIN PigIDs ON PCHIST.field1=PigIDs.field0 WHERE PCHIST.field3='MATING' Or PCHIST.field3='AI'


can anyone enlighten me why the above does not work.
I am using it to create a querydef in VB and it will not
do it
 
Hiya,

Could you explain what you mean by doesn't work.

Does it return the wrong rows? Return an error message, or just cause the machine to hang??

Many thanks,

Tim
 
tim
I can go one step further than that the problem is the word date. I've solved it


thanks for replying tim
for others information it gives an error message(in VB anyway)Error in SQL SELECT statement, misspelled or unidentified field,punctuation error or use of reserved word. I only found this out after turning some other error trapping off so I could not enlighten you earlier tim.
Thanks
Again

sdh LOL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top