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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-03-04 : 08:16:41
|
| joey writes "hi ! aim writing a stored procedure written below can i as favor to any guru to help me out? . I want the result of this procedure to save in a table i used into table but it has an error. thanks in advanceCREATE PROCEDURE jgm1 ASselect inv_num_,custnm,custname,trans_code,brdate as dateall from dbo.invoice_brok UNION select inv_num_,custnum_,custnm,trans_code,date____ as dateall from dbo.invoice_domunionselect inv_num_,custnum_,custnm,trans_code,date____ as dateall from dbo.invoice_intunionselect inv_num_,custnum_,custnm,trans_code,date____ as dateall from dbo.invoice_trorder by dateallGO" |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-03-04 : 09:01:47
|
| try thisCREATE PROCEDURE jgm1 ASInsert into TableName(select inv_num_,custnm,custname,trans_code,brdate as dateall from dbo.invoice_brokUNION select inv_num_,custnum_,custnm,trans_code,date____ as dateall from dbo.invoice_domunionselect inv_num_,custnum_,custnm,trans_code,date____ as dateall from dbo.invoice_intunionselect inv_num_,custnum_,custnm,trans_code,date____ as dateall from dbo.invoice_tr) TMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|
|
|