Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Thanks, I will give this a try. I will be sure to post my result just in case anyone else has had the same problem field names to deal with.
Glenn
>I have not used SQL Server enough to know the proper syntax but I found this, it may help:
>
>Maybe?: SelectCmd = "select [1] AS EXP, [10] AS EXP1, ...
>
>SQL Server 7.0 allows field and table names to contain spaces or other characters that violate valid identifier rules. These table or field names should be enclosed in "[" "]" when used in SQL expression or queries. If the quoted identifier is set to "ON", double quotation marks can also be used to enclose these identifiers. For instance, here are some valid examples of SQL queries:
>
>Select * from [Table with spaces]
>Or
>Set quoted identifier on
>Select * from "Table with spaces"
>
>
>
>
>
>
>>Ok, tried it and I get the literal value 1, 2 in the cursor for fields exp1, exp2. It thinks 1 is a literal value and not a field reference.
>>
>>Glenn
>>
>>>Did you try:
>>>
>>>SelectCmd = "select 1 AS EXP, 10 AS EXP1, ...
>>>or
>>>
>>>SelectCmd = "select 1 EXP, 10 EXP1, ...
>>>
>>>
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement