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 |
|
jtrumbul
Starting Member
11 Posts |
Posted - 2009-01-09 : 17:45:13
|
| Hello All, I have a question that may be simple or may be hard as hell since my sql knowledge is < 0 to say the least ill let it rip. I have a select statement which returns the following rows and colsPriKey EmpName3 Abraham Pineda6 Al Vincent Amisola10 Albert Welcher13 Amity Payne16 Andrew Montero19 Annie Rothermelwhat i need to do is update this record set where i take the first 2 ids, and update all rows inbetween 3 + 1 and 6 - 1 then do the same for 6 and 10 then 10 and 13 etc... i need to update all the rows as stated in the same way putting the value of empname in each updated row with the exception of prikey 2 - 1 so for example with 6 and 10 i need to update rows 7,8,9 is there some simple way to do this? |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-01-09 : 17:51:46
|
| Can you post Sample data and Expected output? |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-10 : 02:53:12
|
| do you have records with id's 7,8,9 ,.. in your table or do you want to create them? i cant see them in sample data posted |
 |
|
|
jtrumbul
Starting Member
11 Posts |
Posted - 2009-01-12 : 10:35:33
|
| Is there some way i can add an attachment to a post. The thing is first i am importing an excel spread sheet then in the table it creates i have to do what i described before with the data, if there is some way to attach files, i will attach the spread sheet and the table it creates, i think this will give alot more light to what im trying to accomplish. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-12 : 10:37:26
|
| yup...upload the picture in some shared server and post path between image tags |
 |
|
|
|
|
|