Multiple conditions
Hi,
I have a list of ID numbers (quantity can be as high as hundreds). I need to get all the rows from one table that have these ID`s as their key. How should i do it? I assume that having hundred AND's in sql statement isnt such a good idea..
I am programming with .net c# and using ODP.net
Hello,
Be aware that the expression list used in an IN condition can contain 1000 values at the most.
If you find yourself doing this very often, it is a sign that you should probably be using a JOIN somewhere to make your life easier.
For example, you have a query such as the following:
select empno
from emp
where dept = 'SALES';...and you are using the empno values returned from this query later on in your program somewhere:
select amount
from commissions
where empno in ([a list generated by your application]);, then you should probably be doing just the following:
select c.amount
from emp e
, commissions c
where c.empno = e.empno
and e.dept = 'SALES';May be a silly example, and it might not be applicable to this specific problem, but I think the message is clear: if you find yourself using large IN lists all the time, step back and think about it again.
cheers,
Anthony
Similar Messages
-
If Statement Multiple Conditions
Using LiveCycle, FormCalc or JavaScript.
I am trying to create an if statement with multiple conditions.
a Sum field calculates a series of numeric input fields. I want the result in the Sum field to determine the expression in a final field.
If the Sum is <30MM then "50000" also if the Sum is >30MM but <60MM then "125000" also if the Sum is >60MM but <100MM then "250000" also if the Sum is >100MM but <300MM then "375000" also if the Sum is >300MM then "500000"
I have only been able to figure out a single if then for the first condition but not able to include the whole set of conditions and the multiple results.
Help would be much Appreciated!
Thank you in advance.Tried a few variations of this and still seem not
to be able to find a solution to this issue. I'm surprised my google searches are bringing up better examples because there seems to be an example of everything else.
Any more detailed advive? -
How can I pass multiple condition in where clause with the join table?
Hi:
I need to collect several inputs at run time, and query the record according to the input.
How can I pass multiple conditions in where clause with the join table?
Thanks in advance for any help.
Regards,
TDIf you are using SQL-Plus or Reports you can use lexical parameters like:
SELECT * FROM emp &condition;
When you run the query it will ask for value of condition and you can enter what every you want. Here is a really fun query:
SELECT &columns FROM &tables &condition;
But if you are using Forms. Then you have to change the condition by SET_BLOCK_PROPERTY.
Best of luck! -
Multiple conditions for the same button.
Is there any way you can have multiple condition (same type of the condition).
I have button that I would like to hide it at different stages.
For example I would like to have a button (Submit) which will be visible when
Status = Draft
Condition Type Value of Item in Expression 1 = Expression 2
P9_X_STATUS
Draft
and when also when userRole = author
Condition Type Value of Item in Expression 1 = Expression 2
P9_X_USER_ROLE
Author
RobertHi,
It would depend on when the fields get their values into the session. They may be below the button on the page but if they have a value in the session then the button's condition will see this.
If, however, you have only used a Default Value setting for the item, the value may not be in the session (even though it may be displayed on the page), so the button will not know about this value. In these cases, I set the default value using a page computation for that item that runs "On Load Before Header" and is conditional on the item being null. That puts the value into the session for other items to use if required.
Andy -
Deleting data from another table with multiple conditions
Hi frnds
I need to delete some data from a table based on multiple condition I tried following sql but its deleteing some rows which is not meeting the criteria which is really dangerours. When i trying = operator it returns ORa- 01427 single -row subquery returns more than one row
delete from GL_TXNS
where TRN_DT in (Select trn_Dt from GL_MAT)
and BR in (select ac_branch from GL_MAT)
and CODE in (select CODE T from GL_MAT)
and (lcy_amt in (select lcy_amt from GL_MAT) or
fcy_amt in(select fcy_amt from GL_MAT)
rgds
ramyaMy answer is the same as Avinash's but I will explain a little bit more.
ORa- 01427 single -row subquery returns more than one rowmeans that you have a subquery that Oracle is expecting one value from that is returning multiple values. In your case you need one value for the equijoin ("=") and you are getting more than one value back. The error happens even if all the values are the same - multiple values being returned will cause the error.
The solution is to either allow multiple values to be returned (say, use the IN condition istead of "=") or only return one value if possible (say, forcing one value by using DISTINCT, GROUP BY, or a WHERE clause condition of ROWNUM=1) - but these workarounds must be checked carefully to make sure they work correctkly -
Mail step should be sent to all the users in multiple condition
hi experts,
I have a requirement on invoice posting.Say if invoice amount is 1000 then person A can post the invoice.
if >= 1000 person B can post the invoice.
If >=2000 person C can post the invoice.
what i have did is, created a multiple condition and then based on the inv amount assigned 3 methods for invoice posting.My problem is if a person posts an invoice amount of 1000.A mail has to be sent to Person B and C informing that an amount of 1000 is posted with user id.Same for person B, ie mail should be sent to person A and C informing regarding invoice posting.Now inside the multiple condition i cannot assign mail step.Coz based on the condition it will go to a particular user for invoice posting but where as mail should be sent to all the users.So how can i achieve this??.Hi Priyanka,
I am getting 1 thing why you need need multiple conditions. No need to create any multiple conditions.
1. Create a rule using transaction PFAC. (you can use the example as Rule: 0000168).
a. Create an function module with table parameters as ACTOR_TAB (type SWHACTOR) and AC_CONTAINER (Type
SWCONT). You can aswell copy the FM used in 168 rule and change it. check the logic mentioned below.
b. In PFAC transaction, go to container tab and create 2 container elements. For amount and Mail_indicator (type should be
same as that of the amount field in your workflow) .
2. Use this Rule in your workflow to send mail.
Logic:
""Lokale Schnittstelle:
*" TABLES
*" ACTOR_TAB STRUCTURE SWHACTOR
*" AC_CONTAINER STRUCTURE SWCONT
*" EXCEPTIONS
*" NOBODY_FOUND
INCLUDE <CNTAIN>.
DATA BEGIN OF ORG_OBJECT OCCURS 0.
INCLUDE STRUCTURE SWHACTOR.
DATA END OF ORG_OBJECT.
DATA: BEGIN OF NEW_AC_CONTAINER OCCURS 3.
INCLUDE STRUCTURE SWCONT.
DATA: END OF NEW_AC_CONTAINER.
DATA: V_AMOUNT TYPE <AMOUNT FIELD>.
DATA: V_MAIL_INDICATOR TYPE <FLAG>.
REFRESH: actor_tab.
Get the org-object under consideration. AMOUNT is the container name defined in your PFTC transaction
SWC_GET_ELEMENT AC_CONTAINER 'AMOUNT' 'V_AMOUNT'.
Get the org-object-type and the org-object id.
SWC_GET_ELEMENT AC_CONTAINER 'MAIL_INDICATOR' V_MAIL_INDICATOR .
Pass the org-object, the org-object-type and the org-object-id
to a new container.
The org object get a new name: ORG_AGENT.
SWC_SET_ELEMENT NEW_AC_CONTAINER 'AMOUNT' 'V_AMOUNT'.
SWC_SET_ELEMENT NEW_AC_CONTAINER 'MAIL_INDICATOR' V_MAIL_INDICATOR .
check for V_AMOUNT and V_MAIL_INDICATOR.
if the v_amount = 1000 .'
if v_mail_indicator = ' '.
actor_tab-OTYPE = 'US' .
actor_tab-OBJID = 'SAPUSER1'.
append actor_tab
else.
actor_tab-OTYPE = 'US' .
actor_tab-OBJID = 'SAPUSER2'.
append actor_tab
actor_tab-OTYPE = 'US' .
actor_tab-OBJID = 'SAPUSER3'.
append actor_tab
endif.
endif.
Similarly write the logic for other conditions.
This way you can use same for different purposes.
If you pass the indicator that means you are sending mail to other approvers for information.
Revert back if u need more help.
Regards,
Gautham -
I need your expert opinion on how to create a map with multiple conditions.
Hello.
I need your expert opinion on how to create a map with multiple conditions.
I have a procedure (which i cannot import or re-create in OWB due to the bug), so i am trying to create a map instead :-(
How can i create a cursors within the map?
My function creates table and cursor.
Then it will have to check for duplicates in the tables (the one created and another table) - the criteria for finding duplicates is a number of fields.I then need to place few different conditions (if some attributes are not available) and it has to load cursor based on this conditions. The next step is to fetch the data into the cursor based on what attributes are missing.
The next thing it will do is insert the data into table (if record doesn't exist), output the error in separate table is record is corrupted, or update the record with changed information.
In short i need to re-create match / merge but with conditions, iterations etc 'built into' it.
I can read up on available functions - it's just what would be the best options? and what would be the best approach to do so?
In my function i use %rowtype - but cannot use it in owb - so what would be the alternative? i don't really want to create a lot of variables and then have a nightmare of maintaing it. are there any tips regarding this?
having looked through Oracle dedupe - it's not really what i need because it is just DISTINCT.
I would appreciate any help / advise on this.
Thank you very muchthanks a lot for your reply - i will look into this option :-)
it is a bit more complicated now as i have to re-create the match / merge and then somehow 'tweak' it to achieve the result i need.
At the moment i am looking to breakdown the package into smaller chunks 'functions' and try creating the map that way.
Anyway, thank you very much for your suggestion. -
Multiple condition : Error when starting a SWITCH branch
Hi,
In our Z Leave Workflow,I am facing the errors listed below.
Error when starting a SWITCH branch
Error during CASE evaluation in SWITCH mode for node 0000000158
Operator 'EQ': The value of the left operand cannot be determined
Error in the evaluation of expression '<???>&REQ.STATUS&' for item '1'
Unable to determine the value of component ''
It gives error in Multiple condition Request Approved? which is similar to standard WF12300111 node number 158 (u can say copy of WF12300111
This multiple condition works in some scenario But it gives dump at other scenario .
I have checked the value of REQ.STATUS in runtime. It populates the value as 'POSTED' in runtime,
Please suggest if any solution on this.
Regards,
KalpeshHi There was some problem with task which was comprising class CL_PT_REQ_WF_ATTRIBS and APPROVE method. This method is to change the status of particular leave workitem.After running this particular task ,the status was not changin instantly.This method locks particular workitem and was releasing the workitem once the WF gets completed.Hence I was getting REQ.STATUS as sent.
I have changed that task with following code in new task...
DATA:
REQUEST_ID TYPE PTARQ_DEDUCTION-REQUEST_ID,
request TYPE REF TO if_pt_req_request,
new_status TYPE tim_req_status.
SWC_GET_ELEMENT CONTAINER 'REQUEST_ID' REQUEST_ID.
CALL FUNCTION 'ENQUEUE_EPTREQ'
EXPORTING
mode_ptreq_header = 'E'
request_id = request_id
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE w058(hrtim_abs_req) WITH request_id.
ELSE.
CALL METHOD ca_pt_req_header=>agent->get_request
EXPORTING
im_request_id = request_id
IMPORTING
ex_request = request.
execute state transition
CALL METHOD request->initiate_state_transition
EXPORTING
im_transfer_event = 'APPROVE'
IMPORTING
ex_new_status = new_status.
COMMIT WORK.
CALL FUNCTION 'DEQUEUE_EPTREQ'
EXPORTING
request_id = request_id.
ENDIF.
This will create new status for leave item during WF processing.
Apart from that also added Wait for 2 minutes after that task....
Thanks for your help.
Regards,
Kalpesh -
Multiple condition for payment terms
Hi,
I wanted to create new payment terms with multiple combination say for example
95% Payment in Advance & Remining 5% in Net 360 days. How to configure with multiple conditions.Hi
You may have to use instalment payment terms.
Regards -
Table Rows with Multiple Conditions Not Showing Up in RH
Hi everyone,
I'm currently evaluating TCS2 (Framemaker 9 and RoboHelp 8 on Windows XP) and have come across the following issue:
One of our FrameMaker source files contains a table in which one of the rows has multiple conditions applied. When one of the conditions is shown in Framemaker, and the others are hidden, the row is displayed in Framemaker as expected. However, when the file is then imported or linked into Robohelp, the same table row vanishes, even though the Apply FrameMaker Conditional Text Build Expression check box is selected in the Framemaker Conversion Settings > Other Settings screen. This only appears to affect table rows - when paragraph text is tagged with the same conditions, it is imported correctly into RoboHelp.
For example, when Condition B is shown and Condition A is hidden in the Framemaker file, the content appears like this in Frame:
Unconditional
Unconditional
Condition A and Condition B applied
Condition A and Condition B applied
Condition B applied
Condition B applied
Paragraph text with Condition A and Condition B applied.
Paragraph text with Condition B applied.
When the same file is imported into RoboHelp, the row with both conditions applied is absent from the table:
Unconditional
Unconditional
Condition B applied
Condition B applied
Paragraph text with Condition A and Condition B applied.
Paragraph text with Condition B applied.
Installing patches 8.0.1 and 8.0.2 did not resolve the issue (and actually caused other, unrelated issues) and I see the same behavior regardless of whether I import or link the FrameMaker document.
Has anyone else seen this issue? Any help would be much appreciated.
Thanks
DaveBIt just seems that the items I select as align to top in the
property inspector should force the items to the top of their
cells, unless I'm missing something. -
Multiple conditions in a filter of Bursting control file
Hi All,
I am trying to use multiple conditions in a filter of Bursting control file and it throws me an error.
Can you please correct me on this.
<xapi:template type="rtf" location="xdo://AR.XXRAXINVOPCO.en.00?getSource=true" filter=".//G_INVOICE[BILL_CUST_NAME='ABC COMPANY'] and .//G_INVOICE[BILL_CUST_NAME='ABC COMPANY']">
Thanks,
--John.I have made little progress and now I am able to connect to the printer but its not printing.It prints a blank paper saying this printer is not setup for direct PDF printing.Can anyone help?
[073112_025517889][oracle.apps.xdo.delivery.DeliveryManager][STATEMENT] initConfig(): loading default properties :{TEMP_DIR:String=/usr/tmp, BUFFERING_MODE:Boolean=true}
[073112_025517890][oracle.apps.xdo.delivery.DeliveryManager][STATEMENT] createRequest(): called with request type :ipp_printer
[073112_025517890][oracle.apps.xdo.delivery.DeliveryManager][STATEMENT] createRequest(): exiting
[073112_025517890][][STATEMENT] status message:
[073112_025517890][][STATEMENT] xdo.bursting.IPP_RESPONSE_CHECK_INTERVAL=null
[073112_025517890][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequest][STATEMENT] submit(): Called
[073112_025517890][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequest][STATEMENT] setDefaultServerProperties(): Default properties of server 'xslcisd2' are loaded. {URI:String=ipp://xslcisd2.southernco.com/ipp, server-type=ipp_printer}
[073112_025517891][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequest][STATEMENT] setDefaultServerProperties(): properties defined in this request.
[TEMP_DIR:String] [usr/tmp/073112_025446100]
[server-type] [ipp_printer]
[ASYNC_CHECK_INTERVAL:Integer] [60000]
[SERVER_NAME:String] [xslcisd2]
[IPP_ATTRIBUTE_CHARSET:String] [utf-8]
[IPP_DOCUMENT_FORMAT:String] [application/octet-stream]
[BUFFERING_MODE:Boolean] [true]
[IPP_USE_CHUNKED_BODY:String] [true]
[URI:String] [ipp://xslcisd2.southernco.com/ipp]
[IPP_HTTP_RESPONSE_CHECK_INTERVAL:Integer] [0]
[TEMP_FILE_PREFIX:String] [dlvr]
[IPP_COPIES:Integer] [1]
[RETRY:Integer] [0]
[RETRY_INTERVAL:Integer] [60000]
[TEMP_FILE_SUFFIX:String] [.tmp]
[IPP_USE_FULL_URL:String] [false]
[ASYNC_TIMEOUT:Integer] [86400000]
[IPP_NATURAL_LANGUAGE:String] [en]
[073112_025517891][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequest][STATEMENT] submit(): BUFFERING_MODE is ON.
[073112_025517891][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequest][STATEMENT] submit(): TEMP_DIR found, start document buffering : /usr/tmp/073112_025446100
[073112_025517891][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequest][STATEMENT] backupDocument(): Starting document buffering.
[073112_025517893][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequest][STATEMENT] backupDocument(): Creating temporary file for buffering : /usr/tmp/073112_025446100/dlvr67s66bXmwi8695010679275918372.tmp
[073112_025517894][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequest][STATEMENT] backupDocument(): 69429 bytes have been written to the temporary file.
[073112_025517894][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequest][STATEMENT] filterDocument(): Starting document preprocessing.
[073112_025517894][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequest][STATEMENT] filterDocument(): No native command found for preprocessing, exiting.
[073112_025517895][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequest][STATEMENT] backupDocument(): Finished document buffering.
[073112_025517903][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequest][STATEMENT] submit(): Start reading the buffered document file. : /usr/tmp/073112_025446100/dlvr67s66bXmwi8695010679275918372.tmp
[073112_025517903][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequest][STATEMENT] submit(): Calling DeliveryRequestHandler.submitRequest()
[073112_025517903][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequestHandler][STATEMENT] submitRequest(): Called
[073112_025517903][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequestHandler][STATEMENT] submitRequest(): Opening HTTP URL: http://xslcisd2.southernco.com/ipp
[073112_025517904][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequestHandler][STATEMENT] submitRequest(): IPP request dump:
IPP version: 10
operation id: 02
charset: utf-8
request id: 3
-- operation attrs --
[1]attributes-charset:utf-8
[1]attributes-natural-language:en
[1]printer-uri:ipp://xslcisd2.southernco.com/ipp
[1]document-format:application/octet-stream
-- printer attrs --
-- job attrs --
[1]copies:1
[073112_025517904][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequestHandler][STATEMENT] submitRequest(): HTTP chunked mode : true
[073112_025517904][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequestHandler][STATEMENT] submitRequest(): IPP request header length : 181
[073112_025517905][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequestHandler][STATEMENT] submitRequest(): Opening HTTP client.
[073112_025517905][oracle.apps.xdo.delivery.http.HTTPClient][STATEMENT] openRequest(request) called
[073112_025517905][oracle.apps.xdo.delivery.http.HTTPClient][STATEMENT] openConnection() called - opening xslcisd2.southernco.com:80
[073112_025517905][oracle.apps.xdo.delivery.http.HTTPClient][STATEMENT] openConnection(): Start non-SSL connection.
[073112_025517908][oracle.apps.xdo.delivery.http.HTTPClient][STATEMENT] generateRequestHeader() called.
[073112_025517908][oracle.apps.xdo.delivery.http.HTTPClient][STATEMENT] generateRequestHeader(): generated request header
POST /ipp HTTP/1.1Host: xslcisd2.southernco.com
User-Agent: Oracle XML Publisher 5.6.3
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: application/ipp
<<<
[073112_025517909][oracle.apps.xdo.delivery.http.HTTPClient][STATEMENT] openRequest(): using ChunkedOutputStream.
[073112_025517909][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequestHandler][STATEMENT] submitRequest(): Writing the document to the server stream.
[073112_025518090][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequestHandler][STATEMENT] submitRequest(): 69429 bytes have sent to the server.
[073112_025518090][oracle.apps.xdo.delivery.http.HTTPClient][STATEMENT] submitRequest() called
[073112_025518122][oracle.apps.xdo.delivery.http.HTTPClient][STATEMENT] submitRequest(): pIn.available(): 445
[073112_025518122][oracle.apps.xdo.delivery.http.HTTPResponse][STATEMENT] Constructor called
[073112_025518122][oracle.apps.xdo.delivery.http.HTTPResponse][STATEMENT] parseResponse() called
[073112_025518122][oracle.apps.xdo.delivery.http.HTTPResponse][STATEMENT] pIn.available(): 445
[073112_025518123][oracle.apps.xdo.delivery.http.HTTPResponse][STATEMENT] readLine() : [HTTP/1.1 200 OK]
[073112_025518123][oracle.apps.xdo.delivery.http.HTTPResponse][STATEMENT] parseResponse() 1st line of response header: [HTTP/1.1 200 OK]
[073112_025518124][oracle.apps.xdo.delivery.http.HTTPResponse][STATEMENT] readLine() : [Content-Type: application/ipp]
[073112_025518124][oracle.apps.xdo.delivery.http.HTTPResponse][STATEMENT] addResponseHeader(): [content-type][application/ipp]
[073112_025518125][oracle.apps.xdo.delivery.http.HTTPResponse][STATEMENT] readLine() : [Cache-Control: no-cache, no-store, must-revalidate]
[073112_025518125][oracle.apps.xdo.delivery.http.HTTPResponse][STATEMENT] addResponseHeader(): [cache-control][no-cache, no-store, must-revalidate]
[073112_025518126][oracle.apps.xdo.delivery.http.HTTPResponse][STATEMENT] readLine() : [Expires: THU, 26 OCT 1995 00:00:00 GMT]
[073112_025518126][oracle.apps.xdo.delivery.http.HTTPResponse][STATEMENT] addResponseHeader(): [expires][THU, 26 OCT 1995 00:00:00 GMT]
[073112_025518127][oracle.apps.xdo.delivery.http.HTTPResponse][STATEMENT] readLine() : [Content-Length: 242]
[073112_025518127][oracle.apps.xdo.delivery.http.HTTPResponse][STATEMENT] addResponseHeader(): [content-length][242]
[073112_025518128][oracle.apps.xdo.delivery.http.HTTPResponse][STATEMENT] readLine() : [Server: Allegro-Software-RomPager/4.34]
[073112_025518128][oracle.apps.xdo.delivery.http.HTTPResponse][STATEMENT] addResponseHeader(): [server][Allegro-Software-RomPager/4.34]
[073112_025518128][oracle.apps.xdo.delivery.http.HTTPResponse][STATEMENT] readLine() : []
[073112_025518128][oracle.apps.xdo.delivery.http.HTTPResponse][STATEMENT] parseResponse(): end of HTTP header
[073112_025518133][oracle.apps.xdo.delivery.http.HTTPResponse][STATEMENT] parseResponse(): HTTP response body ascii dump
0x01 0x00 0x00 0x01 0x00 0x00 0x00 0x03 0x01 G 0x00 0x12 attributes-charset 0x00 0x05 utf-8H 0x00 0x1b attributes-natural-la
nguage 0x00 0x05 en-us 0x05 ! 0x00 0x06 copies 0x00 0x04 0x00 0x00 0x00 0x01 0x02 E 0x00 0x07 job-uri 0x00 ,http://xslcisd2.so
uthernco.com/ipp/IPP_Job_8! 0x00 0x06 job-id 0x00 0x04 0x00 0x00 0x00 0x08 # 0x00 0x09 job-state 0x00 0x04 0x00 0x00 0x00 0x03 D
0x00 0x11 job-state-reasons 0x00 0x04 none! 0x00 0x1a number-of-intervening-jobs 0x00 0x04 0x00 0x00 0x00 0x04
0x03 <<<
[073112_025518133][oracle.apps.xdo.delivery.http.HTTPResponse][STATEMENT] Exiting Constructor
[073112_025518133][oracle.apps.xdo.delivery.http.HTTPClient][STATEMENT] closeConnection() called
[073112_025518133][oracle.apps.xdo.delivery.http.HTTPClient][STATEMENT] closeConnection() exiting
[073112_025518133][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequestHandler][STATEMENT] submitRequest(): Closing HTTP client.
[073112_025518134][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequestHandler][STATEMENT] submitRequest(): IPP response dump:
IPP version: 10
operation id: 01
charset: utf-8
request id: 3
-- operation attrs --
[1]attributes-charset:utf-8
[1]attributes-natural-language:en-us
-- printer attrs --
-- job attrs --
[1]job-uri:http://xslcisd2.southernco.com/ipp/IPP_Job_8
[1]job-id:8
[1]job-state:3
[1]job-state-reasons:none
[1]number-of-intervening-jobs:4
[073112_025518134][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequestHandler][STATEMENT] submitRequest(): Exiting submitRequest()
[073112_025518134][oracle.apps.xdo.delivery.http.HTTPClient][STATEMENT] closeConnection() called
[073112_025518135][oracle.apps.xdo.delivery.http.HTTPClient][STATEMENT] closeConnection() exiting
[073112_025518135][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequest][STATEMENT] submit(): Finished calling DeliveryRequestHandler.submitRequest()
[073112_025518135][oracle.apps.xdo.delivery.ipp.IPPDeliveryRequest][STATEMENT] submit(): Process done successfully. Exiting submit()
Thanks,
--John. -
About case and switch in multiple condition step in workflow.
i ve some information about case and switch in multiple condition in workflow.
case - static determination
switch - runtime determination.
but i want brief explanation about case and switch and difference please help me.....hi velmurugan............
in case,
we can have only one value for comparison and can have any number of branches for it.
in switch,
we can compare any number of values and have any number of branches.
eg:
consider i am triggering a workflow for purchase order change and i am having a multiple condition step.
if i am going for a case:
i can have only on value (ie po number/vendor number.....) as a parameter and can check different values with it. ( eg vendor number < 1000
vendor number > 1000.... so on)
a branch will be created for each condition.
if i am going for a switch:
i can take any parameter needed. (eg: vendor number > 1000
order type = 'NB' .... so on)
so a single branch can have any number of comparisons with the help of 'and' and 'or' operators and i can have any parameter for my condition.
---regards,
alex b justin -
Understanding multiple conditions in connect by prior clause Oracle
Hi ,
Can some one please explain me how to comprehend/understand multiple conditions in connect by prior conditions with some example data.
I am creating a table like this
CREATE TABLE FAMiLY_TREE
GRAND_FATHERID number,
FATHER_ID number,
SON_ID number,
person_name varchar(20)
INSERT INTO FAMILY_TREE (GRAND_FATHERID ,FATHER_ID , SON_ID , PERSON_NAME ) VALUES
(NULL, NULL , 5 , 'Mr X ' );
INSERT INTO FAMILY_TREE (GRAND_FATHERID ,FATHER_ID , SON_ID , PERSON_NAME ) VALUES
(null, 5 , 6 , 'Dave' );
INSERT INTO FAMILY_TREE (GRAND_FATHERID ,FATHER_ID , SON_ID , PERSON_NAME ) VALUES
(5, 6 , 7 , 'Vinny' );
INSERT INTO FAMILY_TREE (GRAND_FATHERID ,FATHER_ID , SON_ID , PERSON_NAME ) VALUES
(5, 6 , 16 , 'Omy' );
INSERT INTO FAMILY_TREE (GRAND_FATHERID ,FATHER_ID , SON_ID , PERSON_NAME ) VALUES
(5, 6 , 17 , 'Vijjy' );
INSERT INTO FAMILY_TREE (GRAND_FATHERID ,FATHER_ID , SON_ID , PERSON_NAME ) VALUES
(6, 7 , 8 , 'Vicky' );
INSERT INTO FAMILY_TREE (GRAND_FATHERID ,FATHER_ID , SON_ID , PERSON_NAME ) VALUES
(6, 7 , 9 , 'Varis' );
INSERT INTO FAMILY_TREE (GRAND_FATHERID ,FATHER_ID , SON_ID , PERSON_NAME ) VALUES
(7, 8 , 10 , 'Vshnu' );
INSERT INTO FAMILY_TREE (GRAND_FATHERID ,FATHER_ID , SON_ID , PERSON_NAME ) VALUES
(7, 8 , 11 , 'dyna' );
INSERT INTO FAMILY_TREE (GRAND_FATHERID ,FATHER_ID , SON_ID , PERSON_NAME ) VALUES
(8, 10 , 14 , 'Marry' );
INSERT INTO FAMILY_TREE (GRAND_FATHERID ,FATHER_ID , SON_ID , PERSON_NAME ) VALUES
(8, 10 , 15 , 'Mac' );
INSERT INTO FAMILY_TREE (GRAND_FATHERID ,FATHER_ID , SON_ID , PERSON_NAME ) VALUES
(7, 9 , 12 , 'Garry' );
INSERT INTO FAMILY_TREE (GRAND_FATHERID ,FATHER_ID , SON_ID , PERSON_NAME ) VALUES
(7, 9 , 13 , 'Ganny' );
SELECT
LPAD(' ', LEVEL*3) || PERSON_NAME FROM FAMILY_TREE
START WITH SON_ID= 6
CONNECT BY PRIOR SON_ID = FATHER_ID
AND PRIOR FATHER_ID = GRAND_FATHERID ;
SELECT
LPAD(' ', LEVEL*3) || PERSON_NAME FROM FAMILY_TREE
START WITH SON_ID= 6
CONNECT BY PRIOR SON_ID = FATHER_ID ;
Both These query return the same o/p
Dave
Vinny
Vicky
Vshnu
Marry
Mac
dyna
Varis
Garry
Ganny
Omy
Vijjy
Can some one please explain me comprehension of both these query or give me a example where i can understand multiple connect by prior conditions
ThanksMaybe (something to play with)
with
family_tree as
(select 'Green' family,null ancestor,1 person,'Mr X' person_name,1900 born from dual union all
select 'Green',1,2,'Dave',1920 from dual union all
select 'Green',2,3,'Vinny',1940 from dual union all
select 'Green',2,4,'Omy',1945 from dual union all
select 'Green',2,5,'Vijjy',1950 from dual union all
select 'Green',3,6,'Vicky',1960 from dual union all
select 'Green',3,7,'Varis',1965 from dual union all
select 'Green',6,8,'Vshnu',1980 from dual union all
select 'Green',6,9,'Dyna',1985 from dual union all
select 'Green',8,10,'Mary',2000 from dual union all
select 'Green',8,11,'Mac',2005 from dual union all
select 'Green',7,12,'Garry',1985 from dual union all
select 'Green',7,13,'Ganny',1990 from dual union all
select 'Brown',null,14,'Joe',1950 from dual union all
select 'Brown',14,15,'Jim',1970 from dual union all
select 'Brown',14,16,'Joy',1975 from dual union all
select 'Brown',14,17,'Jay',1980 from dual union all
select 'Brown',16,18,'Jack',1995 from dual union all
select 'Brown',18,19,'Jake',2010 from dual union all
select 'Brown',18,20,'Jess',2012 from dual
select family,
root_name||' ('||to_char(root_born)||')' "(FA/MO)THER",
children
from (select family,
root_born,
root_name,
ltrim(sys_connect_by_path(person_name||' ('||to_char(born)||')',', '),', ') children
from (select family,
connect_by_root(person_name) root_name,
connect_by_root(born) root_born,
person_name,
born,
row_number() over (partition by family,connect_by_root(person_name) order by born) rn
from family_tree
where level = 2
connect by prior person = ancestor
where connect_by_isleaf = 1
start with rn = 1
connect by prior root_name = root_name
and prior family = family
and prior rn + 1 = rn
order by family desc,root_born
Regards
Etbin -
Multiple conditions and multiple derivation in a derived column, SSIS
Hi I am trying fairly new to SSIS , and my task is to convert dates in string as given below to a datetime.
These are my date of birth in the source file (string data type):
Source date of birth (String)
Desired DOB (Date Time)
1050101
2005-01-01 00:00:00
1060101 2006-01-01
00:00:00
470324 1947-03-24
00:00:00
320209 1392-03-24
00:00:00
101
NULL
0 NULL
I have this ssis expression,
(([Drv DOB] == "0") || ([Drv DOB] == "101") ? NULL(DT_DBTIMESTAMP) : (DT_DBTIMESTAMP)(SUBSTRING([Drv DOB],1,2) + "-" + SUBSTRING([Drv DOB],3,2) + "-" + SUBSTRING([Drv DOB],5,2)))
It handles all dates but except for 7 digit sting date of birth. How can handle such multiple condition. Help much appreciated.I tried to use your expression but I had to omit LEN("190000606")<8, then only I had the valid syntax.
However, I changed my initial expression to this :
[Drv DOB] == "101" || [Drv DOB] == "0" ? NULL(DT_DBTIMESTAMP) : (LEN([Drv DOB]) == 6 ? (DT_DBTIMESTAMP)(SUBSTRING([Drv DOB],1,2) + "-" + SUBSTRING([Drv DOB],3,2) + "-" + SUBSTRING([Drv DOB],5,2)) : (DT_DBTIMESTAMP)(SUBSTRING("20" + [Drv DOB],2,2) + "-" + SUBSTRING([Drv DOB],5,2) + "-" + SUBSTRING([Drv DOB],7,2)))
now it handles length-7 date of birth, but doesn't handle length-6. All the DOB for length-6 are represented as NULL. Can you look over it? -
MDX Calculated Member With Multiple Conditions
I need to create a calculated member in my cube that spans multiple dimensions. A current calculated member looks like this:
[Employee Hours Category].[Utilization Category].[NON-PTO], [Measures].[Employee Hours]
This calculated member returns all the hours an employee worked that are not PTO.
I need to select employee hours but with multiple conditions:
- [DIM BILL STATUS][Bill Status] equals 0
- [Employee Hours Time Category].[Time Category] equals "Client Facing"
- [DIM PROJECT].[Client] isn't like "Olson"
I know this is probably pretty easy, but I'm horrible with MDX!
Thank you!!
A. M. RobinsonThank you...
Your answer looks good but I was actually able to figure out most of it, but still looking how to incorporate a FILTER into the MDX. I would like to FILTER like this:
FILTER ([DIM Project].[Client].[Client].Members ,
NOT InStr([DIM Project].[Client].CurrentMember.MEMBER_NAME, "Olson")
Heres the MDX I have so far that is working fine:
([Employee Hours Time Category].[Time Category].&[Client Facing],
[DIM BILL STATUS].[Bill Status ID].&[1], [Measures].[Employee Hours])
Do you just wrap the whole MDX in the filter, and if so, how would that be formatted?
A. M. Robinson -
Advance Aggregation based on multiple conditions
Hi members,
I have a situation where I need to aggregate data based on multiple conditions. Relevant details of the problem is as follows.
There is a table (let's call X). It has following columns:
Transaction_Time (date)
Transaction_direction (Possible values IN or OUT)
Column_1
Column_2
Based on the columns: Transaction_direction, Column_1, Column_2, the type of the transaction will be derived. For example, if transaction_direction='IN' then transaction type is IN, if 'OUT' then transaction types are Out. Similarly if Column_1=Column_2 then transaction type is Txn_3 otherwise 4.
Based on date and transaction types the aggregation will happen.The sample output would be:
Time, Transaction type (IN, OUT, Txn_3, Txn_4), Sum of transactions
10-June-2013 00:00 IN Transactions 2500
10-June-2013 00:00 Txn_3 Transactions 3590
and so.
IN and Out transactions are easy to be derived using decode() function. However avoiding multiple UNION ALL and write a single SQL for all four conditions is tricky one.
Hope I clarified.
NeerajWhat version of Oracle are you using?
If you're on 11.x you can use the UNPIVOT feature as follows:
with t (Transaction_Time, Transaction_direction, Column_1, Column_2) as (
select date '2013-06-10', 'IN', 1, 1 from dual union all
select date '2013-06-10', 'IN', 2, 2 from dual union all
select date '2013-06-10', 'IN', 1, 2 from dual union all
select date '2013-06-10', 'IN', 3, 4 from dual union all
select date '2013-06-10', 'OUT', 3, 3 from dual union all
select date '2013-06-10', 'OUT', 3, 4 from dual
select * from (
select
transaction_time
, sum(case when transaction_direction = 'IN' then 1 end) as IN_count
, sum(case when transaction_direction = 'OUT' then 1 end) as OUT_count
, sum(case when Column_1 = Column_2 then 1 end) as Txn_3_count
, sum(case when Column_1 != Column_2 then 1 end) as Txn_4_count
from t
group by transaction_time
unpivot (
txn_count for transaction_type in (
IN_count as 'IN'
, OUT_count as 'OUT'
, Txn_3_count as 'Txn_3'
, Txn_4_count as 'Txn_4'
order by transaction_time, transaction_type
TRANSACTION_TIME TRANSACTION_TYPE TXN_COUNT
2013-06-10 IN 4
2013-06-10 OUT 2
2013-06-10 Txn_3 3
2013-06-10 Txn_4 3
If you're okay with getting one row per date with the 4 counts you can just use the inner select above, i.e.
select
transaction_time
, sum(case when transaction_direction = 'IN' then 1 end) as IN_count
, sum(case when transaction_direction = 'OUT' then 1 end) as OUT_count
, sum(case when Column_1 = Column_2 then 1 end) as Txn_3_count
, sum(case when Column_1 != Column_2 then 1 end) as Txn_4_count
from t
group by transaction_time
order by transaction_time
TRANSACTION_TIME IN_COUNT OUT_COUNT TXN_3_COUNT TXN_4_COUNT
2013-06-10 4 2 3 3
If you want to sum transaction amounts then use the same logic, except in the case statements replace 1 with the column you want to sum.
Regards,
Bob
Maybe you are looking for
-
I had an Apple ID which I used for iCloud. I upgraded the iCloud account and changed the apple ID to a @me address. Now I can't view what was in my original apple ID account. How can I get what was stored on the original account?
-
I can't see my photos on the cloud
I can't see my photos on the cloud...I'm new so please excuse the question but i only see email, address book, calender, find my phone and work! no icon for photos or iTunes. What am i missing?
-
[MBA original] startup and disk problems
My old faithful Air has started to have some serious problems. A couple of months ago, it started to behave sluggishly, beachballing in all applications, and then when I tried to restart, it wouldn't get past the logo/catherine wheel screen. I could
-
Designing the scenario of multiple BAPI call in a loop in BPM
All, I need some help in designing this scenario. I do not have the luxury to write a custom BAPI. Here is my scenario. A typical async>sync>async with little modification 1. Async call to BPM with input payload 2. BPM calla BAPI_SALESORDER_GETLIST w
-
Linking a Crystal Report with AddOn
Hi ! I have a Crystal Report called results.rpt. How do i link it and/or start it with my addon ?? Is their any samples anywhere ? Thanks Alot !