November 13, 2008 at 7:08 am
Hello everybody,
This is my first post here and i´m new in this SQL stuff, so be patient.
I have this 2 tables
1 - 33 columns and 96 rows(Date, time, 1 ...31)
Date | time | 1 | 2 | 3 | ... | 31
01-01-2008 | 00:00 | 1 | 1 | 0 | ... | 0
:
01-31-2008 | 00:00 | 1 | 1 | 0 | ... | 0
2 - 5 Columns and n number of rows
I wanna know how can i transfer the data from the first table to the second, when the value is 0 send the value to the 2nd and 3rd column on the second table and when the value is 1 send the value to the 1st column so the second table should look like this:
Date | Time | a | b | c
01-01-2008 | 00:00 | 1 | 0 | 0
:
01-31-2008 | 00:00 | 1 | 0 | 0
Thanks every one for the help, if you have any questions please ask
November 13, 2008 at 1:48 pm
"I wanna know how can i transfer the data from the first table to the second, when the value is 0 send the value to the 2nd and 3rd column on the second table and when the value is 1 send the value to the 1st"
Which column in the first table are you checking to be 0? i.e. based on the value of which column in the first table are you sending data to different columns in the 2nd table?
And also check http://www.sqlservercentral.com/articles/Best+Practices/61537/ for tips on how to post a question to this forum to get the best reply 🙂
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply