![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I would like to produce calculated (in SQL SELECT) column with output row number. Please look on following code: ** private counter counter=0 SELECT myIncrement(@counter) as No, * from some_table function myIncrement parameters tnCounter tnCouter=tnCouter+1 return tnCouter Query result looks like this: No Field -------- 2 ..... 3 ..... 4 ..... 5 ..... .. ..... 'No' always starts from 2 (in cases I tested). Problem is that I do not know is this a rule that function is called n+1 times and I can correct this by SELECT myIncrement(@counter)-1 as No - or should I try to find other solution. Best Regards, Iks |
#3
| |||
| |||
|
|
Hi, I would like to produce calculated (in SQL SELECT) column with output row number. |
![]() |
| Thread Tools | |
| Display Modes | |
| |