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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 can a set based approach help me here...

Author  Topic 

rnbguy
Constraint Violating Yak Guru

293 Posts

Posted - 2007-02-01 : 18:17:56
im practicing set based approaches... and what im trying to do is grab each value from a table , scramble it and put it back in the table... i dont want the solution to this as id rather figure it out myself for practice...

the thing im stuck at is i can do this with a cursor but i want to avoid cursors in future, how would i use a set based approach to get each value of a table and work with it?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-02-01 : 18:22:10
You'd have to explain what you want to do with each value.

Set-based approach means working in sets. If you must get each value individually and do stuff with it, then you can't use a set-based approach.

Tara Kizer
Go to Top of Page

rnbguy
Constraint Violating Yak Guru

293 Posts

Posted - 2007-02-01 : 18:29:49
ahh right so i cant for example replace each value with another value in a whole set?

so for example

MEMEBER TABLE
firstname

- Rnbguy
- tkizer

change it to

MEMEBER TABLE
firstname

-rn1b3b4
-tksdj2

?

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-02-01 : 18:33:52
How do you determine what to change it to? If it's based upon data from another table, then yes you can probably use a set-based approach.

Tara Kizer
Go to Top of Page

rnbguy
Constraint Violating Yak Guru

293 Posts

Posted - 2007-02-01 : 18:49:03
ahh i see where ur going, okay ill play around and post back when i get stuck i appreciate it... just want to know how you pros think..
Go to Top of Page
   

- Advertisement -