General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only