sql server 2008 r2 - SQL statement runs fine in TEST, breaks on PROD -


I am performing the following queries on my test db, all work well:

 Select  as the name TABLE_NAME, select TOP 1 value from (Fn_listextendedproperty (NULL, 'schema', 'dbo', 'table', [TABLE_NAME], DEFAULT, NULL) where name = 'description' ) AS [Details] from info_schema.tables TB INNER JON Fn_listextendedproperty (NULL, 'schema', 'dbo', 'table', default, faucet, tap) call on prop.objname COLLATE DATABASE_DEFAULT = tb.TABLE_NAME COLLATE DATABASE_DEFAULT and prop .name = 'SettingTable' and prop.value my answer When executing on execution DB, I get the following error:  
  Message 102, level 15, state1  

, line 3 near 'TABLE_NAME' Wrong syntax

Test DB version: 10.50.1617.0

Prod DB version: 10.50.2550.0

Any ideas?

The PROD DB turns on in SQL Server 2000 compatibility mode. Setting it to 2008 The problem has been solved, and thank you for answering my discretion!


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -