How to accept multiple input values using plsql
I am in a process of design of a small tool. The tool must accept several input values. I know that this can be done using sql.But nothing, I can enter multiple values using the loop in the loop would be carried out according to the number of times a user wants to enter the values.
It is also very good, if I can accept all the values at once and some how to analyze!
SQL> set serverout on
SQL> accept strings prompt 'input strings (comma separated):'
input strings (comma separated):abcd,xyz,massimo,this,is,a,string
SQL> declare
2 s varchar2(32000):='&strings';
3 begin
4 for r in (select regexp_substr(s,'[^,]+',1,level) str
5 from dual
6 connect by level <= length(s)-length(replace(s,',',''))+1) loop
7 dbms_output.put_line(r.str);
8 end loop;
9 end;
10 /
old 2: s varchar2(32000):='&strings';
new 2: s varchar2(32000):='abcd,xyz,massimo,this,is,a,string';
abcd
xyz
massimo
this
is
a
string
PL/SQL procedure successfully completed.
Max
http://oracleitalia.WordPress.com
Tags: Database
Similar Questions
-
set the input value using a workflow setting?
Jdev 11... 2
I have a taskflow browse master / detail that called the edict taskflow passing parameters to a router that will either modify it or create method for the detail record (change/create master is in a different position). I can successfully modify/create the main form and I can change/create the detailed form, but I didn't understand how to set the input value for the agency_Id (of the master) in detail. I control data binding to create my detail record 'create', and I have a task flow parameter that has the agency_id I want as the default value in the detail. I don't know where to put the input value. I tried to add another method to the method call that has her 'create' binding for retail, but it seems that I can have only a single method. Do I need another method call to set it? Or should I do something programmatically? (I'm Javaless, so hopefully I can do declaratively).
Thanks much for any help. If I can figure out how to make this piece, I'll have the beginning of an application that does something useful.
LBHello
There is a new Createmethos called 'create with Params' that you can use for this.
http://www.Oracle.com/technology/products/jdev/tips/fnimphius/createWithParameters/createWithParameters.html
Simply plug the parameter to the variable of pageFlowScope containing the input parameter
Frank
-
How to give an input value to operate what split of DOD proc table?
Hi all
Here's the function (function str2tbl)
used to split the string table (for example: "1,2,3,4") in a single string.
This function uses the array of strings (which should be split) as an input (like 'p_str IN varchar2') parameter.
I would like to divide the array of strings that I'm generating by a procedure called 'proc1 '.
In this procedure, the array of result of channels are stroed in a parameter called "my_str" (like my_str: = "1,2,3,4").
How could I use the values in this function?
I could mention as "proc1.my_str" as an input to this function?
Another question, once my function returns the values as
Column1
-----------
1
2
3
4
How do I pass this value to .NET?
Thanks in advancecreate or replace function str2tbl ( p_str in varchar2, p_delim in varchar2 default ',' ) return str2tblType as l_str long default p_str || p_delim; l_n number; l_data str2tblType := str2tblType(); begin loop l_n := instr( l_str, p_delim ); exit when (nvl(l_n,0) = 0); l_data.extend; l_data(l_data.count) := ltrim(rtrim(substr(l_str,1,l_n-1))); l_str := substr( l_str, l_n+1 ); end loop; return l_data; end;
Published by: user10641405 on June 9, 2009 08:46Could not get into too much detail. Have no database here.
loop of the table referring to the procedure.
Declare type str is table of varchar2(4000) index by binary_integer; my_str str; arr_str is table of str2tblType%type index by binary_integer; begin my_str := proc_used(); for i in my_str.first..my_str.last loop arr_str(i):=str2tbl(my_str); end loop; exception block here ...... end;
OK let me explain.
you have this array of strings coming out of the procedure that will my_str.
Then see the for loop. We are looping through this channel and passing the values to the function.
the data type arr_str is array of arrays.
We put the berries coming out of the service in arr_str.so.
arr_str (1) will have a table that is the result of function set (my_str (1));
arr_str (2) will have a table that is the result of function set (my_str (2));If you need to pass these berries to .NET you loop through arr_str as we did for my_string and pass an array at a time.
Kind regards
G.
-
How to consume the web service using PLSQL in 11g
Hello
I created a site using jDeveloper, web services which when I put in the web browser and press enter, it will display the settings screen and when I pass the value for the parameter, and then it displays the output of the XML returned by the PL/SQL (called in the Web Service) package. Now, I want to call this webservice in PL/SQL and read XML data and fill in the staging table. Can anyone suggest me how to achieve this functionality by using Oracle PL/SQL
I use the database 11g and jDeveloper Version :-Studio Edition version 10.1.3.0
Thank you very much in advance.
Vijay
The WSDL file describes the web service.
To obtain the WSDL, you enter the URL of the web service and add some ? WSDL to the URL. This indicates the web service to return to its definition.
For example
URL of the Web Service: http://wsf.cdyne.com/WeatherWS/Weather.asmx
WSDL URL: http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL
When you read (using 'web browser' UTL_HTTPpackage) the XML response from the web service, read as strings (PL/SQL varchar2, size 32 K max).
You should read the answer as the strings, then writing/writeappend these channels in a CLOB (using the DBMS_LOB package). If you are VERY sure that the web service call ALWAYS returns an XML of less than 32 k, you can skip using a CLOB.
Whatever it is, read you the response from the web service in the form of text (such as plain text, it is what is sent). The next step on your part is to parse text into an XML DOM (document object model) - and storing the DOM in an Oracle XmlType variable.
When in a DOM, you can use Oracle XML functions to extract the attributes and values of the key element of the response from the web service.
-
How to read the xml value in plsql store proc
I need to read the value at the bottom of the xml script in plsql procedure. I do not understand how to write. I'm new in xml, please help me solve this problem.
<? XML version = "1.0" encoding = "UTF-8"? >
< PrtyActDtlRequest >
< AcctInfo >
< > 84188 PartyID < / PartyID >
< RelAcctID > 125148 < / RelAcctID >
< RelAcctID > 251486 < / RelAcctID >
< RelAcctID > 125147 < / RelAcctID >
< RelAcctID > 125511 < / RelAcctID >
< / AcctInfo >
< / PrtyActDtlRequest >Here < AcctId > can be repeted n times (unbouinded), but < PartyID > is set once. This is the script that we will get out of the source system.
Thanks in advance.
Roy
You needn't PL/SQL for it. Just use XMLTABLE:
with t as)
Select xmltype (')
double x)84188 125148 251486 125147 125511 Select PartyID,
RelAcctID
t,.
XMLTable)
' / PrtyActDtlRequest/AcctInfo.
go x
columns
PartyID path number "PartyID,
Path RelAcctIDXml xmltype "RelAcctID."
),
XMLTable)
'RelAcctID '.
by the way RelAcctIDXml
columns
RelAcctID path number ' / RelAcctID'
)
/
PARTYID RELACCTID
---------- ----------
84188 125148
84188 251486
84188 125147
84188 125511SY.
-
How to add multiple fields values
I think it's simple, but I don't see how. I have 5 or 6 entered by the user different market values that I need to calculate a total for.
Example of
1 cleaning $10.00 fee
2 deposit $10.00
3 company $10.00 deposit
4 total amount of the rent $70.00
5 total $100.00
If a user would enter values for 1-4 and it calculates the total in zone 5. If we assume that $0.00, it would be great if a user left an empty field. I'm leaving the script somehow, but looking for a little guidance? Thank you all...
Greetings,
Place it inside the event, calculate the total by using FormCal field option
yourfieldname + yourfieldname + yourfieldname + yourfieldname
Here is a link to a form that contains an example of adding:
http://www.shingleme.com/AdditionTest.PDF
Justin
-
How to disable the input fields using backing bean
Hi all
I use jdev10g ADF. can someone help me how to disable all fields on a page by clicking on a button?
I say 10 fields and a read only field that has a value of default db 'Pending'. I have a button that, when I click, I disable all the other fields and change the value of the field read-only 'closed '.
How can I do this method of bean pressing button?
Thanks for any idea
PreetiYou need not to do this a bean of support. Instead on the components that you want to disable write an EL expression for the disabled attribute something like this:
#{bindings.yourfield.inputValue == "CLOSED"}
CM.
-
How to capture multiple line String using regular expressions?
Hello
I have a simple program like this:
What I want to accomplish is to capture everything between > start and > to end with a single regular expression matching node. It seems that the definition of multiples? true or False does not help.
I'm using LabVIEW 2012.
If it is impossible to capture using a single node, that's fine. But I want to assure you that I can make full use of this node without combining several others.
Thank you!
> start([\w\s]*) > end
A point matches any character except line break characters. You have two of them.
-
How to keep the input value after click on the back button being the ADF
Hi expert,
I have a case currently the adf:
1. I put 'value' in the Label 1
2. I click on the next button
3. I click on the "back" button
4. the 'value' went from 1 label.
How to keep the 'value' of 1 tag after I click back, do you have any suggestions?
Kind regards
Ricky
Hello
Where you store the value? Try to store it in a variable pageFlowScope or a property of the pageFlowScope bean.
value = "#{pageFlowScope.testVar} '"
value = "#{pageFlowScope.testBean.testVar} '"
Kind regards
Ruben.
-
How to display multiple prompt values selected in the report
Hello
I have a LOV: SELECT DISTINCT CO. V_MOVEMENT. ORIGIN_BRANCH_CODE CO. V_MOVEMENT ORDER BY 1
and a setting associated with it, which is the selection of several permitted. The name of the parameter is P_BRANCH.
When I view P_BRANCH the top of my report (RTF), it is showing only one value, while I need to display all the selected values like separated by commas.
Help, please.
Thank you and best regards,
AntaraUse this:
,
Thank you
Bipuser -
How to upgrade a characteristic value using a business service
Hello
I have a requirement like updating a characterstic value
in the BCC point of service on the sp tab menu page / his, I want to update the characteristic value
to do this, I wrote a service business with action update
< schema pageAction = "Refresh" >
< mapField spid = "SP_ID" / >
< termpol1 type = mapList "list" = "SA_SP" >
< said mapField = "SA_ID" / >
< use mapField = "USAGE_FLG" / >
< by mapField = "USE_PCT" / >
< stdt mapField = default="%CurrentDateTime"/ "START_DTTM" >
< process2 type = mapList "list" = "SA_SP_CHAR" >
< charcode mapField = "CHAR_TYPE_CD" / >
< charval mapField = "CHAR_VAL" / >
< adhocvalue mapField = "ADHOC_CHAR_VAL" / >
< efdt mapField = default="%CurrentDate"/ "EFFDT" >
< / process2 >
< / termpol1 >
< / schema >
Now I've called business with these values
< servicepointinboundservice >
< spid > 3056588968 < / spid >
< termpol1 >
< a > 4267317182 < / said >
< sa1 / >
< > 100 < / a >
< process2 >
< sa2 / >
< charcode > ADJFACTR < / charcode >
< charval > < / charval >
< adhocvalue > 125 < / adhocvalue >
< / process2 >
< / termpol1 >
< / servicepointinboundservice >
After the service, I get an error like
its 42783492384 may not be related to Ms twice for the overlap of the effective periods
Just trying to update the value of the tank with a new value, but this service is trying to create a new service point service contract
What I am doing wrong?
I used the basic CILCSPPP (servicepoint) business service
Is there another way update the charvalue linked to sp / his page?
Thanks a lot guys.Hi Shankar,
When you work with the list item for the creation of list or tank.
01. the first step is to create a list
go '1361220696' ' CM_DC_SP9/termpol1/process2 + / saspid ';
02. then check the each item with their index as a value below
move "2011-05-14' to ' CM_DC_SP9/termpol1/process2 [0] / efdt"; "Create a new Instance of the list appearing in the help page of Script
Now the values will be moved to the list, then you can update/add the tank to the entity.
-
How to capture the input value of text by the user in a popup page search LOV?
I need to capture the user entry in the LOV search page. I added a controller in the LOV region, and the speed is also work, but I have to hold the entry to search for in the contextual search page. Also do you know what the text entry id "keyword"? then I can try store the value in LICS of the Commander.
Hello
Why do you need to write code in LICS?
You have the user type field in your query of Lov VO (then only you had created search are they allowed in Lov research/item of type user), I proposed is just changes to sql to check if the user type is vendor and caters fields null., something like below for each address field:
, DECODE (user_type, "PROVIDER", NULL,
) address_field1 You should always share full details, including related sql code and xml on your question to avoid all these discussions back
Kind regards
Sandeep M.
-
Hi ther,.
Ive been away from Livecucle for quite awhile and I lost a handle on coding.
I am tyring to get the data from that paid to be repeated also in two other areas with different formatting (in capital letters and capatilise each word)
Therefore, if the user enters "james smith michael" in a named filed - say - fullanme - she could also be replicated in a fullnameCaps file - changed to uppercase in this area (i.e: JAMES MICHAEL SMITH) and - class fullnameCapsEach get out of James Michael Smith
the other fields will be just hidden.
I remembered hot change the entry to the ceilings in the entry field - xfa.event.change = xfa.event.change.toUpperCase () - but that only works in the entry field of course.
I tried to set the fullnameCaps and the fullnameCapsEach to equal the rawvalue of the entry fullanme field and put the code of change in them - but that doesn't seem to be the answer!
Someone out there you have nay of ideas?
see you soon
Hello
Try this solution in the event of change of your input field:
var str = xfa.event.newText, capsAll, capsFirst; capsAll = str.toUpperCase(); capsFirst = str.toLowerCase().replace(/([^a-z]|^)([a-z])(?=[a-z]{1})/g, function(_, g1, g2) { return g1 + g2.toUpperCase(); }); fullnameCaps.rawValue = capsAll; fullnameCapsEach.rawValue = capsFirst;
-
Hello
I got the table of database like this
ID start_date End_date
1 9/26 / 2009 10/2/2009
2 10/16/2010-10/22/2010
3 10/23/2010-29/10/2010
4 10/30/2010-11/5 / 2010Here's the scenario. When user selects as 26/09/2009 start_date and End_date as 05/11/2010,then I need to get ID (1,2,3,4) values.
I tried a different way and not be able to achieve this, can someone help me in this.
Thank you
Yes, it can be an elegant solution to the problem of old age 'date' ;-) Although you shouldn't have it on the side of startDate. Your createODBCDate should take care of things.
That is to say
WHERE the arguments start_date > = #CreateODBCDate (form.startDate) #.
AND end_date<>
WHERE the arguments start_date > = 26/09/2009 12:00:00 AM
AND end_date 2010-11-06 12:00:00 AM
-
List of input values (multi-column) must return the output text once the value is selected
Hello
I am trying to achieve conditional:
I create a searchVO(select '' empNumber from dual) - to accept the input value (name empNumber).
I create empLovVO (select enum,ename, addr, city of emp). lov attached to empNumber (searchVO).
In the list of values when I select a value (emp 1, a, xyz, abc), it must return the default aby associated with emp values 1 to my output texts
the name of the EMP one.
addr xyz
City abc
It should also automatically change the values if I select another empNumber.
Please let me know how to achieve this.
Thank youFirstly, for the searchVO, add a three other attributes, name, address, and City, the type of string:
and make sure they are still editable:
Then, you're mapped LOV enum attribute EmpNumber, right?
Do similar for the newly created attributes, in the list of values dialog box validation:
Ename--> name,
--> addr addr,
City--> City
Then, just to show these attributes in the form of output text, and you'll get what you want...
Maybe you are looking for
-
If I reset mozilla firefox, it deletes I'v written stories?
I used to use aol, but it has been infected. I switched to mozilla several months ago. My computer just switched back to aol. The instructions to reset, list of things that remain. I guess that the stories I wrote are included - BUT IT does not SAY T
-
convert labview 5 vo to labview 2009
Hello I want to use a file from labview 5.0 vi in labview 2009. Is there a way to do this? The file is associated. Thank you.
-
Original title: taskbar I have XP Pro 32 bit. On the takbar at the time wherever I have only a few visible icons when I go to customize, I find all these other icons of the past. Is any way to remove them?Click taskbar, go into customize past points.
-
I have Windows Vista Home Premium SP2 and the type of system is the 32-bit operating system. I just installed IE 9 and things are fine. I do not understand why I am receiving updates of Windows for versions of base 86 & 64 marked important. (examples
-
BlackBerry Passport its taking long for battery charger
Why passport would take these long time to load the full battery?