Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-10-17 : 07:50:58
|
Santosh writes "Normally when we open a cursor, we access the column values like mycursor.column_name.Here we use the column name, but i want to access the column values without using the name of the column...something like mycursor.columns(1), mycursor.columns(2) etc.is it possible in any way ?Thanks,Santosh." |
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2006-10-17 : 09:45:42
|
A dynamic cursor...how intriguing...--Lumbago"Real programmers don't document, if it was hard to write it should be hard to understand" |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-10-17 : 09:57:16
|
First of all, you can't read cursor like cursorname.column. You must be talking about ORACLE there. In SQL, you have to fetch values from cursor into local variables using FETCH statment. Your case is only possible when you use Recordset object from client side and use Recordset.Fields(0).Harsh AthalyeIndia."Nothing is Impossible" |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-10-17 : 12:16:24
|
>>but i want to access the column values without using the name of the column...Why?MadhivananFailing to plan is Planning to fail |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2006-10-17 : 15:48:46
|
quote: Why?
Cause I don't want to actually do it correctly, so I can keep my job security fixing it for the next 10 years. |
|
|
X002548
Not Just a Number
15586 Posts |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-10-18 : 09:24:07
|
>>Cause I don't want to actually do it correctly, so I can keep my job security fixing it for the next 10 years. I think the questioner tries to use the same method of how he/she does in front end like rs(0), rs(1), etcMadhivananFailing to plan is Planning to fail |
|
|
|
|
|