Search the Community
Showing results for tags 'msg 156'.
Hi I've been looking at the tutorial and spoken to a few people regarding a query which requires me to join two tables together and data within a specific data range. The environment I am running this in is SQL Server 2005. The following is the query I have tried to run: select *from individual (this is a table name)where update_timestamp <= 31/12/2008join delegate (this is a table name)as on member.member_ref=delegate.member_Refwhere start_date >= 31/12/2008 but when I run this, I get:Msg 156, Level 15, State 1, Line 4Incorrect syntax near the keyword 'join'. Someone advised me to try the following: select *from individualjoin delegateon member.member_ref=delegate.member_Refwhere start_date >= 31-dec-2008where update_timestamp <= 31-dec-2008 but when I do this, I get:Msg 156, Level 15, State 1, Line 6Incorrect syntax near the keyword 'where'. Can anyone advise me where I'm going wrong? If you require further info, please let me know. Thanks