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 |
perinbarajan
Starting Member
2 Posts |
Posted - 2010-09-14 : 02:26:33
|
hai i have a table name called employee which has 3 fields like eid,fname,lname. but all values in fname are same. i want to change each and every value as unique name. how can i do that?this is my tableeid fname lname1 dsfds dfd100 dsfds dfd50 dsfds dfd25 dsfds dfd16 dsfds dfd14 dsfds dfd100 dsfds dfd50 dsfds dfd25 dsfds dfd16 dsfds dfd14 dsfds dfd |
|
Sachin.Nand
2937 Posts |
Posted - 2010-09-14 : 02:30:27
|
How do you decide on what will be your unique name?Limitations live only in our minds. But if we use our imaginations, our possibilities become limitless. PBUH |
 |
|
perinbarajan
Starting Member
2 Posts |
Posted - 2010-09-14 : 02:35:39
|
hi thnx for ur replyi dont want to specify any name. each and every name sholud be different as per ur needs like kumar,suresh. here i want single query to change all values as unique name. is there any possibilitiesfor example fnamesureshkumarvelpeterlike this . |
 |
|
Sachin.Nand
2937 Posts |
Posted - 2010-09-14 : 04:47:46
|
Maybe thisselect fname + '' + row_number()over(order by (select 1)) from yourtable It will append a unique number to fname.So fname becomes fname1,fname2,fname3 and so on.....Limitations live only in our minds. But if we use our imaginations, our possibilities become limitless. PBUH |
 |
|
|
|
|