Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I HATE OpenQuery!
Message
De
11/07/2012 07:00:11
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01548093
Message ID:
01548156
Vues:
62
Try creating just one string with the whole query (with embedded CR) and also you may want to use single quotes for string constants (but doubled when used in a string).

Also, why do you need to generate OPENQUERY dynamically? Have you tried it static?

Finally, do you have a direct access to that Oracle server and can you first try that query there?

Also, are you sure this is valid Oracle syntax

EXTRACT(YEAR FROM HT.TAP_DT), EXTRACT(MONTH FROM HT.TAP_DT),


yes I am sure that this is valid Oracle syntax. I have used OpenQuery like this many times before. The problem was that I was missing a beginning quote in this string:

HCT.SAMPLE_LOCATION IN ("SR", LF","LR")
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform