Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Seen a GOOD CA lately?
Message
De
27/01/2005 11:37:32
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
00980530
Message ID:
00981239
Vues:
35
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
Fil
Voir

Click here to load this message in the networking platform