Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seen a GOOD CA lately?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
00980530
Message ID:
00980599
Views:
24
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, ...
>>
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform