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 |
|
CoffeeAddict
Yak Posting Veteran
94 Posts |
Posted - 2010-06-17 : 12:34:44
|
| I'm having a couple malformed syntax issues and not sure how to resolve this or change it around to make T-SQL happy:select top 1000 *from Orders o nolockinner join Cash con c.orderid = convert(varchar(10), o.id)where type = 'Credit'and cNumber <> ''order by createdOn descyou can't put nolock after the o? I get an error on thatAlso, it's not liking the convert syntax here |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-06-17 : 12:49:34
|
(nolock)convert is ok. The error a consecutive fault I think. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
CoffeeAddict
Yak Posting Veteran
94 Posts |
Posted - 2010-06-17 : 12:50:14
|
| Thanks. Did not know the () really mattered here. |
 |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2010-06-17 : 12:59:40
|
| Sure you want the chance of incorrect data? [url]http://sqlblog.com/blogs/andrew_kelly/archive/2009/04/10/how-dirty-are-your-reads.aspx[/url]--Gail ShawSQL Server MVP |
 |
|
|
|
|
|