Connecting Tech Pros Worldwide Help | Site Map

Passing field valuse to stored procedure

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 06:52 PM
Eli Sidwell
Guest
 
Posts: n/a
Default Passing field valuse to stored procedure

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 .

  #2  
Old November 12th, 2005, 06:54 PM
Lyle Fairfield
Guest
 
Posts: n/a
Default Re: Passing field valuse to stored procedure

Lyle Fairfield <MissingAddress@Invalid.Com> wrote in
news:9e47b7b25f3981945cddc48fc89cc3fe@remailer.fre ll.eu.org:
[color=blue]
> Eli Sidwell wrote:
>[color=green]
>> 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 .[/color]
>
>
>
> it should be written ^+\\field2//+^[/color]

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)
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.