If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > How does Execute immediate differ from execute immediate with quotes ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Feb 2013
Posts: 1
How does Execute immediate differ from execute immediate with quotes ?

I'm trying to understand what this code does..This snippet is a part of a stored proc. And @serv_nm and @db_n are the input parameters.

execute immediate with quotes
'insert into #temp_seno_list (se10,queueId,reasonId,statusId,refDate)
location '''||@serv_nm||'.'||@db_n||'''
{
select distinct se10, queue_id, referral_reason_id, referral_status_id, referral_queue_dt from referrals
where queue_id = ' || @queueId || ' order by se10
};';

Can someone tell me as why three single quotes are used in it(I've marked it in red).
Also i'd like to know the diff between exec immediate and exec immediate with quotes..
Thanks
Paddy
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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