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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-01-18 : 08:32:09
|
| Tom writes "I have a lookup table with 2 columns and 3 rows:HID Description1 Hours2 Travel3 OnCallThis table will not change very often, but it may be dynamic.I want to create another table that will have following columns:ID Hours Travel [On Call]Data will be populated from another table:ID HID Number1 1 1.51 2 301 3 2.52 1 63 1 7.53 3 30So final result would be:ID Hours Travel [On Call]1 1.5 30 2.52 6 7.5 03 7.5 0 30Can this be done using SQL Server stored procedures/functions/other? I don't need to modify data in this manner, I just want to retrieve it for reports.Hope someone can help. I can probably do this in C# but I'd like to know if it's possible in SQL Server.Thanks" |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|