Question Regarding SQL logic error!

Hello everyone,
I get the following error when executing an Informatica mapping with teh following SQL in the Source Qualifier.
error - OR- 00936: missing expression.
Can anyone help please!
SELECT
PS_CUSTOMER.SETID
, PS_CUSTOMER.CUST_ID
, PS_CUSTOMER.CUST_STATUS
, PS_CUSTOMER.ADD_DT
, PS_CUSTOMER.NAME1
, PS_CUSTOMER.TAXPAYER_ID
, PS_CUSTOMER.WEB_URL
, PS_CUSTOMER.LAST_MAINT_OPRID
, PS_CUSTOMER.DATE_LAST_MAINT
, PS_CUST_SIC_CODES.SIC_CD_QUAL
, PS_CUST_SIC_CODES.SIC_CODE
, PS_CUST_CGRP_LNK.CUST_GRP_TYPE
, PS_CUST_CGRP_LNK.CUSTOMER_GROUP
, PS_CUST_CGRP_LNK.LASTUPDDTTM
, PS_CUST_ID_NBRS.STD_ID_NUM
, PS_CUSTOMER.SUBCUST_QUAL1
FROM PS_CUSTOMER
select SIC1.SETID, SIC1.CUST_ID, MAX(SIC1.SIC_CODE) SIC_CODE, SIC1.SIC_CD_QUAL
from PS_CUST_SIC_CODES SIC1
where SIC1.SIC_CD_QUAL =
( select MAX(SIC_CD_QUAL)
from PS_CUST_SIC_CODES SIC2
where SIC2.CUST_ID = SIC1.CUST_ID
and SIC2.SETID = SIC1.SETID
group by SETID, CUST_ID, SIC1.SIC_CD_QUAL
) PS_CUST_SIC_CODES
select A.CUST_ID, A.SETID, A.CUST_GRP_TYPE
, MAX(A.CUSTOMER_GROUP) CUSTOMER_GROUP, A.LASTUPDDTTM
from PS_CUST_CGRP_LNK A
where A.CUST_GRP_TYPE =
SELECT MAX(CUST_GRP_TYPE)
FROM PS_CUST_CGRP_LNK B
WHERE A.CUST_ID = B.CUST_ID
AND A.SETID = B.SETID
AND A.LASTUPDDTTM = B.LASTUPDDTTM
AND B.LASTUPDDTTM =
SELECT MAX(LASTUPDDTTM)
FROM PS_CUST_CGRP_LNK C
WHERE C.CUST_ID = B.CUST_ID
AND C.SETID = B.SETID
GROUP BY CUST_ID, SETID, CUST_GRP_TYPE, LASTUPDDTTM
) PS_CUST_CGRP_LNK
select SETID, CUST_ID, STD_ID_NUM
from PS_CUST_ID_NBRS
where STD_ID_NUM_QUAL = 'DNS'
) PS_CUST_ID_NBRS
WHERE
{ PS_CUSTOMER
LEFT OUTER JOIN
PS_CUST_SIC_CODES ON
PS_CUSTOMER.SETID = PS_CUST_SIC_CODES.SETID
AND PS_CUSTOMER.CUST_ID = PS_CUST_SIC_CODES.CUST_ID
LEFT OUTER JOIN
PS_CUST_CGRP_LNK ON
PS_CUSTOMER.SETID = PS_CUST_CGRP_LNK.SETID
AND PS_CUSTOMER.CUST_ID = PS_CUST_CGRP_LNK.CUST_ID
LEFT OUTER JOIN
PS_CUST_ID_NBRS ON
PS_CUSTOMER.SETID = PS_CUST_ID_NBRS.SETID
AND PS_CUSTOMER.CUST_ID = PS_CUST_ID_NBRS.CUST_ID
ORDER BY PS_CUSTOMER.CUST_ID , PS_CUSTOMER.SETID
Thanks,
Ajay.

Kramer wrote:
Hi
So.. do we have to pay for the feature regarding sql tuning advisor?
Can we use the dbms_sqltune package for free in oracle?
No, you need the license. Please read below,
http://download.oracle.com/docs/cd/E11882_01/license.112/e10594/options.htm#CIHFIHFG
I `m doing below test on my Linux. I installed an oracle on it and only for study purpose so didn`t pay.
As you can see. I got no output.
SQL> exec dbms_sqltune.execute_tuning_task('TASK_1634');
PL/SQL procedure successfully completed.
SQL> select dbms_sqltune.report_tuning_task('TASK_1634') from dual;
DBMS_SQLTUNE.REPORT_TUNING_TASK('TASK_1634')
GENERAL INFORMATION SECTION
Please read the below link to learn how to use the STA.
http://download.oracle.com/docs/cd/E11882_01/server.112/e16638/sql_tune.htm
HTH
Aman....

Similar Messages

  • Regarding sql function error  for Hijri date to Gregorian date

    Hi ,
    I want to convert Hijri date format into Gregorian date format . i write the script with  sql function  like this
    $Hijri_Date = '16/04/1428';
    $Gregorian_Date = sql('DS_REPO','SELECT CONVERT(DATE,[$Hijri_Date],131)');
    print($Gregorian_Date);
    here $Hijri_Date data type is varchar and $Gregorian_Date data type is date.
    but  I am getting error like
    7868     5812     DBS-070401     10/26/2010 10:37:18 PM     |Session Job_Hijradata_Conversion
    7868     5812     DBS-070401     10/26/2010 10:37:18 PM     ODBC data source <UIPL-LAP-0013\SQLEXPRESS> error message for operation <SQLExecute>: <[Microsoft][SQL Server Native Client
    7868     5812     DBS-070401     10/26/2010 10:37:18 PM     10.0][SQL Server]Explicit conversion from data type int to date is not allowed.>.
    7868     5812     RUN-050304     10/26/2010 10:37:18 PM     |Session Job_Hijradata_Conversion
    7868     5812     RUN-050304     10/26/2010 10:37:18 PM     Function call <sql ( DS_REPO, SELECT CONVERT(DATE,16/04/1428,131) ) > failed, due to error <70401>: <ODBC data source
    7868     5812     RUN-050304     10/26/2010 10:37:18 PM     <UIPL-LAP-0013\SQLEXPRESS> error message for operation <SQLExecute>: <[Microsoft][SQL Server Native Client 10.0][SQL
    7868     5812     RUN-050304     10/26/2010 10:37:18 PM     Server]Explicit conversion from data type int to date is not allowed.>.>.
    7868     5812     RUN-053008     10/26/2010 10:37:18 PM     |Session Job_Hijradata_Conversion
    please help me out to solve this problem .
    Please suggest any other solution to convert hijri date format to gregorian date format.
    Thanks&Regards,
    Ramana.

    Hi ,
    In Data quality there is no inbuild function for converting hijri date to gregorian date .  we have the function for converting julian date to gregorian date.
    Thanks&Regards,
    Ramana.

  • Help Needed regarding SQL Loader Error

    Hi,
    I am trying to insert some records into two tables using same control file.
    I am using the follwing command to load data
    sqlload "$ORAUSER" CONTROL="$LDRFILE" DATA="$DATA_PATH/$DATA_FILE" BAD="$BAD_FILE" LOG="$LOG_FILE" DISCARD="$DISCARD_FILE" ERRORS="$MAX_ERRS"
    I am getting the error: SQL-LOADER - 350: Illegal combination of non-alphanumeric characters
    #!/bin/ksh
    Please suggest me what I need to do.
    Thanks,
    Srinivas.

    it appears that you are using this line code in your korn shell script. if you try to do a manual run on the unix command line do you still get the same error?
    also can you post a sample value for all the parameters you have.

  • Transfer Case Animation Question Regarding if Logic.

    I am using the following code in a transfer case animation and for the life of me, I can't figure out what I'm doing wrong.  The "if (neutralSequence ==0)" part works great, but the "}else if (neutralSequence == 14){" part doesn't. I am using traces in each step and the value is equal to 14 when entering the function.  I've attached the file and description of how to follow the sequence and it works until I get to this step.
    this.neutral_mc.onPress = neutral_mc.onPress = function(){
    trace ("Are you there?");
    trace (_root.neutralSequence);
    this.neutral_mc.onRelease = neutral_mc.onRelease = function(){
    trace ("Here");
    if (_root.neutralSequence == 0) {
      if (needle_mc._x > 368) {
       trace ("The vehicle must be completely stopped before shifting into neutral.");
       _root.neutral_mc.gotoAndPlay ("flash");
      } else if (_root.engineOff == "N") {
       trace ("The engine must be turned off before shifting the transfer case into neutral.");
       _root.neutral_mc.gotoAndPlay ("flash");
      } else if ((_root.ignitionSwitchPosition == "F") || (_root.ignitionSwitchPosition == "A")){
       trace ("The igntion switch must be in the ON position before shifting the transfer case into neutral.");
       _root.neutral_mc.gotoAndPlay ("flash");
      } else if (_root.held == "N") {
       trace ("Please press the Brake Hold button before shifting the transfer case into neutral.");
       _root.neutral_mc.gotoAndPlay ("flash");
      } else if (shiftPosition != "N") {
       trace ("The transmission must be in Neutral (N) before shifting the transfer case into neutral.");
       _root.neutral_mc.gotoAndPlay ("flash");
      } else {
       if (_root.PreviousMode != "4Low") {
        _root.gotoAndPlay ("NeutralFromTwo");
        _root.neutralSequence = 1;
        trace (_root.neutralSequence);
       } else {
        root.gotoAndPlay ("NeutralFromFour");
        _root.neutralSequence = 1;
        trace (_root.neutralSequence);
    } else if (_root.neutralSequence == 14) {
      _root.neutralSequence = 15;
      trace (_root.neutralSequence);
      _root.gotoAndPlay("Z2");
      _root.neutral_mc.gotoAndPlay ("NProcComp");
    Any and all help is greatly appreciated!!!

    kglad,
    Thanks for the suggestions, but I think the problem is in Flash.  It seems that when an onRelease command occurs within the movie the code is attached to, it creates problems for the run-time engine (if that's the correct term).
    I was just about to pull my hair out and thought of one other possible woraround.  I created a 0 alpha movie clip above the original movie clip, then copied and pasted the EXACT code to the new movie and it worked fine.
    I'm pretty new to coding and would have done a lot of things differently (more function based) if I had to do it over again but I didn't want to spend 100 hours reworking an animation that is 95% done.
    I've got a lot to learn but it seems the folks at Adobe do as well.  I'm sure they are aware of these limits but I doubt they're published anywhere the gen pub can see them.  Perhaps they're trying to get me to purchase Suite 4?   LOL
    Anyway, I really appreciate your taking the time to try to help!
    Sincerely,

  • Question regarding Calculated Key Figures in BEx and their impact on SQL

    Hello,
    I am new to BO SAP integration. I have a question regarding using CKF in BEx.
    I created universe off of a BEx query with no CKF. I then created a Webi report with come dimensions and measures. I captured the SQL generated using trace (ST05).
    In the same BEx, I then create a CKF. Then refreshed the universe and created a new Webi report using the same dimensions and the CKF. The SQL generated had many more select statements.
    My question is what is the effect of CKF on the generated SQL and is there a performance issues using CKF in BEx as opposed to creating variables in Webi report?
    Thanks,
    Nikhil

    Hi,
    if your CKF will have always same unit and you have one KF in you inforpovider with this unit, you can try to do this trick
    create a new hidden CKF as new CKF = KF / KF (with this equale new CKF = 1 unit)
    change your old CKF as old CKF = old CKF * new CKF
    let me know if it works.

  • Question regarding the execution of cursors and SQL statements

    Hi,
    I have cursor which fetches results from a table A.
    Now, simultaneously, in other session, I ran an update on the table A and commited it.
    1) My question is will the cursor keep fetching the old results or the cursor start fetching the new values when the data is committed?
    2) I have a similar question in SQL too. We generally write SQL queries which take considerable amount of time- around half an hour. During this time, I ran an update on the table and committed it. Will the result set contain the old values ?
    As per my knowledge, both should fetch the old values.
    But, I would like to get my beliefs reinforced.
    Thanks for your help.
    Don

    donisback wrote:
    Thanks John..
    Your post drives me to ask another question. We've been getting the error "Snapshot Too Old" quite frequently.
    So, we minimized the SQL and used cursor committing every 10000 records. This prevented the above error.
    Is there any other possible reason why we get the error "Snapshot too Old"?
    Thanks,
    DonDon:
    Typically, commiting more frequently increases the likelyhood of 1555, not decreases it. The 1555 error comes when the undo (or rollback in old terms) records that need to be read to support read consistency are no longer available. Simplistically, once a change has been committed, the undo records are marked as available for re-use and could be re-used thereby destroying the information that you need.
    Even though ithe initial question is really old, read the Ask Tom thread posted by RPuttagunta. Tom explains it far better than I could, and the basic concepts have not changed.
    John
    John

  • Question regarding Dashboard and column prompt

    My question regarding Dashboard and column prompt:
    1) Dashboard prompt usually work with only for columns which are in subject area. In my report I've created some of the columns which are based on other columns. Like I've daysNumber column that is based on two other columns, as it calculates the difference of two dates. When I create dashboard prompt I can't find this column there. I need to make a prompt on this column.
    2)For one of the column I've only two values 1 and 0. When I create prompt for this column, is it possible that in drop down list It shows 'Yes' for 1 and 'No' for 0 and still filter the request??

    Hi Toony,...
    I think there was another way of doing this...
    In the dashboard prompt go to Show option > select SQL Results from dropdown.
    There you need to write your Logical SQL like...
    SELECT CASE WHEN 1=0 THEN PERIODS.YEAR ELSE difference of date functionality END FROM SubjectAreaName
    Here.. Periods.Year is the column which is already exists in repository's presentation layer..
    and difference of date functionality is the code or formula of column which you want to show in drop-down...
    Also write the CASE WHEN 1=0 THEN PERIODS.YEAR ELSE difference of date functionality END code in fx of that prompt.
    I think it helps you in doing this..
    Just check and inform me if it works...
    Thanks & Regards
    Kishore Guggilla
    Edited by: Kishore Guggilla on Oct 31, 2008 9:35 AM

  • Basic question regarding SSIS 2010 Package where source is Microsoft Excel 97-2005 and there is no Microsoft office or Excel driver installed in Production

    Hi all,
    I got one basic question regarding SSIS 2010 Package where source is Microsoft Excel 97-2005. I wanted to know How this package works in production where there is no Microsoft office or Excel driver installed. To check that there is excel driver installed
    or not, I followed steps: Start-->Administrative Tools--> Data Sources(ODBC)-->Drivers and I found only 2 drivers one is SQL Server and another one is SQL Server Native Client 11.0.
    Windows edition is Windows Server 2008 R2 Enterprise, Service Pack-1 and System type is 64-bit Operating System.
    We are running this package from SQL Server Agent and using 32-bit (\\Machine_Name\d$\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\DTExec.exe /FILE "\\Machine_Name\d$\ Folder_Name\EtL.dtsx" /CONFIGFILE "\\Machine_Name\d$\Folder_Name\Config.dtsConfig"
    /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING E) to run this package. I opened the package and tried to find out what connection we have used and found that we have used "Excel Connection Manager" and ConnectionString=Provider=Microsoft.Jet.OLEDB.4.0;Data
    Source=F:\Fares.xls;Extended Properties="EXCEL 8.0;HDR=YES"; and source is ‘Excel Source’
    I discussed with my DBA and He said that SSIS is having inbuilt Excel driver but I am not convinced.
    Could anyone please clear my confusion/doubt?
    I have gone through various links but my doubt is still not clear.
    Quick Reference:
    SSIS in 32- and 64-bits
    http://toddmcdermid.blogspot.com.au/2009/10/quick-reference-ssis-in-32-and-64-bits.html
    Why do I get "product level is insufficient..." error when I run my SSIS package?
    http://blogs.msdn.com/b/michen/archive/2006/11/11/ssis-product-level-is-insufficient.aspx
    How to run SSIS Packages using 32-bit drivers on 64-bit machine
    http://help.pragmaticworks.com/dtsxchange/scr/FAQ%20-%20How%20to%20run%20SSIS%20Packages%20using%2032bit%20drivers%20on%2064bit%20machine.htm
    Troubleshooting OLE DB Provider Microsoft.ACE.OLEDB.12.0 is not registered Error when importing data from an Excel 2007 file to SQL Server 2008
    http://www.mytechmantra.com/LearnSQLServer/Troubleshoot_OLE_DB_Provider_Error_P1.html
    How Can I Get a List of the ODBC Drivers that are Installed on a Computer?
    http://blogs.technet.com/b/heyscriptingguy/archive/2005/07/07/how-can-i-get-a-list-of-the-odbc-drivers-that-are-installed-on-a-computer.aspx
    Thanks Shiven:) If Answer is Helpful, Please Vote

    Hi S Kumar Dubey,
    In SSIS, the Excel Source and Excel Destination natively use the Microsoft Jet 4.0 OLE DB Provider which is installed by SQL Server. The Microsoft Jet 4.0 OLE DB Provider deals with .xls files created by Excel 97-2003. To deal with .xlsx files created by
    Excel 2007, we need the Microsoft ACE OLEDB Provider. SQL Server doesn’t install the Microsoft ACE OLEDB Provider, to get it we can install the
    2007 Office System Driver: Data Connectivity Components or
    Microsoft Access Database Engine 2010 Redistributable or Microsoft Office suit.
    The drivers listed in the ODBC Data Source Administrator are ODBC drivers not OLEDB drivers, therefore, the Excel Source/Destination in SSIS won’t use the ODBC driver for Excel listed in it by default. On a 64-bit Windows platform, there are two versions
    of ODBC Data Source Administrator. The 64-bit ODBC Data Source Administrator is C:\Windows\System32\odbcad32.exe, while the 32-bit one is C:\Windows\SysWOW64\odbcad32.exe. The original 32-bit and 64-bit ODBC drivers are installed by the Windows operating system.
    By default, there are multiple 32-bit ODBC drivers and fewer 64-bit ODBC drivers installed on a 64-bit platform. To get more ODBC drivers, we can install the 2007 Office System Driver: Data Connectivity Components or Microsoft Access Database Engine 2010 Redistributable.
    Besides, please note that 2007 Office System Driver: Data Connectivity Components only install 32-bit ODBC and OLEDB drivers because it only has 32-bit version, but the Microsoft Access Database Engine 2010 Redistributable has both 32- bit version and 64-bit
    version.
    If you have any questions, please feel free to ask.
    Regards,
    Mike Yin
    TechNet Community Support

  • Best Practices Question: How to send error message to SSHR web page.

    Best Practices Question: How to send error message to SSHR web page from custom PL\SQL procedure called by SSHR workflow.
    For the Manager Self-Service application we’ve copied various workflows which were modified to meet business needs. Part of this exercise was creating custom PL\SQL Package Procedures that would gather details on the WF using them on custom notification sent by the WF.
    What I’m looking for is if/when the PL\SQL procedure errors, how does one send an failure message back and display it on the SS Page?
    Writing information into a log or table at the database level works for trouble-shooting, but we’re looking for something that will provide the end-user with an intelligent message that the workflow has failed.
    Thanks ahead of time for your responses.
    Rich

    We have implemented the same kind of requirement long back.
    We have defined our PL/SQL procedures with two OUT parameters
    1) Result Type (S:Success, E:Error)
    2) Result Message
    In the PL/SQL procedure we always use below construct when we want to raise any message
    hr_utility.set_message(APPL_NO, 'FND_MESSAGE_NAME');
    hr_utility.raise_error;
    In Exception block we write below( in successful case we just set the p_result_flag := 'S';)
    EXCEPTION
    WHEN APP_EXCEPTION.APPLICATION_EXCEPTION THEN
    p_result_flag := 'E';
    p_result_message := hr_utility.get_message;
    WHEN OTHERS THEN
    p_result_flag := 'E';
    p_result_message := hr_utility.get_message;
    fnd_message.set_name('PER','FFU10_GENERAL_ORACLE_ERROR');
    fnd_message.set_token('2',substr(sqlerrm,1,200));
    fnd_msg_pub.add;
    p_result_message := fnd_msg_pub.get_detail;
    After executing the PL/SQL in java
    We have written some thing similar to
    orclStmt.execute();
    OAExceptionUtils.checkErrors (txn);
    String resultFlag = orclStmt.getString(provide the resultflag bind no);
    if ("E".equalsIgnoreCase(resultFlag)){
    String resultMessage = orclStmt.getString(provide the resultMessage bind no);
    orclStmt.close();
    throw new OAException(resultMessage, OAException.ERROR);
    It safely shows the message to the user with all the data in the page.
    We have been using this construct for a long time for all our projects. They are all working as expected.
    Regards,
    Peddi.

  • SQL server error log size is too big to handle

    I am working with a large database on windows sql server 2008 R2 such that it has to run continuously 24x7 because of that it is not possible
    to restart the server time to time. It is kind of monitoring system for big machines. Because of this SQL server error logs are growing too big even some times up to 60-70 GB at a limited sized hard drive. I can't delete them time to time manually. Can someone
    please suggest a way using which I can stop creation of such error logs or recycle them after sometime. Most of the errors are of this kind --
    Setting database option RECOVERY to simple for database db_name
    P.S.- I have read limiting error logs to 6 etc. But that didn't help. It will be best if you could suggest some method to disable these logs.

    Hi Mohit11,
    According to your description, your SQL Server error logs are growing too big to handle at a limited sized hard drive, and you want to know how to stop the generation of such error logs or recycle them after sometime automatically without restarting the
    SQL Server, right?
    As others mentioned above, we may not be able to disable SQL server error log generation. However we can recycle the error logs automatically by running the
    sp_cycle_errorlog on a fixed schedule (i.e. every two weeks) using SQL agent jobs so that the error logs will be recycled
    automatically without restarting SQL Server.
    And it is also very important for us to keep the error log files more readable. So we can increase the number of error logs a little more and run the sp_cycle_errorlog more frequently (i.e. daily), then each file will in a smaller size to be more readable
    and we can recycle the log files automatically.
    In addition, in order to avoid the size of all the log files growing into a too big size unexpected (sometime it may happen), we can run the following query in SQL Agent job to automatically delete all the old log files when the size of log files is larger
    than some value we want to keep (i.e. 30GB):
    --create a tample table to gather the information of error log files
    CREATE TABLE #ErrorLog
    Archieve INT,
    Dt DATETIME,
    FileSize INT
    GO
    INSERT INTO #ErrorLog
    EXEC xp_enumerrorlogs
    GO
    --delete all the old log files if the size of all the log files is larger than 30GB
    DECLARE @i int = 1;
    DECLARE @Log_number int;
    DECLARE @Log_Max_Size int = 30*1024; --here is the max size (M) of all the error log files we want to keep, change the value according to your requirement
    DECLARE @SQLSTR VARCHAR(1000);
    SET @Log_number = (SELECT COUNT(*) FROM #ErrorLog);
    IF (SELECT COUNT(FileSize/1024/1024) FROM #ErrorLog) >= @Log_Max_Size
    BEGIN
    WHILE @i <= @Log_number
    BEGIN
    SET @SQLSTR = 'DEL C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Log\ERRORLOG.' + CONVERT(VARCHAR,@i);
    EXEC xp_cmdshell @SQLSTR;
    SET @i =@i + 1;
    END
    END
    DROP TABLE #ErrorLog
    For more information about How to manage the SQL Server error log, please refer to the following article:
    http://support.microsoft.com/kb/2199578
    If you have any question, please feel free to let me know.
    Regards,
    Jerry Li

  • SQL LOGIC

    I have a question regarding a SQL statement that I wrote. The following SQL statement brings back no records:
    SELECT PROP_BOOK_SI.EMP_ID,
    AMPEMP.CLOCK_NUMBER,
    AMPEMP.LAST_NAME,
    AMPEMP.FIRST_NAME
    FROM PROP_BOOK_SI
    LEFT JOIN AMPEMP
    ON AMPEMP.EMP_ID = PROP_BOOK_SI.EMP_ID
    LEFT JOIN ENDED_MISSION
    ON ENDED_MISSION.EMP_ID = PROP_BOOK_SI.EMP_ID
    WHERE PROP_BOOK_SI.EMP_ID != ENDED_MISSION.EMP_ID
    AND PROP_BOOK_SI.AUDIT_DATE IS NULL
    However, if I write the SQL statement in this fashion, it brings back records:
    (SELECT PROP_BOOK_SI.EMP_ID,
    AMPEMP.CLOCK_NUMBER,
    AMPEMP.LAST_NAME,
    AMPEMP.FIRST_NAME
    FROM PROP_BOOK_SI
    LEFT JOIN AMPEMP
    ON AMPEMP.EMP_ID = PROP_BOOK_SI.EMP_ID
    LEFT JOIN ENDED_MISSION
    ON ENDED_MISSION.EMP_ID = PROP_BOOK_SI.EMP_ID
    WHERE PROP_BOOK_SI.AUDIT_DATE IS NULL)
    MINUS+
    (SELECT
    PROP_BOOK_SI.EMP_ID,
    AMPEMP.CLOCK_NUMBER,
    AMPEMP.LAST_NAME,
    AMPEMP.FIRST_NAME
    FROM PROP_BOOK_SI
    LEFT JOIN AMPEMP
    ON AMPEMP.EMP_ID = PROP_BOOK_SI.EMP_ID
    LEFT JOIN ENDED_MISSION
    ON ENDED_MISSION.EMP_ID = PROP_BOOK_SI.EMP_ID
    WHERE PROP_BOOK_SI.EMP_ID = ENDED_MISSION.EMP_ID)
    Logically, it appears to me that both SQL statements are the same. Why the difference in output?
    Edited by: 969700 on Nov 5, 2012 10:19 PM

    I don't exactly understand the human logic you need to implement - please, explain your purpose. Do you need to return the result of the left join, where the rows doesn't match and the resulting outer joined field contains null?
    If so, try smth like this:
    SELECT PROP_BOOK_SI.EMP_ID,
    AMPEMP.CLOCK_NUMBER,
    AMPEMP.LAST_NAME,
    AMPEMP.FIRST_NAME
    FROM PROP_BOOK_SI
    LEFT JOIN AMPEMP
    ON AMPEMP.EMP_ID = PROP_BOOK_SI.EMP_ID
    LEFT JOIN ENDED_MISSION
    ON ENDED_MISSION.EMP_ID = PROP_BOOK_SI.EMP_ID
    WHERE (ENDED_MISSION.EMP_ID IS NULL AND PROP_BOOK_SI.EMP_ID IS NOT NULL)
    AND PROP_BOOK_SI.AUDIT_DATE IS NULL
    It must return all pairs where fields doesn't match and exclude rows with both null fields
    Edited by: apiminov on 05.11.2012 23:47

  • Question regarding the Transformation activity in BPEL

    Hi,
    I have a question regarding the Transformation activity in BPEL.
    I have a database adapter that uses a PL/SQL API. The API returns two tables of nested objects and it automatically generates a schema for me based on the outputs structure. I need to use the Transformation activity to map both these out parameters to root element in the destination.
    The element in the destination is "unbounded". Please take a look at the following screen shot -
    http://www-apps.us.oracle.com:1100/~rvishnuv/transform1.gif
    From the screen shot, you can notice that I have two XML segments X_TEST_TBL and X_TEST_TBL1 in the source and I have one GLOGXMLElement ("unbounded") in the destination. I need to map each of the source elements to the same destination. Then internally, I will be mapping the elements of X_TEST_TBL to "Location" segment/element and the elements of "X_TEST_TBL1" to "ItemMaster" segment/element. If I try to use "foreach" and map second
    element "X_TEST_TBL1" also GLOGXMLElement using the foreach, I get the following error -
    http://www-apps.us.oracle.com:1100/~rvishnuv/transform1_error.gif
    Let us say my X_TEST_TBL contians two records and X_TEST_TBL1 contains one record. Is there any way that I can use these two out parameters to map to the same destination (GLOGXMLElement) so that my final document contains multiple "GLOGXMLElement"s that represents data from both the output parameters? i.e. there should be in total of three occurances of GLOGXMLelement in the output document such that two occurances correspond to data obtained from X_TEST_TBL and one corresponds to data from X_TEST_TBL1.
    Please let me know if there is any way to achieve this.
    Thanks
    Ravi

    Is the listed $200 credit towards a trade-in on top of the original trade in value of a phone, or the maximum amount?

  • Logical error in the query

    create table my_employee
    (id number(4)primary key,
    last_name varchar2(25),
    first_name varchar2(25),
    userid varchar2(8),
    salary number(9,2)
    I want to write an INSERT statement to MY_EMPLOYEE table . Concatenate the first letter of the first name and first seven characters of the last name to produce user ID using a single sql statement
    I wrote the query like this and i am getting logical error
    insert into my_employee
    values(&id,'&last_name','&first_name',substr('&&first_name',1,1)||substr('&last_name',1,7),&salary);
    SQL> insert into my_employee
    2 values(&id,'&last_name','&first_name',substr('&&first_name',1,1)||substr('&last_name',1,7),&sal
    ary);
    Enter value for id: 20
    Enter value for last_name: popopopp
    Enter value for last_name: qwertyyuu
    Enter value for salary: 300000
    old 2: values(&id,'&last_name','&first_name',substr('&&first_name',1,1)||substr('&last_name',1,7),
    new 2: values(20,'popopopp','o',substr('o',1,1)||substr('qwertyyuu',1,7),300000)
    1 row created.
    it is asking the last_name two times

    you can do it with a .sql script
    c:\my_emp.sql
    PROMPT
    PROMPT instering my_employees
    PROMPT
    ACCEPT ID NUMBER PROMPT 'ID ? : '
    ACCEPT FIRST_NAME CHAR PROMPT 'FIRST_NAME ?: '
    ACCEPT LAST_NAME CHAR PROMPT 'LAST_NAME ?: '
    ACCEPT SALARY NUMBER PROMPT 'SALARY ? : '
    insert into my_employee values(&id,'&last_name','&first_name',substr('&&first_name',1,1)||substr('&last_name',1,7),&salary);
    SELECT * FROM my_employee where id=&&id;
    and then from sqlplus @c:\my_emp.sql
    scott@ORCL> @C:\MY_EMP
    instering my_employees
    ID ? : 20
    FIRST_NAME ?: john
    LAST_NAME ?: papas
    SALARY ? : 1000
    old 1: insert into my_employee values(&id,'&last_name','&first_name',substr('&&first_name',1,1)||substr('&last_name',1,7),&salary)
    new 1: insert into my_employee values( 20,'papas','john',substr('john',1,1)||substr('papas',1,7), 1000)
    1 row created.
    old 1: SELECT * FROM my_employee where id=&&id
    new 1: SELECT * FROM my_employee where id= 20
    ID LAST_NAME FIRST_NAME USERID SALARY
    20 papas john jpapas 1000
    scott@ORCL>

  • Question Regarding MIDI and Sample Accuracy

    Hi,
    I have 2 questions regarding MIDI.
    1. MIDI is moved by ticks. In the arrange window however, you can move a region by samples. When doing this, you can move within values of the ticks (which you can see on your position box that pops up) Now, will this MIDI note actually be played back at that specific sample point, or will it round the event to the closest tick? (example, if I have a MIDI note directly on 1.1.1.1, and I move the REGION in the arrange... will that MIDI note now fall on the sample that I have moved the region to, or will it be rounded to the closest tick?)
    2. When making a midi template from an audio region, will the MIDI information land exactly on the sample of the transient, or will it be rounded to the closest tick?
    I've looked through the manual, and couldn't find any specific answer to these questions.
    Thanks!
    Message was edited by: Matthew Usnick

    Ok, I've done some experimenting, and here are my results.
    I believe those numbers ARE samples. I came to this conclusion by counting (for some reason it starts on 11) and cutting a region to be 33 samples long (so, minus 11, is 22 actual samples). I then went to the Audio Bin window, and chose to view region length as samples. And there it said it: 22 samples. So, you can in fact move MIDI regions by samples!
    Second, I wanted to see if the MIDI notes in the region itself would be quantized to the nearest tick. I cut a piece of audio, so it had a 1 sample attack (zoomed in asa far as I could in the sample editor, selected the smallest portion, and faded in, and made the start point, the region start position). I saved the region as a new audio file, and loaded it up in the exs sampler.
    I then made a MIDI region, with and triggered the sample on beat 1 (quantized, on the money). I then went into the arrange window, made a fixed cycle length, and bounced the audio. I then moved the MIDI region by one sample to the right. I did this 22 times (which is the number of samples in a tick, at 120, apparently). After bouncing all of these (cycle position remained fixed, only the MIDI region was moving) I imported all the audio into the arrange on new tracks, and YES!!! The sample start was cascaded by a sample each time!
    SO.
    Not only can you move MIDI regions by sample, but the positions are NOT quantized to Logics ticks!
    This is very good news, and glad I worked this out!
    (if anyone thinks this sounds wrong, please correct me, but I'm pretty sure I proved it, in my test)
    Message was edited by: Matthew Usnick

  • Question regarding IWDTree and context Value Node naming

    Hi,
    I have a question regarding the IWDTree / IWDTreeNodeType components.
    I have a context looking like this:
    Context
      + ResponseNode
        + PersonNode (1..1)
          + PersonAddressNode                    (empty node, placeholder)
          | + AdresNode (0..n)
          + PersonChildNode                      (empty node, placeholder)
          | + PersonNode (0..n)
          |   + PersonAddressNode                (empty node, placeholder)
          |     + AddressNode (0..n)
          + PersonParentsNode                    (empty node, placeholder)
            + PersonNode (0..n)
              + PersonAddressNode                (empty node, placeholder)
                + AddressNode (0..n)
    The context represents a person, a person's address, and a person's children and parents with their respective addresses.
    As a result, on different branches, a PersonNode and AddressNode can appear.
    And for some strange reason, all PersonNodes and AddressNodes link to the same ResponseNode.PersonNode.PersonParentsNode.PersonNode and ResponseNode.PersonNode.PersonParentsNode.PersonNode.PersonAddressNode.AddressNode respectively, irregardless of their branch...
    Is it illegal to have multiple PersonNode and AddressNode node names, and should they be named uniquely?

    Generally, node names need to be unique inside the context, attributes in different nodes can have same names. I wonder if the context structure you described will result in code without compile errors.
    The WD Tree can only be used with recursive context nodes or with a hierarchy of non-singleton child nodes.
    Can you give an example how your tree should look like at runtime?

Maybe you are looking for

  • Problem creating JDBC dataview to oracle on Windows

    Hi, I'm trying to configure a JDBC dataview to an Oracle 10g database on DSEE 6.3.1 running Windows 2008 Here are the command I used: dpconf create-jdbc-data-source -b MYDBSID -B jdbc:oracle:thin://dbhost:1510: \      -J file://e:\dsee\ojdbc14.jar \

  • Sending photos from iphone ios 7 to my email: not sending as attachment thumbnails WTH?

    hi all, i was wondering if anyone can provide a solution for me with this peculier issue. normally if i select a few photos to send to my email client (gmail) they will come in as attatchment that i can download to my desktop or whereever. since upda

  • How to connect to my network?

    The Wi-Fi is ON "Choose a Network" The network is shown (with a padlock) - virginmedia4177920 Ask to Join Networks is ON Then I get message:- Unable to join the network "virginmedia4177920"  Dismiss I connect through Realtek PCIe GBE Family Controlle

  • BAPI function module to get condition type and its values based on delivery number?

    Hi All, I would like to have the BAPI function module to get condition type value based on delivery number before invoice is created.please provide detail program for as a reference .please reply as soon as possible its urgent. Regards, saaikumar.

  • Can't open jpegs into Camera Raw from Bridge

    Everytime I right click on an image to open it into camera raw I get a message telling me Bridge's Parent Application is not Active Bridge Requires that a qualifying product has been launched at least once to enable this feature. What??? I don't get