Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Distributed Query in sql 2000
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00574429
Message ID:
00574436
Vues:
17
This message has been marked as the solution to the initial question of the thread.
It looks like you have QUOTED_IDENTIFIER set to ON on SQL 2000. In this case you cannot use double quotes for string literal. See 'Delimited Identifiers' in the BOL for details.
IF @PAGE = 'DIR'
  set @mdxstring = 'select * from openquery(BTolap,
    ''select {[fy].[all fy].[' + @fy1 + ']:[' + @fy2 + '] } on columns,
    non empty [DIR].members on rows from testcube'') '.
>Hi,
>
>This piece of code worked in a stored procedure in SQL 7.0 but
>doesnt work in SQL 2000. Could someone help me?
>Thanx,
>Jamuna
>
>IF @PAGE = "DIR"
>set @mdxstring = "
>select * from openquery(BTolap,
>'select {[fy].[all fy].[" + @fy1 + "]:[" + @fy2 + "] } on columns,
>non empty [DIR].members on rows from testcube') ".
>
>The error messages are:
>Server: Msg 207, Level 16, State 3, Procedure SP_test, Line 20
>Invalid column name 'DIR'.
>Server: Msg 207, Level 16, State 1, Procedure SP_test, Line 21
>Invalid column name '
>select * from openquery(BTolap,
>'select {[fy].[all fy].['.
>Server: Msg 207, Level 16, State 1, Procedure SP_test, Line 21
>Invalid column name ']:['.
>Server: Msg 207, Level 16, State 1, Procedure SP_test, Line 21
>Invalid column name '] } on columns,
>non empty [DIR].members on rows from testcube') '.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform