-
basic query and CAST
I want to load all of the fields from a SQL database but 2 of the fields need to be changed via the CAST command.
So far all I have is:
SELECT CAST(var1 AS VARCHAR(30)) FROM table1") dsn(db1)
This command only quesries the var1 field.
1)How do I load the rest of the fields?
2) How do I perform the same CAST manipulation to another variable at the same time?
Thanks!
-
You can use it as many times as you want in select statement
SELECT CAST(var1 AS VARCHAR(30)),CAST(var2 AS VARCHAR(30)) FROM table1
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|