Home » SQL & PL/SQL » SQL & PL/SQL » Explain below query
Explain below query [message #604051] Mon, 23 December 2013 06:23 Go to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi all,

I Searched on Google about below query .Can any one please explain the below code

At declaration section 
--------------------
QT varchar2(10) :='''';  -->see here

 at if condition
--------------
if : :CONTROL_BLOCK.ITEM_NAME is not null then
         finalstr := finalstr || 'AND ITEM_NAME =' || QT||:CONTROL_BLOCK.ITEM_NAME||QT;
end if;



Thank You
Re: Explain below query [message #604053 is a reply to message #604051] Mon, 23 December 2013 06:32 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
QT is a single quote. In a form, someone decided to concatenate that variable with a string (instead of messing up with multiple single quotes). Suppose that :control_block.item_name contains a string mist598. That code evaluates to
... and item name = 'mist598'
Re: Explain below query [message #604055 is a reply to message #604053] Mon, 23 December 2013 06:39 Go to previous message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Thank You Littlefoot, Good explanation.. Smile
Previous Topic: Adding column to the table is taking long time
Next Topic: Pass variable value in input XML for calling webservice
Goto Forum:
  


Current Time: Fri Apr 26 09:49:17 CDT 2024