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 |
magic
Starting Member
2 Posts |
Posted - 2014-10-21 : 20:30:50
|
I have following data:DAYS OPENHR CLOSEDSATURDAY 08:00:00.0000000 17:00:00.0000000FRIDAY 09:00:00.0000000 16:00:00.0000000SUNDAY 10:00:00.0000000 16:00:00.0000000MONDAY 08:00:00.0000000 17:00:00.0000000WEDNESDAY 08:00:00.0000000 17:00:00.0000000TUESDAY 09:00:00.0000000 17:00:00.0000000Now, I want result like this:mon-thu: 8-5fri :9-4sat:8-5can somebody help me ?? i'm using db2 database.Thanks,mikemike |
|
magic
Starting Member
2 Posts |
Posted - 2014-10-21 : 20:33:27
|
DAYS,OPENHR AND CLOSED are column name.Thanks!mike |
|
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2014-10-22 : 11:50:19
|
Try a db2 forumhttp://www.dbforums.com/forumdisplay.php?8-DB2 |
|
|
mole999
Starting Member
49 Posts |
Posted - 2014-10-25 : 07:07:45
|
not sure if its relevantI would doreplace(replace(replace(replace(replace(replace(replace(DAYS,'SATURDAY','sat'),'SUNDAY','sun'),'MONDAY','mon'),'TUESDAY','tues'),'WEDNESDAY','wed'),'THURSDAY','thur'),'FRIDAY','fri') + ' :' + left('OPEN HR',5) + '-' + left('CLOSED',5)in SQLmaybe more or less complexMole |
|
|
|
|
|
|
|