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

Passing field valuse to stored procedure

P: n/a
Trying to create a complex stored-procedure.

After I execute a Select statment I want to pass the value of a field
to another sp for each record in that table.

ie:
Select field1, field2 from MyTable
exec rValue = MyStoredProc 'SomeParam', field2

What I find is that field2 is passed as a literal string 'field2' and
not the value of field2

What am I doing wrong ?

Thanks
Sid .
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Lyle Fairfield <Mi************@Invalid.Com> wrote in
news:9e******************************@remailer.fre ll.eu.org:
Eli Sidwell wrote:
Trying to create a complex stored-procedure.

After I execute a Select statment I want to pass the value of a field
to another sp for each record in that table.

ie:
Select field1, field2 from MyTable
exec rValue = MyStoredProc 'SomeParam', field2

What I find is that field2 is passed as a literal string 'field2' and
not the value of field2

What am I doing wrong ?

Thanks
Sid .


it should be written ^+\\field2//+^


I did not write the answer given above.
I have no idea if the suggestion is useful, benign or destructive.
As you note, what you want to do is somewhat complex. It probably requires
a loop in your SPROC. I try never to use "EXEC" in SPROCS, preferring to
write or rewrite the script. This may help with String recognition.

As for you, Don ...
You have a very fine mind; your general knowledge is extensive; your
language is exemplary; in short you are educated. Why waste these qualities
in this destructive and compelling pursuit which seems to be consuming you?
Is it so ethical to out-savage the savages?
Is it so rewarding to attack everyone, regardless of their previous
interaction with you?
You could come back and patiently, as you have done before, (perhaps not SO
patiently), point out the errors and hubris of the de facto owners of the
group. You could help return the group to a state where intelligent
discussion is common.
Now, you are only destructive. Is this the epitaph you want,
"I destroyed Comp Databases MS-Access"?
Picture it chiselled on some granite slab in a high plains graveyard, Don.
Will it make your ghost feel good?

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.