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 |
|
phillipsdj
Starting Member
2 Posts |
Posted - 2011-11-01 : 05:33:28
|
| Hi all,I am a very basic SQL user, with no real ability to write queries at all.I have been given the below script which to my untrained eye looks like it should work but I am getting an 'Incorrect Syntax near '-' error regarding the final line.Sorry to ask such a basic question but could somebody please take a look and let me know what mistake I have made?select a.NAME,p.EVENTID,ae.RATE,p.PERSPCODE,p.PERSPVALUE,p.STDDEVI,p.STDDEVC,p.EXPVALUEfrom rdm_port pinner join rdm_anlsevent ae on p.ANLSID = ae.ANLSID and p.EVENTID = ae.EVENTIDinner join rdm_analysis a on p.ANLSID = a.IDwherep.PERSPCODE = 'RL' –- or 'RN’ for treatyMany thanks, |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-11-01 : 05:37:43
|
you don't have 2 dash in the last line. One of them is not a dash. remove it and re-key KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
phillipsdj
Starting Member
2 Posts |
Posted - 2011-11-01 : 05:39:59
|
Thank you very much for the quick reply. I am sorry to have wasted your time with such a minor error!.... |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-11-01 : 05:52:02
|
you are welcome KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|
|
|