Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
I'm using sql datasource for databinding. The phase column in the data base has many information in it.it also contains sevral rows with complaint. I want to get some information when the phase is eual to complaint. The code I typed in was SELECT STAGE FROM TABLE WHERE (PHASE='COMPLAINT') but its not slecting the information i want instead it shows an empty table when i run. But its accepting a ID_NUMBER to compare but not string. for example WHERE PHASE= 1756. Can i get a solution please.
Posted
Comments
Dr.Walt Fair, PE 2-Aug-11 12:28pm    
What are your column definitions? It sounds like you're mixing 'COMPLAINT' with numeric codes?
JOAT-MON 2-Aug-11 13:18pm    
I agree with Walt. 'COMPLAINT' may be a string in another table that needs to be joined on the numeric value in the PHASE column. Hard to tell with out knowing what the structures are.

1 solution

Your phase column is likely a foreign key to a phase lookup table. If you know the id of the "Complaint" phase, then I would use that. If you want to do it using the string then you would have to join to the parent table.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900