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 |
|
netcop
Starting Member
12 Posts |
Posted - 2002-07-22 : 10:02:18
|
| Hello,i have a question regarding my database design. I got the data from ascii and imported it straight into the database.I've a table where information to a busline is stored.There are some profiles (f1....fx) where the time fromthe starting point is stored.Line Direction busstop distance f1 f2 f3========================================================70 1 001 0000 00 00 0070 1 123 0326 02 03 0170 1 136 0629 04 05 0370 1 222 0980 05 06 0470 1 234 1234 06 07 0570 1 235 1612 07 09 0670 1 180 1902 10 12 0870 1 221 2345 12 15 1070 1 110 2680 15 17 12In another table the time information is stored.line direction starttime profile=====================================70 1 06:11 170 1 06:30 170 1 07:11 270 1 07:30 270 1 08:11 2In this table there is the information which profile i've to choose (f1...fx). If there stands 1 then f1 is to use.How to combine this in one single sql-statement without using dynamic sql!?Edited by - netcop on 07/22/2002 14:51:15Edited by - netcop on 07/24/2002 09:21:22 |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2002-07-23 : 04:33:08
|
| Look up the CASE statement in BOL..PeaceRick |
 |
|
|
netcop
Starting Member
12 Posts |
Posted - 2002-07-24 : 09:17:45
|
| Thanks. The query runs with the CASE statement. |
 |
|
|
|
|
|