SQLSquirrel
Technical User
This is bizarre!...
My colleague ran this query in query analyzer against Database AAA on Server SQL14:
select top 1 staff_number from dbo.staff where user_id = 'Omb'
He gets back:
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '1'.
I thought this was stupid so I independently coded (not copied) his query in query analyzer on my pc (not his) and
ran it against my copy of database AAA on a different Server SQL12 and I get the same result - doh!
BUT if I switch the same Query analyser session to USE database BBB on SQL012 - BBB was restored from a backup of AAA last night - I get back:
staff_number
------------
54616
(1 row(s) affected)
What is going on?... any offers?
My colleague ran this query in query analyzer against Database AAA on Server SQL14:
select top 1 staff_number from dbo.staff where user_id = 'Omb'
He gets back:
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '1'.
I thought this was stupid so I independently coded (not copied) his query in query analyzer on my pc (not his) and
ran it against my copy of database AAA on a different Server SQL12 and I get the same result - doh!
BUT if I switch the same Query analyser session to USE database BBB on SQL012 - BBB was restored from a backup of AAA last night - I get back:
staff_number
------------
54616
(1 row(s) affected)
What is going on?... any offers?