By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,640 Members | 1,598 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,640 IT Pros & Developers. It's quick & easy.

pass hash (#) table with different structure to stored procedure

P: n/a
Dear Techies,

I making one stored procedure, which does some operation based on an
interface hash (#) table ---- name #mydata.

This stored has two section of code (seperated by parameter value 0
and 1)
But hash table #mydata (same name) number/name of columns changes as
per call 0 or 1.

e.g.
when call for 0, ----> Pass 2 columns as company_cd and section_cd in
interface hash (#) table ---- name #mydata.
when call for 1, ----> Pass 3 columns as Section_cd, line_cd and
subline_cd in interface hash (#) table ---- name #mydata.

As a result, none of the case (0 or 1) is running properly, It gives
problem.

When I execute procedure for 0 by passing #mydata with two columns
---> it gives problem in 1 section code

And When I execute procedure for 1 by passing #mydata with three
columns ---> it gives problem in 0 section code
Please suggest !!! If anybody have faced the same problem or have any
idea about this case.
(I think passing hash table with 3 column as col1,col2,col3 can serve
the purpose, but this may cause rework in my case, so looking for
alternate solution)
Thanks in Advance,
T.S.Negi
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
It sounds like creating the temp table with all three columns is
probably the best solution - see here for more details and other
options:

http://www.sommarskog.se/share_data.html

Simon

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.