Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Parameter

Status
Not open for further replies.

Triplex

Programmer
Oct 10, 2002
43
PH
Hello People...

Can you help me with my problem.? I have a table name
GL001.It has a field

TrnRec,Acctno,CCCode,Tdate,Cdate,Branch,Reference,Credit,
Debit.

I make a procedure gl_insert with a parameter.

if I run the procedure

exec gl_insert '123','45678','43546','','','01','jv123456',12453.00,231324.00

theres no problem.
values: 123 is for TRNREC
45678 is for ACCTNO
43546 is for CCCode
'' is for TDate
'' is for Cdate
01 is for Branch
jv123456 is for reference
12453.00 is for credit
231324.00 is for debit

My question is. Is it posible in a procedure to enter a parameter value interchageable? Let say the sequence will be this way

exec gl_insert '01','jv123456','','',12453.00,231324.00,'123','45678','43546'


values: 01 is for Branch
jv123456 is for reference
'' is for TDate
'' is for Cdate
12453.00 is for credit
231324.00 is for debit
123 is for TRNREC
45678 is for ACCTNO
43546 is for CCCode

Thanks & God Bless

triplex

 
sure, but you would have to execute the sp like this:

exec gl_insert @branch = '01', @reference = 'jv123243', @TDate = '', ........................

and inside the sp, call an insert with the correct column order:
insert GL0001 values
(@TRNREC, @ACCTNO, @CCCode, @TDate...........)

hope this helps!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top