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 |
|
jpc82
Starting Member
8 Posts |
Posted - 2006-03-10 : 13:15:35
|
| I have no idea if this is even possible, but I hope it is.I have a view that looks like this.ID......value1.......A1.......B1.......C2.......D3.......E4.......F5.......G5.......H5.......IWhat I want is my query to return thisID.....Values1......A, B, C2......D3......E4......F5......G, H, IIs there anyway to create a view that does this in MS SQL? |
|
|
nathans
Aged Yak Warrior
938 Posts |
Posted - 2006-03-10 : 13:54:21
|
| http://www.sqlteam.com/item.asp?ItemID=11021Post here again if you run into problems.Nathan Skerl |
 |
|
|
jpc82
Starting Member
8 Posts |
Posted - 2006-03-10 : 15:50:45
|
| Thanks for the link. That is exactly what I want to have happen.Before I start spending too much time trying to get this to work for my tables I had one question.Is it possible to do this without a second table?I just want to be able to create a single view which uses my existing tables to do this in realtime, and not have to run a stored procedure to update the second table and use that one. |
 |
|
|
nathans
Aged Yak Warrior
938 Posts |
Posted - 2006-03-10 : 16:48:50
|
| Post your tables and some sample data / desired results and well give it a shot.You can also refer this: http://www.sqlteam.com/item.asp?ItemID=2368You will need to either use a temp table, add a column to your existing table and perform an update, etc.Nathan Skerl |
 |
|
|
jpc82
Starting Member
8 Posts |
Posted - 2006-03-13 : 08:33:35
|
| The 2 views that I will be using are structured like thisV_Imp - this is basically the listing of all needed projectsProjectID...Start Date...End Date1...........1/1/2001.....1/2/20012...........1/3/2001.....1/4/20013...........1/5/2001.....1/7/20014...........1/9/2001.....1/9/20015...........1/10/2001.....1/10/2001V_Project_ApplicationProjectID....Application1............App11............App22............App34............App14............App14............App65............App95............App100My query needes to return the resultProjectID...Start Date...End Date...Applications(CVS listing)Any help would be appreciated |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|