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 |
chulz90
Starting Member
26 Posts |
Posted - 2013-01-03 : 22:18:23
|
HELLO..this the record that i have let say MR_TABLE________________________________MR_NUMBER| ITEM_NUM| MR_STATUS|.----------.|----------.|.-----------.|MR_000045 | ITEM_001 | _APPROVED |MR_000045 | ITEM_023 | _APPROVED |-------------------------------------'MR_000112 | ITEM_045 | _DECLINED. |MR_000112 | ITEM_002 | _DECLINED. |MR_000112 | ITEM_015 | _DECLINED. |-------------------------------------'MR_000005 | ITEM_019 | _APPROVED |MR_000005 | ITEM_004 | _APPROVED |MR_000005 | ITEM_037 | _APPROVED |-------------------------------------'when i generate new MR_NUMBER = 'MR_000185'That contained four items 'ITEM_001','ITEM_045','ITEM_099','ITEM_037'i've some problem for the query.can you help me to show the record in MR_TABLE depend on 'MR_000185'(my new MR_NUMBER) items???should i use cursor or what????actually i don't know how to use cursorthis the result that i expected below the history record from my new MR_NUMBER 'MR_000185' items________________________________MR_NUMBER| ITEM_NUM| MR_STATUS|.----------.|----------.|.-----------.|MR_000045 | ITEM_001 | _APPROVED |MR_000005 | ITEM_037 | _APPROVED |MR_000112 | ITEM_045 | _DECLINED. |-------------------------------------'thanks for your help before |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2013-01-03 : 22:54:56
|
It is not clear. Can you elaborate with DDL and Expected output |
|
|
chulz90
Starting Member
26 Posts |
Posted - 2013-01-04 : 01:58:15
|
quote: Originally posted by sodeep It is not clear. Can you elaborate with DDL and Expected output
sorrywhay u mean about DDL ? |
|
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2013-01-04 : 02:08:36
|
quote: Originally posted by chulz90
quote: Originally posted by sodeep It is not clear. Can you elaborate with DDL and Expected output
sorrywhay u mean about DDL ?
DDL(Data Definition Language) means table structures..>>when i generate new MR_NUMBER = 'MR_000185' That contained four items 'ITEM_001','ITEM_045','ITEM_099','ITEM_037'how you are inserting these values into table...?--Chandu |
|
|
chulz90
Starting Member
26 Posts |
Posted - 2013-01-04 : 02:59:33
|
quote: Originally posted by bandi
quote: Originally posted by chulz90
quote: Originally posted by sodeep It is not clear. Can you elaborate with DDL and Expected output
sorrywhay u mean about DDL ?
DDL(Data Definition Language) means table structures..>>when i generate new MR_NUMBER = 'MR_000185' That contained four items 'ITEM_001','ITEM_045','ITEM_099','ITEM_037'how you are inserting these values into table...?--Chandu
i inserting like usually |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
|
|