Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Newbie needs help on joining query

Author  Topic 

steveoz32
Starting Member

3 Posts

Posted - 2007-10-11 : 07:23:44
Hi All,

First off sorry for my complete lack of experience with SQL, but I've just started a new position which involved learning SQL. I'm currently looking for a course but in the mean time I just have to try and fumble by doing basic things.

I'm trying to write my first basic select / join statement, and I just can't seem to get it working.

Any help would really be appreciated. It's T-SQL we use btw.

Thanks :)



USE MLSDHeat
GO

select * from dbo.CallLog
where callstatus between 'open'and 'pending'
right outer join dbo.Asgnmnt
on callid = callid
order by callid



--the above returns error Msg 156, Level 15, State 1, Line 4
Incorrect syntax near the keyword 'right'.

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2007-10-11 : 07:32:06
No need to post the same question in different forums. Stick to the "New to SQL Server" forum and you should be fine.

Jim
Go to Top of Page
   

- Advertisement -