gusto ta nako nga i.loop ang columns bitaw from q1,q2...q13, unsay dapat ibutang na sql syntax ani?![]()
gusto ta nako nga i.loop ang columns bitaw from q1,q2...q13, unsay dapat ibutang na sql syntax ani?![]()
aw, good luck. hehehehe
pero if ingon ana jud inyong approach, you can try the following, mao ni ako gihimo provided same ta ug database.
1. Query all the columns of the said table. something like "from user_tab_columns" or with the likes.
2. store it in a string variable with comma separated values
3. use it in your string variable.
Caveat:
Always check the output of your string kung sakto ba ang porma and good luck
Yep, look like the person is the real programmer so he provided the solution to that matter anyway. And how else it really needs to be done for whatever reason out there. I do not want to make it anyway. I do want to take some letters with you.
From stackoverflow.com, easy peasy.
SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = N'ACTUAL_NAME_OF_TABLE'
this should give you a list of columns, sa .NET maybe an SQLDataReader would be good with a while loop.
Similar Threads |
|