How to get the result
Hi allLet me explain my requirment.
I created a custom workflow where the order goes to the approver for counterpart he can accept or reject that.
If the notification that the approver receives have a result with approve and reject values. The notification activity, I've written a procedure that will update the database columns that are based on the result.
But how do we get this result value
I need something like below
x_result: result of get value =
If x_result = "Approve" then
Update of table with approved status
on the other
Update of table with the status rejected
Kind regards
Kumar.
Use the RESULT attribute
x_result: = Wf_Notification.GetAttrText (
Tags: Database
Similar Questions
-
How to get the result of the query?
I'm looking to get output something like this...
If a profile exists on the Pb, I need Exists in the colum
PROFILE_A EXISTS
PROFILE_B DOES NOT EXIST
PROFILE_C EXISTS
Select distinct profile
decode (profile, "PASSWORD_PROFILE", "EXISTS", 'THERE is NO') 'STATUS '.
of dba_profiles;
How to get the above result? Anyone?
In the first query, you can add any profile you want to check, and then try the below
WITH qry1 AS (SELECT profile 'PROFILE_A' FROM dual
UNION ALL
SELECT "PROFILE_B" FROM double
UNION ALL
SELECT 'DEFAULT' double)
SELECT the profile
CASE WHEN EXISTS (SELECT 1 FROM dba_profiles dp
WHERE dp.profile = q1.profile)
THEN "EXISTS."
OTHERWISE "NOT EXIST".
The END as status
OF qry1 q1;
OUTPUT:-
-------------
SQL > WITH qry1 AS (SELECT profile 'PROFILE_A' FROM dual
2. ANY TRADE UNION
3. SELECT 'PROFILE_B' FROM dual
4 UNION ALL
5. SELECT 'DEFAULT' double)
6. SELECT profile,
7 CASE WHEN EXISTS (SELECT 1 FROM dba_profiles dp
8 WHERE dp.profile = q1.profile)
9 THEN 'EXISTS '.
10. OTHERWISE "NOT EXIST".
11 FINISSENT AS status
Qry1 q1 12;
PROFILE STATUS
--------- ----------
PROFILE_A DOES NOT EXIST
PROFILE_B DOES NOT EXIST
DEFAULT VALUE IS
-
How to get the results of the UK instead of the default USA?
I live in the United Kingdom and would like to be able to search for UK results. for example, Amazon UK results when I search a product, etc.
with the option of a search in the world so I don't get the results I wantTo add plugins to search for sites such as Amazon.co.UK and Google.co.uk to Firefox, open this page in Firefox and then search or click the sites that interest you: http://mycroft.mozdev.org/
When you click on one of the listed search plugins, Firefox will ask you if you want to install it.
After that, you can open the Firefox Add-ons Manager and click on disable one of the search engine integrated you want to use.
-
How to get the result of the test of CVI DLLs in teststand!
I write a driver dll to test a source, I want to get the tension of world SERVERS (the instrument of the RS) and I used to call DLLs that written by CVI, teststand
My question is what is the best way I can get the result of the test and show the user to teststand. the code below is fair? When I used to call this dll document, teststand
"" I just get the result by setting in TS.this is a good meathod, and what should you do in teststand, I put the "outputVoltageV" point to an object?
/*===========================================================================*/
/ * Function: read voltage/current output * /.
/ * End: this function returns the output and actual output voltage * /.
/ * current instrument. */
/*===========================================================================*/
ViStatus _VI_FUNC rsngsm_datReadOutput (ViSession instrSession,
ViPReal64 outputVoltageV, ViPReal64 outputCurrentA, ViPBoolean statusPeakCurrent)
{
ViStatus rsngsm_status = VI_SUCCESS;
Bruno buf [BUFFER_SIZE];
ViInt32 retCnt;
FMT (buf, "%s<>
If ((rsngsm_status = viWrite (instrSession, buf, NumFmtdBytes (), & retCnt))<>
Return rsngsm_status;
If ((rsngsm_status = viRead (instrSession, buf, 50, & retCnt))<>
Return rsngsm_status;
If (Scan (buf, "%s > %f [p2];")) %f [p2]; %i [b2] ", outputVoltageV, outputCurrentA, statusPeakCurrent). = 3)
Return rsngsm_status;
Return rsngsm_status;
}sean_tan,
Yes, you just pass a value of digital TestStand (e.g.; locals.number).
If you use the adapter of the ICB, it might make more sense that you can use the Flexible DLL adapter for this type of function, that you do not use the standard settings of tTestData and tTestError. While TestStand will correctly recognize the function prototype, you want to make sure you that include the type library of your function Panel (you will need to create one if you have not already done so) in settings target of LabWindows / CVI-> type library.
I hope this helps.
-Jack
-
How to get the result of the assessment?
According to Adobe Captivate online help, "use the assessment mode when you want to test how the user has understood a procedure. You can set a score for every correct click. "
But how the person who makes the assessment of the result (score/percentage) GET?
Go to the Quiz settings and select the option to show the Score at the end of the Quiz.
A new Quiz results slide is added at the end of your quiz so that learners can see their quiz results.
-
Not sure how to get the result that I need.
Hi all
I'm not a very good programmer, but I'm learning so please bear with me.
My problem is that I need to be able to create a page that we can imput two dates and get all the items in our database which are equal or between imputted dates and be sent to the page.
The part of sql is not my problem, but I'm not sure on how to create the page with in the date boxes.
As it is now I have created the page, but it is retreving all elements of my table and comes it a grid of smiple and the output how many entries table for this is manageable.
So, if someone can help me or point me in the right direction that would be great.
Thnaks
Pat
Basis of a form.
Basis of a SQL clause
SELECT aField,bField,cField FROM aTable WHERE aDateField BETWEEN AND There is much for you to learn and understand to make a function and a business page. But you should get at least close to return results.
-
How to get the result on the same page
How to capture the data entered by the user on the page and fill in the result.
for example: -.
Data: -.
fieldA = abc
fielsb = efg
Feildc = SMC
result = abc-efg-chd
I intend to write this logic in controller...
If one of you having same logic please give me... Thanks a lot guys!
Edited by: user11929230 (Pavan) October 14, 2009 08:46Pavan,
I take a simple example, I hope it's clear your doubts.
In Jdev create 3 new MessageTextInput with VO no attribute.
Let's say it would be item1 and item2, item3
And if I click on save button I want to concatenate the value of item1 and item2 in item3. As A and B in item3 in so AB
Now in the ProcessFormRequest controller I'll write.
If (pageContext.getParameter ('save')! = null)
{
String a = pageContext.getParameter ("item1"); Item1 here is the Id of the item that you created in JDEV
String b = pageContext.getParameter ("item2");Txt OAMessageTextInputBean = (OAMessageTextInputBean) webBean.findChildRecursive ("item3");
txt.setText(pageContext,a+"-"+b);
}Thank you
-Anil -
How to get the result of these data
Hi all
I have a following data. And I need the output as follows.
If one of the Intr_num is missing so I need the output to be formatted the next row.
I tried this using the row_number() but could not able to achieve the result. Is there any other function or analysis features to use.
with t as ( select 10001 id, 5004 Intr_num from dual union all select 10002,5005 from dual union all select 10003,5006 from dual union all select 10004,5007 from dual union all select 10006,5009 from dual union all select 10007,5010 from dual union all select 10010,5013 from dual union all select 10011,5014 from dual union all select 10012,5015 from dual union all select 10013,5016 from dual union all ) select * from t; OUTPUT: Intr_num 5004 - 5007 5009 - 5010 5013 - 5016
Kind regards
SID
Hello
ROW_NUMBER is the right function to use:
WITH got_dif AS
(
SELECT intr_num
, intr_num - ROW_NUMBER () OVER (ORDER BY intr_num) AS dif
T
-WHERE... - If you need any filtering, put it here
)
SELECT MIN (intr_num) | ' - '
|| MAX (intr_num) AS intr_num_range
OF got_dif
GROUP BY dif
ORDER BY dif
;
-
How to get the result of a single line in several columns
I have a scenario where I asked five different columns in a table and it would still look back one line.
So, for example: the query would be
So, this would mean 1 row with the value of their respective areas.Select user1, user2, user3, user4 from table1 where tblkey= 2
In my code, I have a common function I can call to send an email to the list of people (User1, User2, user3, user4).
So rather than call this function each time for each user, is there a way I can display the output to 4 different rows and use the loop For to call this function only once.
In this way, the loop For running 4 times (if not nulls for all users) and call this function of e-mail.
Really, I'd appreciate if someone could give me an idea of this scenario.
Thank you
ARIf the number of columns is fixed you may be able to use this:
SELECT DECODE ( RN , 1,USER1 , 2,USER2 , 3,USER3 , 4,USER4 ) AS USERS FROM TABLE1 CROSS JOIN (SELECT ROWNUM RN FROM DUAL CONNECT BY ROWNUM <= 4) WHERE TBLKEY = 2
This UN-pivot results.
Here's an example of it in action:
SQL> CREATE TABLE TABLE1 2 ( 3 TBLKEY NUMBER 4 , USER1 VARCHAR2(1) 5 , USER2 VARCHAR2(1) 6 , USER3 VARCHAR2(1) 7 , USER4 VARCHAR2(1) 8 ); Table created. SQL> INSERT INTO TABLE1 2 SELECT ROWNUM 3 , SUBSTR(OBJECT_NAME,1,1) 4 , SUBSTR(OBJECT_NAME,2,1) 5 , SUBSTR(OBJECT_NAME,3,1) 6 , SUBSTR(OBJECT_NAME,4,1) 7 FROM ALL_OBJECTS 8 WHERE ROWNUM <= 10; 10 rows created. SQL> SELECT * FROM TABLE1 WHERE TBLKEY = 2; TBLKEY USER1 USER2 USER3 USER4 -------------------- ---------- ---------- ---------- ---------- 2 I _ U S SQL> SELECT DECODE 2 ( 3 RN 4 , 1,USER1 5 , 2,USER2 6 , 3,USER3 7 , 4,USER4 8 ) AS USERS 9 FROM TABLE1 10 CROSS JOIN (SELECT ROWNUM RN FROM DUAL CONNECT BY ROWNUM <= 4) 11 WHERE TBLKEY = 2 12 / USERS ------------------------- I _ U S
HTH!
Published by: Centinul on February 24, 2010 11:21
-
How to get the result using this query?
Hi using iam under query,
WITH CTE (SNO, ID, PNT)
AS
(SELECT ROWNUM as SNO, TRANS_ID, VCN_NO OF)
SELECT V.TRANS_ID, V.VCN_NO IN VSL_MOVES V
WHERE V.END_TIME > = TRUNC (TO_DATE (: pStartDate, ' dd/MM/yy HH24')) AND V.END_TIME < = TRUNC (TO_DATE (: pEndDate, ' dd/MM/yy HH24'))
AND V.MOVEMENT_TYPE_CODE NOT IN ORDER ("ATA") OF V.VCN_NO, V.END_TIME))
SELECT ROWNUM as SNO, TAB. VESSEL_NAME, TAB. FLAG, TAB. IMO_NO, TAB. ARRIVED_DATE, TAB. F_ROM,
NVL ((SELECT CASE WHEN VMS. MOVEMENT_TYPE_CODE = 'ATS' THEN (SELECT TO_CHAR (NBV. ATD, "DD/MM/YYYY HH24") OF PNTS WHERE NBV. DOC_NO = TAB. VCN_NO AND ROWNUM < = 1) WHEN VMS. MOVEMENT_TYPE_CODE = 'ATB' THEN (SELECT TO_CHAR (VBU. BRTH_ALL_FAST, "DD/MM/YYYY HH24") OF VSL_BERTH_UNBERTH VBU WHERE VBU. BERTH_TRANS_ID = VMS. TRANS_ID AND ROWNUM < = 1) END ELSE NULL VSL_MOVES VMS WHERE VMS. TRANS_ID = TAB. (T_ID),'-') Sailed_Date,.
NVL ((SELECT CASE WHEN VMS. MOVEMENT_TYPE_CODE = 'ATS' THEN (SELECT P.PORT_NAME OF RRS, PORT_MASTER P WHERE P.PORT_CODE = PNT. VSL_NXT_PRT_CALL AND PNT. DOC_NO = TAB. VCN_NO) WHEN VMS. MOVEMENT_TYPE_CODE = 'ATB' THEN (SELECT CASE WHEN VBU. BERTH_CODE LIKE "% VOPK" AND THEN "VOPAK" WHAT VBU. BERTH_CODE AS "VSPM %" THEN "VOPAK" ELSE "POF" VBU VSL_BERTH_UNBERTH END WHERE VBU. BERTH_TRANS_ID = VMS. TRANS_ID AND ROWNUM < = 1) END ELSE NULL VSL_MOVES VMS WHERE VMS. TRANS_ID = TAB. (T_ID), "-") DESTINATION
DE)
SELECT
VM. TRANS_ID,
VM. VCN_NO,
VM. MOVEMENT_TYPE_CODE,
(SELECT PNT. VSL_NAME OF PNTS WHERE NBV. DOC_NO = VM. VCN_NO AND ROWNUM < = 1) VESSEL_NAME;
(SELECT C.COUNTRY_NAME OF COUNTRY C, VESSEL_MASTER M WHERE C.COUNTRY_CODE = M.FLAG AND M.VSL_CODE = VM. VSL_CODE AND ROWNUM < = 1) AS FLAG,.
(SELECT M.VSL_IMO_NO FROM VESSEL_MASTER M WHERE M.VSL_CODE = VM. VSL_CODE AND ROWNUM < = 1) IMO_NO;
TO_CHAR (VM. END_TIME, "DD/MM/YYYY HH24") ARRIVED_DATE,.
WHEN VM BOX. MOVEMENT_TYPE_CODE = 'STA' THEN (SELECT P.PORT_NAME FROM RRS, PORT_MASTER P WHERE P.PORT_CODE = PNT. LST_PORT_CALL AND PNT. DOC_NO = VM. VCN_NO AND ROWNUM < = 1) WHEN VM. MOVEMENT_TYPE_CODE = 'UTA' THEN (SELECT VB. VSL_BERTH_UNBERTH VB BERTH_CODE WHERE VB. UNBERTH_TRANS_ID = VM. TRANS_ID AND ROWNUM < = 1) END F_ROM.
--(SELECT T2.ID DELE DE CTE T1 JOIN CTE T2 SUR T1.) SNO = T2. SNO + 1 WHERE T1.ID = VM. TRANS_ID AND T1. NBV = VM. VCN_NO AND T2. NBV = VM. ATD VCN_NO)
(SELECT T1.ID CTE T1 WHERE SNO = (SELECT T2. SNO + 1 ETC T2 WHERE T2.ID = VM. TRANS_ID AND T2. NBV = VM. T_ID VCN_NO))
OF VSL_MOVES VM
WHERE (VM. End_time > = TRUNC (TO_DATE (: pStartDate, ' dd/MM/yy HH24')) AND VM. End_time < = TRUNC (TO_DATE (: pEndDate, ' dd/MM/yy HH24')) or
((CASE WHEN VMS. MOVEMENT_TYPE_CODE = 'ATS' THEN (SELECT TO_CHAR (NBV. ATD, "DD/MM/YYYY HH24") OF PNTS WHERE NBV. DOC_NO = TAB. VCN_NO AND ROWNUM < = 1) WHEN VMS. MOVEMENT_TYPE_CODE = 'ATB' THEN (SELECT TO_CHAR (VBU. BRTH_ALL_FAST, "DD/MM/YYYY HH24") OF VSL_BERTH_UNBERTH VBU WHERE VBU. BERTH_TRANS_ID = VMS. TRANS_ID AND ROWNUM < = 1) END ELSE NULL VSL_MOVES VMS WHERE VMS. TRANS_ID = TAB. Saileddate T_ID)) > = TRUNC (TO_DATE (: pStartDate, ' dd/MM/yy HH24')) and
(CASE WHEN VMS. MOVEMENT_TYPE_CODE = 'ATS' THEN (SELECT TO_CHAR (NBV. ATD, "DD/MM/YYYY HH24") OF PNTS WHERE NBV. DOC_NO = TAB. VCN_NO AND ROWNUM < = 1) WHEN VMS. MOVEMENT_TYPE_CODE = 'ATB' THEN (SELECT TO_CHAR (VBU. BRTH_ALL_FAST, "DD/MM/YYYY HH24") OF VSL_BERTH_UNBERTH VBU WHERE VBU. BERTH_TRANS_ID = VMS. TRANS_ID AND ROWNUM < = 1) END ELSE NULL VSL_MOVES VMS WHERE VMS. TRANS_ID = TAB. T_ID) saileddate) < = TRUNC (TO_DATE (: pEndDate, ' dd/MM/yy HH24')))
--(Sailed_Date > = TRUNC (TO_DATE (: pStartDate, ' dd/MM/yy HH24 ')) AND Sailed_Date < = TRUNC (TO_DATE (: pEndDate, ' dd/MM/yy HH24')))
AND VM. MOVEMENT_TYPE_CODE IN ('STA', "UTA")
) TAB
now my Question is should I include Sailed date also starttime and endtime (ex: date range of pStartDate and pEndDate I need to display the date sailed respected records)
I mean the problem is solved, I found the solution
docks of pof-
WITH CTE (SL, VCN_NO, VESSEL_NAME, FLAG, IMO_NO, ARRIVED, FROM_, MOVEMENT_TYPE_, NEXT_MOVE, SAILED_DATE, DESTINATION, FID, TID)
AS
(SELECT T1.*,
WHEN T1 BOX. FROM_ = 'POF' THEN 1 OTHER 2 END FID,
WHEN T1 BOX. DESTINATION = "POF" THEN 1 OTHER 2 END TID
Of
(
SELECT ROW_NUMBER() OVER (PARTITION OF VM. VCN_NO ORDER BY VB. (SL BRTH_ALL_FAST),
VM. VCN_NO,
(SELECT M.VSL_NAME FROM VESSEL_MASTER M WHERE M.VSL_CODE = VM. VESSEL_NAME VSL_CODE),
(SELECT C.COUNTRY_NAME OF COUNTRY C, VESSEL_MASTER M WHERE C.COUNTRY_CODE = M.FLAG AND M.VSL_CODE = VM. VSL_CODE AND ROWNUM< =1="" )="" as="">
(SELECT M.VSL_IMO_NO FROM VESSEL_MASTER M WHERE M.VSL_CODE = VM. IMO_NO VSL_CODE),
VB. BRTH_ALL_FAST HAS ARRIVED,
(CASE WHEN VM. MOVEMENT_TYPE_CODE = 'ATB' THEN 'ANCHORAGE' WHAT VM. MOVEMENT_TYPE_CODE = "LTB" THEN 'LAND' WHEN VM. MOVEMENT_TYPE_CODE = "BTB" AND (SELECT TT1. VSL_MOVES TT, VSL_BERTH_UNBERTH TT1 BERTH_CODE WHERE TT. TRANS_ID = TT1. BERTH_TRANS_ID AND TT. VCN_NO = VM. VCN_NO AND TT1. UNBERTH_TRANS_ID = VB. BERTH_TRANS_ID) (SELECT WB. BERTH_MASTER BM BERTH_CODE WHERE BM. QUAY_CODE NOT IN ("VOPAK", "SPM")) THEN 'POF' WHEN VM. MOVEMENT_TYPE_CODE = "BTB" AND (SELECT TT1. VSL_MOVES TT, VSL_BERTH_UNBERTH TT1 BERTH_CODE WHERE TT. TRANS_ID = TT1. BERTH_TRANS_ID AND TT. VCN_NO = VM. VCN_NO AND TT1. UNBERTH_TRANS_ID = VB. BERTH_TRANS_ID) (SELECT WB. BERTH_MASTER BM BERTH_CODE WHERE BM. QUAY_CODE IN ("VOPAK", "SPM")) THEN "VOPAK" OTHER (SELECT P.PORT_NAME FROM RRS, P PORT_MASTER WHERE P.PORT_CODE = PNT. LST_PORT_CALL AND PNT. DOC_NO = VM. FROM_ VCN_NO END)).
VM. MOVEMENT_TYPE_CODE,
(SELECT THE VIRTUAL COMPUTERS. VSL_MOVES VMS MOVEMENT_TYPE_CODE WHERE VMS. TRANS_ID = VB. NEXT_MOVE UNBERTH_TRANS_ID),
VB. UB_LST_LNE_CASTOFF SAILED_DATE,
NVL ((SELECT CASE WHEN VMS. MOVEMENT_TYPE_CODE = 'UTA' THEN 'ANCHORAGE' WHAT VMS. MOVEMENT_TYPE_CODE = 'BTL' THEN 'LAND' WHEN VMS. MOVEMENT_TYPE_CODE = "UTS" THEN (SELECT P.PORT_NAME FROM RRS, PORT_MASTER P WHERE P.PORT_CODE = PNT. VSL_NXT_PRT_CALL AND PNT. DOC_NO = VMS. VCN_NO) WHEN VMS. MOVEMENT_TYPE_CODE = "BTB" AND (SELECT TT1. VSL_MOVES TT, VSL_BERTH_UNBERTH TT1 BERTH_CODE WHERE TT. TRANS_ID = TT1. BERTH_TRANS_ID AND TT. VCN_NO = VM. VCN_NO AND TT1. BERTH_TRANS_ID = VMS. TRANS_ID) (SELECT WB. BERTH_MASTER BM BERTH_CODE WHERE BM. QUAY_CODE NOT IN ("VOPAK", "SPM")) THEN 'POF' WHEN VMS. MOVEMENT_TYPE_CODE = "BTB" AND (SELECT TT1. VSL_MOVES TT, VSL_BERTH_UNBERTH TT1 BERTH_CODE WHERE TT. TRANS_ID = TT1. BERTH_TRANS_ID AND TT. VCN_NO = VM. VCN_NO AND TT1. BERTH_TRANS_ID = VMS. TRANS_ID) (SELECT WB. BERTH_MASTER BM BERTH_CODE WHERE BM. QUAY_CODE IN ("VOPAK", "SPM")) THEN "VOPAK" OTHERWISE NULL END VSL_MOVES VMS WHERE VB. UNBERTH_TRANS_ID = VMS. (TRANS_ID), "-") DESTINATION
OF VM, VSL_BERTH_UNBERTH VB VSL_MOVES WHERE (VM. TRANS_ID = VB. BERTH_TRANS_ID)
AND VM. MOVEMENT_TYPE_CODE LIKE '% TB '.
AND ((VB. BRTH_ALL_FAST > = TO_TIMESTAMP(:pStartDate,'DD/MM/YYYY HH24:MI') AND VB. BRTH_ALL_FAST<= to_timestamp(:penddate,'dd/mm/yyyy="">=>
OR (VB. UB_LST_LNE_CASTOFF > = TO_TIMESTAMP(:pStartDate,'DD/MM/YYYY HH24:MI') AND VB. UB_LST_LNE_CASTOFF<= to_timestamp(:penddate,'dd/mm/yyyy="" hh24:mi'))="">=>
AND VB. BERTH_CODE (SELECT WB. BERTH_MASTER BM BERTH_CODE WHERE BM. QUAY_CODE NOT IN ("VOPAK", "SPM"))
- AND VM. VCN_NO = 201510336
ORDER OF VB. BRTH_ALL_FAST
) T1
)
Select rownum AS SNO, tab2.* of)
SELECT
TAB1. VCN_NO, TAB1. VESSEL_NAME, TAB1. FLAG, TAB1. IMO_NO,
NVL (BOX WHEN TAB1. HAS ARRIVED< to_timestamp(:pstartdate,'dd/mm/yyyy="" hh24:mi')="" then="" '----------'="" else="" to_char(tab1.arrived,'dd/mm/yyyy="" hh24:mi')="" end,'----------')="">
NVL (BOX WHEN TAB1. HAS ARRIVED< to_timestamp(:pstartdate,'dd/mm/yyyy="" hh24:mi')="" then="" '----------'="" else="" (select="" t2.from_="" from="" cte="" t2="" where="" t2.sl="TAB1.FROM_" and="" t2.vcn_no="TAB1.VCN_NO)" end,'----------'="">
NVL (CASE WHEN (SELECT T2. DESTINATION OF THE CTE T2 WHERE T2.SL = TAB1. DEST AND T2. VCN_NO = TAB1. VCN_NO) = 'POF' THEN '-' ANOTHER BOX WHEN TAB1. SAILED_DATE > TO_TIMESTAMP (: pEndDate, ' DD/MM/YYYY HH24') THEN '-' ELSE TO_CHAR (TAB1. (SAILED_DATE, "DD/MM/YYYY HH24") A PIECE,'-') SAILED_DATE,.
NVL (BOX WHEN TAB1. SAILED_DATE > TO_TIMESTAMP (: pEndDate, ' DD/MM/YYYY HH24') THEN '-' ELSE (SELECT CASE WHEN T2. DESTINATION = 'POF' THEN '-' ANOTHER T2. THE END OF THE DESTINATION OF THE CTE T2 WHERE T2.SL = TAB1. DEST AND T2. VCN_NO = TAB1. (END OF VCN_NO), "-") DESTINATION
DE)
SELECT THE TAB. VCN_NO, TAB. VESSEL_NAME, TAB. FLAG, TAB. IMO_NO,
MIN (TAB. HAPPENED) ARRIVED,
MIN (TAB.SL) FROM_,
MAX (TAB. SAILED_DATE SAILED_DATE),
MAX (TAB.SL) DEST,
TAB. SNO
DE)
SELECT T1.*,
WHEN T1 BOX. FID = 2 AND T1. TID = 1 THEN 1 WHEN T1. FID = 1 AND T1. TID = 2 THEN 1 WHEN T1. FID = 1 AND T1. TID = 1 THEN 0
WHEN T1. FID = 2 AND T1. TID = ROWNUM THEN 2 + 1 END OF ANOTHER 3 SNO
T1 ETC
) GROUP OF TABS BY TABS. VCN_NO, TAB. VESSEL_NAME, TAB. FLAG, TAB. IMO_NO, TAB. SNO
) TAB1 WHERE TAB1. SNO<>0
) tab2
-
How to get the result of a process in a log file?
Hello world
Could you please tell me
How to write output to a procedure in a log file?
Thanks in advance...SET SERVEROUTPUT ON;
SPOOL $log_dir_path/xyz.log;
exec your_procedure (...);
SPOOL off; -
How to get the result in a row?
Friends
I have data in the following way:
date_field | cust_id. prod1_flag | prod2_flag | prod3_flag
01 sep-09 | 111. Y | |
01 sep-09 | 111. THERE |
01 sep-09 | 111. THERE
October 1 09 | 111. Y | |
October 1 09 | 111. THERE |
October 1 09 | 111. THERE
November 1 09 | 111. Y | |
November 1 09 | 111. THERE |
November 1 09 | 111. THERE
What query will give me a line per month? I mean
date_field | cust_id. prod1_flag | prod2_flag | prod3_flag
01 sep-09 | 111. THERE | THERE | THERE
October 1 09 | 111. THERE | THERE | THERE
October 1 09 | 111. THERE | THERE | THERE
Thank you...Maybe I'm missing something, but it is not only a regular aggregate such as MAX function that is necessary?
SQL> ed Wrote file afiedt.buf 1 with t as (select date '2009-09-01' as date_field, 111 as cust_id, 'Y' as prod1_flag, null as prod2_flag, null as prod3_flag from dual union all 2 select date '2009-09-01', 111, null, 'Y', null from dual union all 3 select date '2009-09-01', 111, null, null, 'Y' from dual union all 4 select date '2009-10-01', 111, 'Y', null, null from dual union all 5 select date '2009-10-01', 111, null, 'Y', null from dual union all 6 select date '2009-10-01', 111, null, null, 'Y' from dual union all 7 select date '2009-11-01', 111, 'Y', null, null from dual union all 8 select date '2009-11-01', 111, null, 'Y', null from dual union all 9 select date '2009-11-01', 111, null, null, 'Y' from dual) 10 -- END OF TEST DATA 11 select date_field, cust_id 12 ,max(prod1_flag) as prod1_flag 13 ,max(prod2_flag) as prod2_flag 14 ,max(prod3_flag) as prod3_flag 15 from t 16 group by date_field, cust_id 17* order by 2, 1 SQL> / DATE_FIELD CUST_ID P P P ------------------- ---------- - - - 01/09/2009 00:00:00 111 Y Y Y 01/10/2009 00:00:00 111 Y Y Y 01/11/2009 00:00:00 111 Y Y Y SQL>
-
How to get the sql query result?
Hello
Currently I use LV2012 to connect to an Oracle database server. After the Oracle Express and Oracle ODBC driver facilities/settings made.
I managed to use the SQL command to query the data through my command prompt window.
Now the problem is, how to do the same task in Labview using database connectivity tools?
I have build a VI to query as being attached, but I have no idea of what range to use to get the result of the query.
Please help me ~ ~
Here is a piece of code that I use to test the SQL commands, you can use the part that retrieves the results of sql.
It is also possible to get the rear column headers, but it's for the next lesson!
;-)
-
I have an accmaster say table where each record has detailts on an acct as actno, curr_bal, branch, acct_type I want something as below a
branch_no - Sum (curr_bal) where acct_type like 1% ' as sb - sum (curr_bal) where acct_type like 2%'s fd of the Group table by branch in a single line as shown below
00001 550000 65000000
00002 75909000 2568229867
Please tell how to do the above operation.Hello
This is called a Pivot , and here's a way to do it:
SELECT branch_no , SUM (CASE WHEN acct_type LIKE '1%' THEN curr_bal END) AS total_1 , SUM (CASE WHEN acct_type LIKE '2%' THEN curr_bal END) AS total_2 FROM accmaster GROUP BY branch_no ;
This will work in any version of Oracle, from 8.1, but starting in Oracle 11.1, you can also use the SELECT... Function PIVOT.
I hope that answers your question.
If not, post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all tables and also post the results desired from these data.
Explain, using specific examples, how you get these results from these data.
Always tell what version of Oracle you are using.Furthermore, your table is called
accmaster (where, I guess, ACC means 'account') and it contains called columns
ACTNO ( Act means 'account') and
acct_type ( acct means 'account')
Do you really need 3 different ways to shorten "account"? How do you recall when you used a way and when you have used another or when you used an underscore after the abbreviation character, and when you do not have? Even if you never get confused by these things, someone trying to help you, and one that should keep your code in the future, will probably. Do not use consistent, such as namespace
acct_master
Acct_No and
acct_type
? -
Hello
I'm looking for the most obvious and simple, LabVIEW:
1. start the motor Teststand: FACT
2. get a list of SEQ files to run: FACT
3 - loop through the list to run each file follows:<- found="" some="" examples="" but="" i="" have="" some="" trouble="" with="" the="" uimessage="">->
4. get the result of the execution of the SEQ:<->->
5 retrieve the XML + name of the generated report file path:<- obviously="" not="">->
http://digital.NI.com/public.nsf/allkb/3D3B2358DF9B786B8625789500549A3B
Here's my current implementation:
David Koch
Maybe you are looking for
-
Hello! I'm on Mac air book & installed OS Sierra. I heard from my friend that a new feature is added photo into. What is it? Any ideas?
-
I'm 13.0.1 on windows 7 and I have adblock and download helper. Since the recent update for firefox, youtube suggestions that appear on the right side of the page does not load correctly. When the 1st page opens the suggestions is there, but a few se
-
How do I update a Satellite C660 PSC0QE BIOS from linux
No idea how I can update a PSC0QE C660 of linux? It works really well, but the keyboard problem is very annoying.
-
HP Envy M6 - 1103so Wifi issues
So my WiFi keeps declining. Most of the time this is 1 or 2 bars and running extremely slow, often so slow that firefox reacts in not opening any site. So, I went down to the store where I bought it, and they send to repair. They exchanged my WLAN. B
-
HP Pavilion DV7 2270us: USB Ports not working on HP Pavilion DV7
I get the USB device not recognized on all USB ports on my laptop. I am running Windows 7 (recently did a restore to clean computer) service pack 1. I refreshed the BIOS I tried to remove all the drivers, stop, remove the battery and restart I tried