Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I change field values in a SQL statement.

Status
Not open for further replies.

jforero

MIS
Oct 10, 2003
12
US
Hi, is there any way to change the original value of a field in a SQL statement.

Say I have a REFERENCE field with 2 values A and B. Can I change the output value from A to 1 and B to 2?

The statement would be something like:

SELECT NAME, REFERENCE CHANGE(A TO 1 AND B TO 2)
FROM PRODUCT

It is not the right syntax but that is the idea.

Any help appreciated..

Jose.
 
If you're SQL statement is part of a program that you're writing then I think you'd probably be better off using programming logic to do the substitutions rather than SQL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top