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 |
|
sqllearner
Aged Yak Warrior
639 Posts |
Posted - 2004-06-25 : 15:09:20
|
| emp_detailsemp_id emp_name comp_id dept entry_date Comments258 Jihn 13006044 SQR 2/27/2000 SQ-entry 303 Greg 12972360 FRT 10/30/1999 fr-completed 449 Troy 12973061 HGT 11/3/1999 HG-pending 453 Aby 12973541 MHT 11/7/1999 MH-Not decided I need to make insert to this table where each of these 4 entries should be duplicated 5 times and with different dept and comments dept - DFT,TRY,IUE,RTB,HJKcorressponding comments - to be checked,wait,re-entry,trying,processingplease help me with this query |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2004-06-25 : 15:15:26
|
| Isn't that really 25?Brett8-) |
 |
|
|
drymchaser
Aged Yak Warrior
552 Posts |
Posted - 2004-06-25 : 15:19:36
|
| CROSS JOINselect a.emp_id, a.emp_name, a.comp_id, a.entry_date, b.dept, b.commentsfrom mytable a CROSS JOIN(select 'dft'as 'dept', 'to be checked' as 'comments'unionselect 'try', 'wait'unionselect 'iue', 're-entry'unionselect 'rtb', 'trying'unionselect 'hjk', 'processing') b...not sure about the dept-comment association but something like this. |
 |
|
|
sqllearner
Aged Yak Warrior
639 Posts |
Posted - 2004-06-29 : 14:46:58
|
| Thanks....Done |
 |
|
|
|
|
|
|
|