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.
| Author |
Topic |
|
macsterling
Yak Posting Veteran
56 Posts |
Posted - 2008-11-24 : 13:22:14
|
| select baseid, basecode proglidninto #tempfrom ( select baseid, basecode proglidn from glbasecodes g join xfer_Progl p on substring(p.proglrmb,1,4) = g.basecode )I am getting 'Incorrect syntax near ')'.' on the last lineany suggestions? |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-11-24 : 13:33:36
|
| select g. baseid, g.basecode p.proglidninto #tempfrom glbasecodes g join xfer_Progl p on substring(p.proglrmb,1,4) = g.basecode |
 |
|
|
macsterling
Yak Posting Veteran
56 Posts |
Posted - 2008-11-24 : 13:43:03
|
| Thanks - I had coped the format from another SQL and this is much simpler. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-11-25 : 01:09:30
|
quote: Originally posted by macsterling select baseid, basecode proglidninto #tempfrom ( select baseid, basecode proglidn from glbasecodes g join xfer_Progl p on substring(p.proglrmb,1,4) = g.basecode )I am getting 'Incorrect syntax near ')'.' on the last lineany suggestions?
You need a derived tableselect baseid, basecodeproglidninto #tempfrom (select baseid, basecode proglidn from glbasecodes g join xfer_Progl p on substring(p.proglrmb,1,4) = g.basecode) as tMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|
|
|