|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How flexible are stored procedures?
Hi,
Just a quick question. In the past I have used Oracle PL/SQL to write procedures to do all sorts of things. It is possible to use if statements and loops and variables etc to manipulate your data however you want. I just want to know if this is possible in a SQL Server stored procedure? I'm trying to write one but the more I get into it the more I realise it is going to need variables to store info in, a cursor that can be looped around and some if statements. Is this feasible or should I be writing this in vb or something? Any help appreciated, Thanks, Paula. |
|
#2
|
|||
|
|||
|
Yes it is possible to use cursors to loop through data in SQL Server. You can also declare variables, temp tables (for arrays) and use if statements. However, I should warn you that cursors are relatively expensive and I generally try to avoid using them if I can.
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > How flexible are stored procedures? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|