Assign the values to Var
How to assign the values to variable in SQL
Thanks
SQL> variable var number
SQL> exec :var := 10
PL/SQL procedure successfully completed.
SQL> select :var as val from dual;
VAL
10
1 row selected.
edit
And/or:
SQL> begin
2 select 20 into :var from dual;
3 end;
4 /
PL/SQL procedure successfully completed.
SQL> select :var as val from dual;
VAL
20
1 row selected.Edited by: hoek on Jan 5, 2010 3:26 PM
edit II
Actually Oracle has everything documented @ http://tahiti.oracle.com including lots of examples.
For instance: http://www.oracle.com/pls/db112/ranked?word=variables&partno=e10823
Edited by: hoek on Jan 5, 2010 3:28 PM
Similar Messages
-
I want to assign the value of a Javascript variable to JSP Variable
I want to assign the value of a Javascript variable to JSP Variable .. for example :
<%
Bla Bla Bla
%>
<script>
var JavaScriptVariable="hello"
</script>
<%
String JSPVariable=// The Value of JavaScriptVariable ;
%>
How can i do that ??
Thanks>I want to assign the value of a Javascript variable to JSP Variable
cannot be done.Friend try to understand concepts properly Javascript is always excuted by the browser @clientside where as JSPCode is executed Websever(ServletContainer) @serverside.Through you are combining JSP Code blocks(Tags,Expressions,scriptlets...) & javascript under a single page webserver can only identify what is their under JSP Code blocks.
Hope this could be an appropriate answer for your question.
However,you can as well submit a request by encoding your URL with request parameters and the submit to the page and then collect it using request.getParameter(name).
But under a single context state it is not possible
REGARDS,
RaHuL -
How to assign the Value to the Particular field-Text field
Hi all,
My requirement is to call the Web service with input from the ADF page.
Steps I have done:
1. I have created a Web service data control based on the WSDL file.
2. Just drag and drop the Process, It is automatically created the form with the Input fields and then the Process button
3. When I entered the values and then process button it will pass the values corretly.the web service is invoked correctly with the values entered.
4. But when I try to assign the value from the some other field that is not working.
I am assigning the Value to the field by go to the properties of the Particular field value =”CREATE”
When I do like this that value is showing in the screen. But it will not pass the value to the web service.
I think the value is only displaying in the screen. Not stored at bindings level. Kindly guide me in this.
Thanks in Advance
C.KarukkuvelIf you want to have the value that is returned displayed in a field that has binding to another item and not the WS result item then the way to do this would be to override the method that is invoked with the button that calls the web service - you then take the result and assign it to the item you want.
See the way it is done here:
http://blogs.oracle.com/shay/2009/07/java_class_data_control_and_ad.html
While this sample uses a simple method it would be basically the same for a Web service. -
Error in ECA when assigning the value to structures
Hi,
There are errors in ECA when we execute our function modules.
Say a script has 3 interfaces (just an example)
1) In the first command interface, there is a reference to a structure which has 3 nested structures within, in which the inner most 3rd structure is filled.
2) In 2nd interface, the inner most structure in null.
3) In third interface, it is trying to initialize only those elements
that were already initialized and we get a empty node error for the 3rd
nested structure, when it tries to assign the value .
Here is the error message that we encounter
"The Node IT_TABLE_INPUT_DATA[1]-DATA[2]-COMPARE_OPERATOR of Object VS_EDIT_LIST Does Not Exist"*
Please help us in resolving this issue.
Thanks,
Asha
Edited by: Asha Nagaraj on Jan 19, 2009 11:57 AMHi,
We tried to parameterize in the node level rather than Struture level, still the same problem persists, becoz
1. In the first command interface the value has been assigned to internal node
2. In the second command interface there is no value to assign, so null value is assigned to that node
3. in the third command interface, when it tries to assign the value to the node which was assigned "null" in the previous interface, we are encountering that issue. it is not able to find that node
Let me know if u need further info.
Thanks,
Asha -
Alv list Unable to assign the values in the particular coloumn
Hi,
Can u please tell me how to asign the values for the particular list.Every time i am getting 10 characters default. if i take material desc it contains 40 char so how to increase this in the output list. ia m sending code for referal
REPORT ZTEST_AMIT no standard page heading line-size 350. .
tables: mseg,mkpf.
TYPE-POOLS: SLIS.
DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
L_LAYOUT type slis_layout_alv,
x_events type slis_alv_event,
it_events type SLIS_T_EVENT.
DATA: BEGIN OF ITAB OCCURS 0,
VBELN LIKE VBAK-VBELN,
POSNR LIKE VBAP-POSNR,
MALE(40) type c,
female(20) type c,
END OF ITAB.
SELECT VBELN
POSNR
FROM VBAP
UP TO 20 ROWS
INTO TABLE ITAB.
X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-SELTEXT_L = 'VBELN'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 1.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'POSNR'.
X_FIELDCAT-SELTEXT_L = 'POSNR'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 2.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'MALE'.
X_FIELDCAT-SELTEXT_L = 'MALE'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 3.
x_fieldcat-just = 'C'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'FEMALE'.
X_FIELDCAT-SELTEXT_L = 'FEMALE'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 23.
x_fieldcat-just = 'C'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
x_events-NAME = SLIS_EV_TOP_OF_PAGE.
x_events-FORM = 'TOP_OF_PAGE'.
APPEND x_events TO iT_EVENTS.
CLEAR x_events .
L_LAYOUT-NO_COLHEAD = 'X'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = sy-repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME =
IS_LAYOUT = l_layout
IT_FIELDCAT = it_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = it_events
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = itab
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
FORM TOP_OF_PAGE.
*-To display the headers for main list
FORMAT COLOR COL_HEADING.
WRITE: / SY-ULINE(103).
WRITE: / SY-VLINE,
(8) ' ' ,
SY-VLINE,
(8) ' ' ,
SY-VLINE,
(31) '***'(015) centered,
sy-vline.
WRITE: / SY-VLINE,
(8) 'VBELN' ,
SY-VLINE,
(8) 'POSNR'(014) ,
SY-VLINE,
(15) 'MALE'(020) ,
sy-vline,
(13) 'FMALE'(015) ,
sy-vline.
FORMAT COLOR OFF.
ENDFORM.Hi Amit,
define a internal table and append the value outputlen =40 in it
Try this code
Types: struct type table of slis_fieldcat_alv occurs 0.
struct-outputlen = 40.
append struct.
Regards,
Amit Bhadauria
Message was edited by: amit bhadauria
Message was edited by: amit bhadauria
Message was edited by: amit bhadauria -
Assigning the value to VARCHAR variable with special characters
Hi Gurus,
In declare section I have
sql_text VARCHAR2(500);
in procedure body
I have to assign the variable sql_text =' SELECT TO_CHAR (MAX (A.START_DATE_TIME), 'MMYY')
FROM
JTF_IH_ACTIVITIES A, JTF_IH_INTERACTIONS B WHERE A.INTERACTION_ID =
B.INTERACTION_ID AND B.PARTY_ID = :B1 AND A.ACTION_ITEM_ID = (SELECT
ACTION_ITEM_ID FROM JTF.JTF_IH_ACTION_ITEMS_TL WHERE UPPER (ACTION_ITEM) =
'LETTER') AND A.ACTION_ID = (SELECT ACTION_ID FROM JTF.JTF_IH_ACTIONS_TL
WHERE UPPER (ACTION) = 'SENT')'
the due to the special character like ( , ' = : ) I am not able to assign the above sql to the sql_text variable. Can someone please help how I can pass above SQL statement as varchar variable.
Thanks
NaveedNaveed_CG wrote:
Mr Copy and Past (sb what ever)... post this here and you will not see the last ] is not visible in the forum window... try yourself .... however, I happen to see your history on the forum, and you have some problem somewhere.. so please stay away from my question and let the mentors help.Hey Mr ImBeingRudeToValuableForumVolunteerWhenImNotFollowingTheMostBasicRulesMyself look at that :Scott@my11g SQL>ed
Wrote file afiedt.buf
1 declare
2 url_text varchar(100);
3 begin
4 url_text := q'[amar's web log is http://amar.blog.com:80/oracle ] ' ;
5 dbms_output.put_line('url_text => '||url_text);
6* end;
Scott@my11g SQL>/
ERROR:
ORA-01756: quoted string not properly terminated
Scott@my11g SQL>ed
Wrote file afiedt.buf
1 declare
2 url_text varchar(100);
3 begin
4 url_text := q'[amar's web log is http://amar.blog.com:80/oracle ]' ;
5 dbms_output.put_line('url_text => '||url_text);
6* end;
Scott@my11g SQL>/
url_text => amar's web log is http://amar.blog.com:80/oracle
PL/SQL procedure successfully completed.Maybe you should consider apologize to sb92075 +(whose status is Guru which we could consider likely to "mentor")+ and also start marking your threads as answered ? -
Can you assign the value of a jstl:out value to a jstl:set variable?
Basically can you do the following?
<jstl:set var="journeyVisit"
value="<jstl:out value=${journeyVisits.stopPoint.description} />" />
Basically we have our own independent markup language and I need to use our own href tag to wrap the 'journeyVisit' tag.
Any ideas?
Thanks.<jstl:set var="journeyVisit" value="${journeyVisits.stopPoint.description} " />
-
How can assign the value returned from javascript to Hidden item
Hi All,
I have created a report with button in one column adding following code to SQL select statement like
SELECT USER_RQST_ID, USER_RQST_DESC, RQST_DATE, STATUS, USER_ID, CNTRY_ID, KPI_LIST, YEAR_LIST, QTR_LIST, MONTH_LIST,
PROD_LIST, FULL_PERIOD_FLG, GEN_DATE, '<input type=button value="view_list" onclick="javascript:doSubmit('||USER_RQST_ID||');">' button FROM KPI_USER_RQST;
Then i have implemet doSubmit() function in Javascript like
function doSubmit(req_id)
html_GetElement('HIDDEN_ITEM')= req_id.value;
Here HIDDEN_ITEM is the name of the item, I want to use that HIDDEN_ITEM value in PL/SQL block like...
BEGIN
INSERT INTO SAMPLE(KEY) VALUES(:HIDDEN_ITEM);
END;
But it is not working, Please help me anybody know the solution How to assign an item in javascript block function.
Thanks,
NeelHello,
doSubmit() is one of the built in javascript functions in apex and it's a bad idea to override it unless you know exactly what you are doing, and even then is a generally bad idea.
change your function to this
function mySubmit(pValue){
$x('HIDDEN_ITEM').value = pValue;
doSubmit();
then your onclick will look like this notice the lack of the javascript: and the three ''' quotes to get the proper quotations for your value.
onclick="mySubmit('''||USER_RQST_ID||''')"
And there you go
Carl -
Assigning the value to a variable
From the front end aplication parameter the following value will be coming
into the SQL Query 'aaaa','bbbb','cccc','ddddd'
Example: Consider The user entering aaaa,bbbb,cccc,dddd four values in one of the filter from the Front end Aplication
i want to pass this value to my Stored Procedure as a Input as 'aaaa,bbbb,cccc,dddd'
So, how to convert the 'aaaa','bbbb','cccc','dddd' to 'aaaa,bbbb,cccc,dddd' format
Thanks in advance.
--Error:
DECLARE @val VARCHAR(max) = NULL
SET @val='aaaa','bbbb','cccc','dddd'
select @val
--Desired OUTPUT
DECLARE @val VARCHAR(max) = NULL
SET @val='aaaa,bbbb,cccc,dddd'
select @val
bala krishnaThanks for your prompt response,
i will be getting input value as below:
DECLARE @val VARCHAR(max) = NULL
SET @val= ''aaaa','bbbb','cccc','dddd''
SELECT @val
SELECT REPLACE(@Val, ''',''', ',')
can you please suggest.
bala krishna
Hi Balakrishna141,
Based on my test,
Vaibhav's solution is correct. I have pass a value 'aaaa','bbbb','ccccc','dddd' from application to database, and use the replace function can give you the correct output.
SELECT REPLACE(@Val,
select * from table
DECLARE @val VARCHAR(max) = NULL
SET @val= (select * from table)
SELECT @val
SELECT REPLACE(@Val, ''',''', ',')
Regards,
Charlie Liao
TechNet Community Support -
How do I assign the value of a Boilerplate Text Object to a Placeholder Column?
I have a Boiler plate File Link. This references a .txt file. I want to generate XML tags for it.
Is it possible to read the content of the file link object into a Placeholder column so that I can get a tag generated for that?Hi Frank,
The key is already passed from a previous page. To set the scene a little, I have three pages:
1. Project list, has a table listing all projects.
2. Drill down to tasks for a project, passing the project key as a page property. This is a master/detail page. This currently works well.
3. Create a new task for the project from page 2. I want to pass the project key obtained from page 1 to page 3 via page 2, so that the user does not have to re-select a project when creating a task.
Here is my registrydef from page 2 (the tasks for a project):
<bc4j:rootAppModuleDef name="ProjectModule"
defFullName="ProjectPackage.ProjectModule"
configName="ProjectModuleLocal"
releaseMode="stateful">
<bc4j:viewObjectDef name="ProjectsVO1">
<bc4j:rowDef name="ProjectRow" autoCreate="false" usesCurrency="true">
<bc4j:propertyKey name="key"/>
</bc4j:rowDef>
</bc4j:viewObjectDef>
<bc4j:viewObjectDef name="TasksVO2" rangeSize="20"/>
</bc4j:rootAppModuleDef>
This works well, I can display the selected project and then list the tasks in a table.
My problem is that in page 2 the project record is not in a table, so I cannot use a table selection mechanism to set the key value in the event which calls page 3 (see my earlier post for this code). As the key that I need is sittng there in the URL as a page property, I want to pass that instead. How to I reference it from within an event?
Does this make sense or is there a better way of doing it? Do I actually need a new page to create a new task - I don't think I can add new records in a table!
Thanks for the tip on ctrl: , I'm slowly getting the hang of the namespace thing.
Steve -
Unable to assign the variable value
Hi,
I am trying to capture the error message into a variable using statement in the Refreshing tab :
Select '<%=odiRef.getPrevStepLog("MESSAGE")%>' from dual
After getting the error log into variable, I am making a call to Scenario which will generate a file and email it stating the error log.
Now the issue is when i assign this variable to the Scenario variable it throws the following error:
com.sunopsis.tools.core.exception.SnpsSimpleMessageException: Invalid parameter
at com.sunopsis.dwg.function.SnpsFunctionBase.getSunopsisApi(SnpsFunctionBase.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execIntegratedFunction(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlS.treatTaskTrt(SnpSessTaskSqlS.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.i(e.java)
at com.sunopsis.dwg.cmd.g.y(g.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Unknown Source)
If i set the variable with any default value, it successfully makes a call to the scenario and generates the file.
Please help!
Thanks,
RitikaHi,
i created a variable and assigned the value to another variable in a procedure, am getting the following error, as it says in the error i don't have any ";" that is causing the problem.
the variable name is table_nm
inside the procedure am assigning the value to lv_table_nm :=#SESSNAME.table_nm;
If i change the variable name tos ome constant or any other value, the package is working fine. Any ideas why am getting error assigning the variable?
6550 : 65000 : java.sql.SQLException: ORA-06550: line 1, column 294:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
( - + case mod new not null <an identifier>
<a double-quoted delimited-identifier> <a bind variable>
continue avg count current exists max min prior sql stddev
sum variance execute forall merge time timestamp interval
date <a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
<an alternatively-quoted string literal with character set specification>
<an alternatively
java.sql.SQLException: ORA-06550: line 1, column 294:
PLS-00103: Encountered the symbol ";" when expecting one of the following: -
How to assign the dynamic value of PV to Sip Header in ICM?
Hi everybody,
I would like to ask your help, please. We are working on Temporary IVR Handoff (ICM+CVP). I need to add/modify a customer Sip header in ICM transfer script. The value for that header is dynamic and stored in the one of ICM Call Peripherial Variables (PV9, for examle).
Is it possible somehow to assign the value of that PV9 to Sip header (Set Variable Call.SipHeader)? I tried to do it but unfortunally without any success. I can assign any static string, but how to assign the value of the PV??? That's the question...
For static string assignment the syntax of the Set Variable Node (Call.SipHeader) looks like that:
"IVR-Handoff~add~It's Cisco"
and it works fine.
For dynamic value (PV9) I tried:
"IVR-Handoff~add~Call.PeripherialVariable9" - it add Call.PeripherialVariable9 as a string, but not it's value;
"IVR-Handoff"~add~Call.PeripherialVariable9 - returns a syntax error;
Call.PeripherialVariable9 - no Sip header is added.
What do you think? Is it doable at all?
Any ideas, answers or examples how to do it would be much appreciated.
Thank you in advance.
Dmitriy.Hi Senthil,
Yes! It works, but with the little difference. The right answer is:
"IVR-Handoff~add~"&Call.PeripherialVariable9
(Call.PeripherialVariable9 is without quotes, otherwise it insert the name of the variable, but not it's value)
The other solution is shown here (thanks to Paul Tindall):
http://developer.cisco.com/web/cvp/forums/-/message_boards/message/15627744?p_p_auth=6psgR8ML
concatenate("IVR-Handoff~add~",Call.PeripherialVariable9)
Thank you so much for the idea! I very appreciate your help and vote you. -
Assigning of values to the charecteristics while doing GR
Dear Gurus
I have created a charecteristic and assigned it to a class of classtype 23 (batch class).I assigned this class to a material.Now while doing GR of this material through TCODE MB1C and movement type 561 the system is giving the automatic batch number.But it is not giving any options for assigning the values for the charecteristic that I have kept in the class.How to assign the value while doing GR ?.I am able to assign the value by going to TCODE MSC2N.
Regards
Sandip SarkarHi Sandip,
One option will be mark all those characteristics as Entry Required in T.code CT04.
So that you will get a warning msg. during GR if value is not maintain.
Msg. No is LB045 and msg is,
The characteristic values for the batch are incomplete.
If required you can convert that warning msg to Error also.
You can do it by using T.code OCHS.
But keep notice that you have to go that Classification tab manually - there is no other option in
Regards,
Dhaval -
How to assign a value to the page variable to enable partial page rendering
This is part of my code:
<bc4j:rootAppModuleScope name="App1"
rendered="on@ctrl:page">
Now, I want to change the value of "on@ctrl:page" to "true" after user click a button so that part of the page will be displayed. But how do I assign the value to "on@ctrl:page". I tried to put the followings in my even handler:
<bc4j:setPageProperty name="on" value="true">
<bc4j:parameter name="on" />
</bc4j:setPageProperty>
But it doesn't work. Could someone pls tell me how I should do it.
Thanks a lot!
LingYou should do is:
in your event handle codes,you add the list:
public static EventResult eventname(
BajaContext context,
Page page,
PageEvent event) throws Throwable
EventResult result = new EventResult(page);
result.setProperty("on","true");//or "false"
return result;
then,
change
rendered="on@ctrl:page" -> data:rendered="on@ctrl:eventResult"
also ,you should see the 5th part of 'UIX Developer's Help' -
Read and assign the highest value
Hi experts
I want to read the highest value of the records in a condition basis for example matnr wise then assign that value to some records.
how to read and assign the value, pls help me out.
Thanks in advance.
regards
Rajaramhi
sort itab by <fildname> descending.
read table itab into wa index 1.
assign wa-fildname to the required records or variables
regards
vijay
reward points if helpful
Maybe you are looking for
-
Ipod color will not show up as a ipod color
I just upgraded from a 3g 15 to a 4g 60gb color. i can connect to OSX most of the time, and i can get my music on there (with out pics). problem is that my itunes on my powerbook does not show anything in the options about photos. i opened itunes in
-
Since dec 07, regardless of firmware, my 8gb zen lcd randomly lights up for half a second and goes off. Same happens when i plug in headphones. Got a silicon skin and pushing buttons is even more annoying. Need to have separate buttons or Meizu style
-
what is the SAP program to extend all material to a new plant Mohan
-
Speaker turns off everytime I answer phone
I have a bluetooth earpiece with A2DP capability (Jabra BT8040). I like to have the sound set to speaker as a default (otherwise you can't hear the phone ring or get notifications) but whenever I use the bluetooth earpiece it automatically sets ALL s
-
I can't update to Yosemite.
I can't update to Yosemite. I keep getting the error that my HD seems is used by time machine. I use time machine on my external harddrive. I'm running on 10.8.5 at the moment.