I'm getting incorrect syntax error. Can someone tell me what I'm
doing wrong, here's my stored procedure:
select Titles.Title
Try this:
select Titles.Title
From Titles
Inner Join Titleclassification on classifications.classificationid =
titleclassification.classificationid
and titlecassification.titleid = titles.titleid
Steve C.
MCAD,MCSE,MCP+I,CNE,CNA,CCNA
> I'm getting incorrect syntax error. Can someone tell me what I'm
> doing wrong, here's my stored procedure:
[quoted text clipped - 6 lines]
> titleclassification.classificationid
> Inner Join titlecassification.titleid = titles.titleid
JJ297 - 24 Aug 2007 19:26 GMT
> Try this:
>
[quoted text clipped - 19 lines]
>
> - Show quoted text -
Almost now I'm getting:
The column prefix 'classifications' does not match with a table name
or alias name used in the query.
select Titles.Title
>From Titles
Inner Join Titleclassification on classifications.classificationid =
titleclassification.classificationid
and titleclassification.titleid = titles.titleid
Any ideas?
Steve - 24 Aug 2007 19:34 GMT
oops, how about this:
select Titles.Title
From Titles
Inner Join titlecassification on titlecassification.titleid = titles.titleid
Inner Join classifications on classifications.classificationid =
titleclassification.classificationid
Steve C.
MCAD,MCSE,MCP+I,CNE,CNA,CCNA
>> Try this:
>>
[quoted text clipped - 28 lines]
>
> Any ideas?
JJ297 - 24 Aug 2007 19:39 GMT
> oops, how about this:
>
[quoted text clipped - 41 lines]
>
> - Show quoted text -
PERFECT! I see you added the word inner join twice. I get it now.
Thanks!
Steve - 24 Aug 2007 19:48 GMT
Great!
You specify "INNER JOIN" for each table you want to perform the inner
join on, and use the "<table.column>=<table.column>" notation for each
one so SQL knows how to match up the rows. This applies for Left and
Right joins, too.
Steve C.
MCAD,MCSE,MCP+I,CNE,CNA,CCNA
>> oops, how about this:
>>
[quoted text clipped - 36 lines]
> PERFECT! I see you added the word inner join twice. I get it now.
> Thanks!