passing multiple values of the column to a variable in unix
sqlplus -s $USER_ID@$SID/$PWD<<EOF>sql_1.txt set feedback off set heading off select 114032 as c_1 from dual ; EOF for i in `cat sql_1.txt` do sh script_1.sh $i
Currently I am passing a column value to the single unix variable.
How can I pass values of 2 columns
sqlplus -s $USER_ID@$SID/$PWD<<EOF>sql_1.txt set feedback off set heading off select 114032 as c_1 ,sysdate c_2 from dual ; EOF sh script_1.sh $col_1_value $col_2_value
I'm on SUNOS
You can concatenate the columns in SQL by a delimiter, and then use the cut (for example) under Unix to analyze the production line in chips for the script.
Tags: Database
Similar Questions
-
a problem in passing multiple values in the loop settings for
Hi all
I am facing a problem in passing multiple values in the loop settings for.
EX:
CREATE or REPLACE PROCEDURE (pr_id OUT NUMBER) HAVE
tab type is table of NUMBER;
TEMP_TAB TAB;
BEGIN
Select the COLLECT LOOSE pr temp_tab pr_id;
I'm in 1.TEMP_TAB. loop of COUNTING
PR_ID: = temp_tab (i);
end loop;
END TEST;
OUTPUT:-
pr_id = 234578
in the example above, I'm only a value as an out parameter. but I send you PR_ID of the loop.
why I don't get all the values that the parameters.please offer a solution for me.
Thank you my friend.More clarification, let's look at your code...
-- create a procedure and have a single numeric out variable CREATE OR REPLACE PROCEDURE TEST ( pr_id OUT NUMBER ) AS -- declare a type as an array of numbers type tab is table of NUMBER; -- declare a varianble of that array type TEMP_TAB TAB; BEGIN -- query all the values from the table into the array select pr_id BULK COLLECT INTO temp_tab from pr; -- loop through each value in the array for i in 1..TEMP_TAB.COUNT loop -- set the value of the single OUT parameter, OVERWRITING any previous value it has PR_ID := temp_tab(i); -- loop around to the next value end loop; -- end the procedure with the final value of PR_ID END TEST;
-
Passing multiple values at the request of the State (no status page)
Hello
[APEX 4.2.4.00.08 on the 11.2.0.3 database]
I didn't know how to explain briefly what I need in the title of the discussion, that's why I added the song "(non page rapport)". " I met a lot of threads associated with passing of selections multiple values from one page to another, or via a URL from one page to another. I know how to do this. The problem I have right now is trying to pass the commas of the values contained in an application to a report query element. Here's where the "(rapport non page) ' comes into play." I refer to the report query at the level of the application (i.e. shared components-> report queries). I wish really it had another name for it. "Report on the application of queries", perhaps?
In any case, my report query has a bind variable, AI_ID_NUMBERS, that is defined correctly in the shared-> components report queries. However, when this item application has multiple values such that AI_ID_NUMBERS = 4, 5, 6, 7 etc., my URL looks like this:
myapexsite.com/f? p = 456:2:1234567890:PRINT_REPORT = report_1:AI_ID_NUMBERS:4, 5, 6, 7
So, this returns only one record for the report where the identification number is 4, one. I tried a string parameter of Substitution of Application (URL_REPORT_1) with the two following variants (for which both return only a single record):
Substitution string = URL_REPORT_1 and Substitution value = f? p = & APP_ID.:0 : & SESSION. : PRINT_REPORT = report_1:AI_ID_NUMBERS: & AI_ID_NUMBERS.
Substitution string = URL_REPORT_1 and Substitution value = f? p = & APP_ID.:0 : & SESSION. : PRINT_REPORT = report_1:AI_ID_NUMBERS:-& AI_ID_NUMBERS. \
returns...
myapexsite.com/f? p = 456:2:1234567890:PRINT_REPORT = report_1:AI_ID_NUMBERS:4, 5, 6, 7
myapexsite.com/f?p=456:2:1234567890:PRINT_REPORT=report_1:::AI_ID_NUMBERS:\4,5,6,7\
.. .respectively
I really thought that the backslashes would have solved the problem. Any ideas why my report request (PDF) returns only one line?
Thank you
-Seth.
Well, too bad. I realized the mistake I did.
When you work with 'request report queries', there is an option to include variable bind, for example the application or page elements. I had already done that, but for some reason, thought that I also had to pass the parameter and its values in the URL. This is not necessary since the report query query already has the issue of the application/page related to it. The following URL works fine:
myapexsite.com/f? p = 456:2:1234567890:PRINT_REPORT = report_1
And, Yes, it's the URL that is provided when you set up a "application report query. I was thinking too hard.
-Seth.
-
Passing multiple values to the report
Hello
I have a form of parameter. One of the field will have at least one value. When there are multiple values, the values will be separated by a comma and pass on to the State. Please tell me how to separate them and put them in the citation in the report query.
EX: values are: PO, DR
There will be in the where condition as: where code in ('OP', 'DR');
Thank you in advance.
PS. I use 10g
Published by: 945599 on 10 July 2012 14:04Hello
I sent the unit test by mail.
Please note that there are some hardcoded values when you use run_report_object (name of report server and host name).Kind regards
AlexPublished by: AlexDiniasi on 19.07.2012 17:14
-
passing multiple values from the query in the select statement of the procedure
I am collecting IDS to select education agreement from the date of rental values and then I would pass the result of the query in the statement select to get the result.
data type for the contract id is of type varchar and date of rental there is more than one id to contract for most of the time. Help, please. Thank you
CREATE OR REPLACE PROCEDURE abstract_menu (p_letting IN VARCHAR2, p_results OUT SYS_REFCURSOR) IS v_contractId VARCHAR2 (40); SELECT lcontid INTO v_contractId FROM letprop WHERE datestat IS NOT NULL AND letting = p_letting AND letstat <> 'R'; BEGIN OPEN p_results FOR SELECT DISTINCT SUBSTR (l.letting, 3, 2) || '-' || SUBSTR (l.letting, 5, 2) || '-' || SUBSTR (l.letting, 1, 2) lettingdate, l.lcontid contractid, SUBSTR (q.cprojnum, 1, 10) projectnumber, DECODE (TRIM (MIN (j.route)), NULL, 'N/A', TRIM (MIN (j.route))) routenumber, L.DATESTAT statusdate, L.LETSTAT lettingstatus, (q.cdescr) jobdescription, INITCAP (q.clocat1 || q.clocat2) LOCATION FROM vendor v, vendaddr r, letprop l, planhold p, proposal q, project j, propproj k, bidlet bd WHERE v.vendor = r.vendor AND k.contid = q.contid AND k.pcn = j.pcn AND l.lcontid = k.contid AND p.vendor = v.vendor AND l.letting = p.letting AND l.lcontid IN v_contactid "**************This is where I would like to pass the contract id from the above select statement***********'" AND l.CALL = p.CALL AND r.addrnum = p.billto AND bd.letting = l.letting GROUP BY q.cdescr, q.clocat1, q.clocat2, bd.letting, l.letting, l.lcontid, q.cprojnum, L.LETSTAT, L.DATESTAT ORDER BY lettingdate; end;
user9196150 wrote:
AND l.lcontid IN v_contactid ' * this is where I would like to pass the id of the select statement above contract * ""»CREATE OR REPLACE PROCEDURE abstract_menu (p_letting IN VARCHAR2, p_results OUT SYS_REFCURSOR) IS BEGIN OPEN p_results FOR SELECT DISTINCT SUBSTR (l.letting, 3, 2) || '-' || SUBSTR (l.letting, 5, 2) || '-' || SUBSTR (l.letting, 1, 2) lettingdate, l.lcontid contractid, SUBSTR (q.cprojnum, 1, 10) projectnumber, DECODE (TRIM (MIN (j.route)), NULL, 'N/A', TRIM (MIN (j.route))) routenumber, L.DATESTAT statusdate, L.LETSTAT lettingstatus, (q.cdescr) jobdescription, INITCAP (q.clocat1 || q.clocat2) LOCATION FROM vendor v, vendaddr r, letprop l, planhold p, proposal q, project j, propproj k, bidlet bd WHERE v.vendor = r.vendor AND k.contid = q.contid AND k.pcn = j.pcn AND l.lcontid = k.contid AND p.vendor = v.vendor AND l.letting = p.letting AND l.lcontid IN ( SELECT ll.lcontid FROM letprop ll WHERE ll.datestat IS NOT NULL AND ll.letting = p_letting AND ll.letstat 'R' ) AND l.CALL = p.CALL AND r.addrnum = p.billto AND bd.letting = l.letting GROUP BY q.cdescr, q.clocat1, q.clocat2, bd.letting, l.letting, l.lcontid, q.cprojnum, L.LETSTAT, L.DATESTAT ORDER BY lettingdate; end; /
SY.
-
Dynamically by passing the values in the columns
Hi all
I'm trying a pl/sql block that take a string and execute it dynamically. Suppose that here is the string
M_COL: = Q' [(Code_P = > ': DEPTNO', P_CODE_TYPE = > "ÉTAT")]';
Now try to run. using below
M_STR: = 'SELECT CHK_DEPT ' | M_COL | ' FROM EMP WHERE EMPNO = "7499" ';
RUN IMMEDIATELY M_STR
IN M_DATE;
Now what I want is M_STR vairable executed as
SELECT CHK_DEPT (Code_P = > DEPTNO, P_CODE_TYPE = > 'STATE') FROM EMP WHERE EMPNO = '7499'
Instead of
SELECT CHK_DEPT (Code_P = > 'DEPTNO', P_CODE_TYPE = > 'STATE') FROM EMP WHERE EMPNO = '7499'
another other way in the Code_P column DEPTNO value parameter must be passed. Also note that the DEPTNO column in the M_COL string is Dynamic.i.e
M_COL: = Q' [(Code_P = > ': DEPTID', P_CODE_TYPE = > "ÉTAT")]'; OR
M_COL: = Q' [(Code_P = > ': EMP_ID', P_CODE_TYPE = > "ÉTAT")]';
Any suggestions, please share with me.
And also, please don't bother much about the data and the output of function. If I get a way to pass the value of the column in function, my problem is solved.
-
Hello:
How to configure contextual events publish several values of payload?
On click of a button, I'm declaritively publish a contextual event, which works very well when a single value is passed to the event handler.
My event handler method has the signature of:
eventHandler (String)
But now I also have an oracle.jbo.domain.Number, so my new eventHandler looks like this:
eventHandler (Number, String)
How to pass two values during editing of the event and how to place the payload with multiple values for the new eventHandler?
All article or code would be greatly appreciated.
Thanks for the help.You define a bean holding your values and pass an instance of the bean as a payload...
Timo
-
How to use the prompt value in the column of the report
Hello
I have a quick report column which is 'Adj Type' that contains values 10,20,30, and when the user selects Adj Type = 10, this value should be passed on to the column of the report.
For example. Value in column 1 is 10 and this should multiple with the prompt value and production is expected to be 10 * 10.
Ideas how to capture the prompt values in the column of the report for the calculation.Hi hsekar,
(1) declare a presentation online in the section variable set Variable--> Variable--> P_var presentation
(2) in Fx Table_name. Your_column * @{P_Var}
@{P_var} {20} (20 is the default, it replaces when a user selects the value in the command prompt
Thank you
Saichand.v -
I want to pass multiple values method AM controller
Hi all
Can someone tell me please how to pass multiple values of AM method to the controller.
Thank youYou can make use of the ArrayList
In CO
OAApplicationModlue am = pageContext.getApplicationModule(webBean); ArrayList values = (ArrayList) am.invokeMethod("PassArray");
In AM
public ArrayList PassArray { ArrayList values = new ArrayList(); values.add("value") values.trimToSize(); return values; }
Thank you
AJ -
value of the column at a title?
Gurus,
How is a product a report with one of the value of the column indicated on the title?
example:
Funding for the year - 2010 report (2010 is a column value)
I can get a report using the Wizard but am scratching my head on how to implement this year on the title. Can you help or point me to an example? enjoy your time.
SaidouIf the year is passed as a parameter, simply create a field in the margin with respect to this parameter. If you read first the date of the db, so in e trigger BEFORE-REPORT extract the value in a parameter
-
spend multiple values on the interaction of click value
Hi gurus:
I have a requirement where I need to display a report of the first (a table or a PivotTable), with the type Cust_ID, recipes, etc. Cust_id is a unique dimension. Most of the stuff is made.
And then the user wants to select 4 different values of Cust_ID and run another report of detailed comparison of the attributes of these clients.
Now, the solution I proposed one or the other was a copy and paste in the new edition box prompt, or multiple selection on cust_id on new page.
But the 'expert' user interface wants something like boxes to tick next to all ranks and press a button that automatically starts a comparison report.
I know that we can pass a value to the other report using the value interaction. But how I spend 4 different values to the click?
Or is there no other way?
Please help me.
VSorry there not be useful. I think that the solution works and book it that the user needs. Article is that sometimes we spend too much time trying to satisfy a user wants and brings us to spend our valuable time that could be spent more productively. Well...
Good luck, however, Vinay!
-
need to update the value of the column automatically (exists and the new value)
Hello
(1) I Segment1, Segment2, Segment3, Segment4, item_status (new column modified in the Temp table)
Must update the form OFA and the DB Temp table item_status value in the column when I click APPLY to SAVE the Inserted records in the DB table and form and must register the mtl_system_items_b Segment1, Segment2, Segment3, Segment4 in which the condition
Note: need to update automatically item_status for existing and new inserted records in the Table and the form
Serializable[] param = {Segment1, Segment2, Segment3, Segment4 }; am.invokeMethod("InsertRecord", param); row.setAttribute("SelectFlag", "N");
Thank you
Renon,
When you write code, try to understand what makes each line. (If you don't understand all the lines, feel free to ask)
row.setAttribute ("ItemStatus", row.getAttribute ("ItemStatus"));
What do you think that the above line done? You try to get the value of the attribute and trying to put the same value. How is it, that will have an impact?
You need to do 2 things.
1. change the insertRecord method and the State of return of this method.
Change the definition of the function:
public String InsertRecord (String itemstyle, String itemcust, String itemsize, String itemcolor, String ordrno,
String desc)
Add a return statement at the end after validation.
TR.Commit ();
return the situation;
}
2 accept that status in CO and set the value to the attribute details VO.
String status = (String)am.invokeMethod ("InsertRecord", param);
row.setAttribute ("ItemStatus",status);
I hope this helps.
See you soon
AJ
-
update line and reset the value of the column
I have table (CORS_MTR) with 3 columns...
SEQ ID of the EPR the ID of the child / / desc 100 22 1 one 101 22 2 two new entry as 1 number , that means change the flow of child #
102 22 3 three When I enter the new line in number of children 1 instead of 2 and then the values of the column (child id, desc) another need to be reset as...
SEQ ID of the EPR the ID of the child / / desc 100 22 2 two 101 22 1 one 102 22 3 three 103 22 4 four SEQ PRT_ID CHILD_ID DESC_ 100 22 1 one 101 22 2 two 102 22 3 three declare
number of p_seq: = 103;
number of p_prt_id: = 22;
number of p_child_id: = 1;
p_desc varchar2 (25): = 'a ';
Start
Update cors_mtr
set seq = case when child_id = p_child_id
then seq + 1
other seq - 1
end
where prt_id = p_prt_id
and child_id (p_child_id, p_child_id + 1);
insert into cors_mtr (seq, prt_id)
values(p_seq,p_prt_id);
Update cors_mtr
Set child_id = (select max (child_id) + 1 of the cors_mtr).
desc_ = (select to_char (to_date (max (child_id) + 1, 'J'), 'jsp') of cors_mtr)
where child_id is null.
end;
SEQ PRT_ID CHILD_ID DESC_ 100 22 2 two 101 22 1 one 102 22 3 three 103 22 4 four Concerning
Etbin
-
Change quick values to 'ALL' of 'all values in the column.
HelloI want to change the 'all values in the column' value for 'all' in the quick view of dashboard.
I went to the location following: < MW_HOME > / Oracle_BI1/bifoundation/web/msgdb/l_en/messages /.
But I am unable to determine which xml file to be changed.
Help, please.
Just in case where to check Srinivasan Software Solutions Pvt.Ltd.: [OBIEE 11 g] customization invites "All THE values in column" Custom value
-
How to display the value of the column
Oracle 10g on Linux
I want to display the value of the id column in the table of www if count (distinct id) is 1. The following query is fine except that it does not display the value of the column ID help, please.
SELECT count(distinct id) FROM www c WHERE C.x_code IN (SELECT D.x_code FROM www_app d WHERE d.y_code = '1151299386') having count(distinct id) = 1
I think you can use MAX in this case
SELECT max(id) FROM www c WHERE C.x_code IN (SELECT D.x_code FROM www_app d WHERE d.y_code = '1151299386') having count(distinct id) = 1
Maybe you are looking for
-
I followed each step that I could find on the Apple Web site. The PC recognizes the iPad iPad wonder to trust the PC and I do it, but iTunes does not show the iPad and the Device Manager doesn't show anything Apple. I even uninstalled, to alreay redo
-
Contacts E-mail only automatically add to Contacts from the Exchange (Office 365)
Don't know if anyone else has this annoying problem... Something is create new E-mail contacts only in my 'Exchange' directory of contacts OSX. They do not appear in the 'Contacts' Exchange directory (I use Office 365 for enterprises). They seem to h
-
Well, 1st of all... Hello. Second... If you take it easy on me please... I am new to Mac but not new for iPhones. I have an old 4 I used to keep an eyeout on my 9 year old... I just got my mac and started having all loaded profiles and today there is
-
I have an asus p4p800 phones and I can't seen, find a download for an audio device. I have the cd that came with the motherboard to install it, but he says that he doesn't support Windows Vista. any ideas?
-
iTunes.exe - system error
Every time my computer starts the following box appears "iTunes.exe - error system, the program cannot start because MSVCR80.dll is missing on your computer. Try reinstalling the program to fix this problem. I tried reinstalling iTunes but it always