I need help with an SQL Error: ORA-00904: "TBL_0022"."EUID": invalid identi

Hello All,
I am receiving an error message when I run a relatively simple insert statement. I have verified that all the columns are defined in the tables.
Error starting at line 1 in command:
INSERT INTO TBL_0022(TBL_0022.OLD_OBSID,TBL_0022.EUID,TBL_0022.MCUID,TBL_0022.WORKPERF,TBL_0022.LOC,TBL_0022.ACTION,TBL_0022.SIGN,TBL_0022.VEHID,TBL_0022.DLID,TBL_0022.SECID,TBL_0022.OBSDATE,TBL_0022.ENTDATE,TBL_0022.EID,TBL_0022.OLD0022ID,TBL_0022.OLD_ENTDATE)
(SELECT TBL_0022_COPY.OLD_OBSID,TBL_0022_COPY.EUID,TBL_0022_COPY.MCUID,TBL_0022_COPY.WORKPERF,TBL_0022_COPY.LOC,TBL_0022_COPY.ACTION,TBL_0022_COPY.SIGN,TBL_0022_COPY.VEHID,TBL_0022_COPY.DLID,TBL_0022_COPY.SECID,TBL_0022_COPY.OBSDATE,TO_DATE(SUBSTR(TBL_0022_COPY.ENTDATE, 1, 8),'mm/dd/yyyy'),TBL_0022_COPY.EID,TBL_0022_COPY.OLD0022ID,TBL_0022_COPY.OLD_ENTDATE
FROM TBL_0022_COPY
WHERE length(TBL_0022_COPY.ENTDATE) = 14)
Error at Command Line:1 Column:40
Error report:
SQL Error: ORA-00904: "TBL_0022"."EUID": invalid identifier

Don't worry. Below is the formatted code for you. Run this and let me know what error it gives.
INSERT INTO TBL_0022(TBL_0022.OLD_OBSID,
                     TBL_0022.EUID,
                     TBL_0022.MCUID,
                     TBL_0022.WORKPERF,
                     TBL_0022.LOC,
                     TBL_0022.ACTION,
                     TBL_0022.SIGN,
                     TBL_0022.VEHID,
                     TBL_0022.DLID,
                     TBL_0022.SECID,
                     TBL_0022.OBSDATE,
                     TBL_0022.ENTDATE,
                     TBL_0022.EID,
                     TBL_0022.OLD0022ID,
                     TBL_0022.OLD_ENTDATE)
SELECT  TBL_0022_COPY.OLD_OBSID,
        TBL_0022_COPY.EUID,
        TBL_0022_COPY.MCUID,
        TBL_0022_COPY.WORKPERF,
        TBL_0022_COPY.LOC,
        TBL_0022_COPY.ACTION,
        TBL_0022_COPY.SIGN,
        TBL_0022_COPY.VEHID,
        TBL_0022_COPY.DLID,
        TBL_0022_COPY.SECID,
        TBL_0022_COPY.OBSDATE,
        TO_DATE(SUBSTR(TBL_0022_COPY.ENTDATE, 1, 8),'mm/dd/yyyy'),/* Something is wrong here with respect to 8 in substr*/
        TBL_0022_COPY.EID,
        TBL_0022_COPY.OLD0022ID,
        TBL_0022_COPY.OLD_ENTDATE
FROM TBL_0022_COPY
WHERE length(TBL_0022_COPY.ENTDATE) = 14Cheers
Sarma.

Similar Messages

  • I need help with this code error "unreachable statement"

    the error_
    F:\Java\Projects\Tools.java:51: unreachable statement <-----------------------------------------------------------------------------------------------------------------THIS
    int index;
    ^
    F:\Java\Projects\Tools.java:71: missing return statement
    }//end delete method
    ^
    F:\Java\Projects\Tools.java:86: missing return statement
    }//end getrecod
    ^
    3 errors
    import java.util.*;
    import javax.swing.*;
    import java.awt.*;
    public class Tools//tool class
    private int numberOfToolItems;
    private ToolItems[] toolArray = new ToolItems[10];
    public Tools()//array of tool
    numberOfToolItems = 0;
    for(int i = 0; i < toolArray.length; i++)//for loop to create the array tools
    toolArray[i] = new ToolItems();
    }//end for loop
    }//end of array of tools
    public int search(int id)//search mehtod
    int index = 0;
    while (index < numberOfToolItems)//while and if loop search
    if(toolArray[index].getID() == id)
    return index;
    else
    index ++;
    }//en while and if loop
    return -1;
    }//end search method
    public int insert(int id, int numberInStock, int quality, double basePrice, String nm)//insert method
    if(numberOfToolItems >= toolArray.length)
    return 0;
    int index;
    index = search(id); <-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------HERE
    if (index == -1)
    toolArray[index].assign(id,numberInStock, quality, basePrice,nm);
    numberInStock ++;
    return 1;
    }//end if index
    }//end if toolitem array
    return -1;
    }//end insert method
    public int delete(/*int id*/)//delete method
    }//end delete method
    public void display()//display method
    for(int i = 0; i < numberOfToolItems; i++)
    //toolArray.display(g,y,x);
    }//end display method
    public String getRecord(int i)//get record method
    // return toolArray[i].getName()+ "ID: "+toolArray[i].getID()
    }//end getrecod
    }//end class
    Edited by: ladsoftware on Oct 9, 2009 6:08 AM
    Edited by: ladsoftware on Oct 9, 2009 6:09 AM
    Edited by: ladsoftware on Oct 9, 2009 6:10 AM
    Edited by: ladsoftware on Oct 9, 2009 6:11 AM

    ladsoftware wrote:
    Subject: Re: I need help with this code error "unreachable statement"
    F:\Java\Projects\Tools.java:51: unreachable statement <-----------------------------------------------------------------------------------------------------------------THIS
    int index;
    ^
    F:\Java\Projects\Tools.java:71: missing return statement
    }//end delete method
    ^
    F:\Java\Projects\Tools.java:86: missing return statement
    }//end getrecod
    ^
    3 errorsThe compiler is telling you exactly what the problems are:
    public int insert(int id, int numberInStock, int quality, double basePrice, String nm)//insert method
    if(numberOfToolItems >= toolArray.length)
    return 0; // <<== HERE you return, so everyting in the if block after this is unreachable
    int index;
    index = search(id);  //< -----------------------------------------------------------------------------------------------------------------HERE
    if (index == -1)
    toolArray[index].assign(id,numberInStock, quality, basePrice,nm);
    numberInStock ++;
    return 1;
    }//end if index
    }//end if toolitem array
    return -1;
    }//end insert method
    public int delete(/*int id*/)//delete method
    // <<== HERE where is the return statement?
    }//end delete method
    public String getRecord(int i)//get record method
    // return toolArray.getName()+ "ID: "+toolArray[i].getID() <<== HERE you commented out the return statement
    }//end getrecod
    }//end class

  • Need help in understanding the error ORA-01843: not a valid month - ECX_ACT

    Hello All,
    We need help in understanding the Transaction Monitor -> Processing Message (error "ORA-01843: not a valid month - ECX_ACTIONS.GET_CONVERTED_DATE").
    And how to enable the log for Transaction Monitor -> Processing Logfile.
    Actually we are trying to import the Purchase Order XML (OAG) into eBusiness Suite via BPEL Process Manager using the Oracle Applications Adapter. The process is working fine with expected payload until it reaches the XML Gateway Transaction Monitor, where we are getting this error.
    thanks
    muthu.

    Hello All,
    We need help in understanding the Transaction Monitor -> Processing Message (error "ORA-01843: not a valid month - ECX_ACTIONS.GET_CONVERTED_DATE").
    And how to enable the log for Transaction Monitor -> Processing Logfile.
    Actually we are trying to import the Purchase Order XML (OAG) into eBusiness Suite via BPEL Process Manager using the Oracle Applications Adapter. The process is working fine with expected payload until it reaches the XML Gateway Transaction Monitor, where we are getting this error.
    thanks
    muthu.

  • I Need help with the following error:

    Hi, I am getting the following error:
    <b>BPE_ADAPTER">SYSTEM_FAILURE_INTERNAL</b>
    I have looked at some of the other threads that deal with this but since I am new to XI I am not sure where to look. I have tried to activate in SXI_CACHE and I get a code of 99 with the following error. I did not get this error in the QAS environment, only when it was moved to Prod. We have cleared and reset all of the caches and am still getting this error when I try to activate in SXI_CACHE:
    <b>E     'STATUSCODE' is not a component of data object 'PAYLOAD'</b>
    Can someone point me in the right direction to fix this? We just moved it to prod and need to get it fixed asap.
    Thanks in advance for all of the help.
    Mike Curtis

    Hi Michael,
    Before SP16:
    the problem should be solved with the help of note 890760. You might find note
    816430 interesting as well, but the first one should help you solve the problem.
    After:
    If those are already in your system, have a look at note 996631. This could be
    the solution.
    Regards and good luck with XI.
    Jaime

  • Send mail with pl/sql error ORA -29540

    Hi everybody
    I try to use a procedure to send emails. I've got the procedure here in this forum from Kiron Rao (thanks). When I execute this procedure I get this error message :
    [1]: (Error): ORA-29540: class oracle/plsql/net/TCPConnection does not exist ORA-06512: at line 8
    any idea ?
    here is the script :
    CREATE PROCEDURE MAILTEST
    IS
    conn UTL_SMTP.CONNECTION;
    mailhost VARCHAR2(64) := 'mailhost.server.com';
    abcd VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
    mesg VARCHAR2(4000);
    usrname VARCHAR2(30);
    usraddr VARCHAR2(100);
    subj VARCHAR2(100);
    body_of_msg VARCHAR2(100);
    recaddr VARCHAR2(100);
    BEGIN
    usrname:= 'Alain Smaili';
    usraddr:= '[email protected]';
    recaddr:= '[email protected]';
    subj:= 'This is a PL/SQL Email Test';
    body_of_msg := '<HTML><BODY><B><I>This is a PL/SQL Email Test from oradb1p</I></B></BODY></HTML>';
    mesg:= 'Date: ' || TO_CHAR(SYSDATE, 'dd Mon yy hh24:mi:ss') || utl_tcp.crlf ||
    'From: ' || usrname || ' <' || usraddr || '>' || utl_tcp.crlf ||
    'Subject: ' || subj || utl_tcp.crlf ||
    'Content-Type: text/html' || utl_tcp.crlf ||
    'X-Priority: 1' || utl_tcp.crlf ||
    'Return-Receipt-To: [email protected]' || utl_tcp.crlf;
    mesg:= mesg || utl_tcp.crlf || body_of_msg;
    conn:= utl_smtp.open_connection(mailhost, 25);
    utl_smtp.helo(conn,mailhost);
    utl_smtp.mail(conn, usraddr);
    utl_smtp.rcpt(conn,recaddr);
    utl_smtp.data(conn, mesg);
    utl_smtp.quit(conn);
    EXCEPTION
    WHEN others THEN
    RAISE;
    END;

    Some of the class files are missing ? did U load plssql.jar files succesfully?
    Cehck the asktom.oracle.com site for more detailed information regarding this error
    Ashok

  • Dynamic SQL Error -ORA-00904: invalid identifier

    Hello!
    I'm really hoping I can get some fast help on this. In the interest of honesty, this is for a university oracle programming assignment. I've searched everywhere I can for the answer and haven't had any luck.
    Anyway, the problem in a nutshell. I have to write a package to write a text file. The formatting information for the file is held in a table, which has columns to define the various characteristics like justification, padding character and field value.
    RECORDTYPE FIELDNAME FIELDVALUE FIELDSIZE FIELDORDER PADDINGCHAR JUSTIFICATION DATASOURCE
    7 CreditTotal v_credit 10 5 '0' LPAD PROGRAM
    7 RecordType '7' 1 1 ' ' RPAD HARDCODE
    I can build the whole file except this footer. the FieldValue "v_credit" references a variable that has the calculated total of the credit amounts for the file. There are also "v_debit", and "(v_credit-v_debt)" entries.
    My question seems simple... How can I use this VARCHAR2 value from the table, and have it reference the variable within a Dynamic SQL string? If I use the textvalue of the column in the SQL string it gives me the invalid identifier error when it hits the EXECUTE IMMEDIATE statement. There is another row for the header which has "to_char(sysdate,'DDMMYYYY')" in it, and that runs fine. I'm assuming because they are native SQL statements and variables.
    I have tried encapsulating the v_credit in "s, and using dynamica bind variables but had the same problem passing the names to the USING clause.
    The SQL string created by the procedure is: SELECT LPAD(v_credit,10,'0' ) FROM dual
    The full error is:
    ORA-00904: "V_CREDIT": invalid identifier
    ORA-06512: at "BWOOD.PKG_BRIAN", line 108
    ORA-06512: at line 2
    Line 108 is the EXECUTE IMMEDIATE statement
    I would really appreciate someones help! I'm happy to post the procedure I've written, with the caveat that it's sloppy student work and needs cleaning up of all the experimental commented attempts:)
    Edited by: user5426606 on 20-May-2009 03:34 - Added a few more facts.

    Thank you for the fast replies. I'll post a short chunk of code to demonstrate.
    The actual procedure is quite a bit longer, but this should give you the idea.
    PROCEDURE build_dbfile (p_settlement_date IN DATE, p_settlement_key IN VARCHAR2, p_type IN VARCHAR2) AS
    v_sqlString    VARCHAR2(4000) := 'SELECT ';
    v_rectype     NUMBER := 7;
    v_line           LONG;
    v_debit        NUMBER := 0;
    v_credit       NUMBER := 0;
    v_nrRecords    NUMBER := 0;
      CURSOR c_settlement IS... -- to select records for data rows
    -- cursor to select the rows with the file formatting and data info
      CURSOR c_header IS   SELECT   NVL(fieldvalue,fieldname) db_field, <---- selects the data column
                                                   fieldsize,
                                                   NVL(paddingchar, ''' ''') paddingchar,
                                                   NVL(justification,'LPAD') justification,
                                                  datasource
                                      FROM     FSS_DESKBANK_REF
                                      WHERE    recordtype = r_rec_types.recordtype
                                      ORDER BY recordType, fieldorder;
    -- SELECT to get the SUM of datarows for v_credit
      SELECT      SUM(transactionamount)
      INTO      v_credit...
    -- SELECT to get the SUM of datarows for v_debit
      SELECT      SUM(transactionamount)
      INTO      v_debit....
    FOR r_head IN c_header LOOP
    v_sqlString := v_sqlString  || r_head.justification|| '('
                                         || r_head.db_field ||','
                                         || r_head.fieldsize || ','
                                         || r_head.paddingchar || ')';
    v_sqlString := v_sqlString || ' FROM ' || v_tbl_name;
    DBMS_OUTPUT.PUT_LINE('SQL --> '||v_sqlString);
    EXECUTE IMMEDIATE v_sqlString INTO v_line;
    END LOOP;
    DBMS_OUTPUT.PUT_LINE(v_line);
    END build_dbfile;So the loop goes through the table rows, grabs each data value and formatting column, and builds the sql string, which is then passed to the execute statement. The issue is the ones where the datarow contains a reference to v_credit, and the error is generated. ie r_head.db_field contains the string "v_credit"
    Satish, the sql does look like that in the string, but the string is built from the table, not hardcoded. ie v_sqlString = "SELECT LPAD(v_credit,10,'0' ) FROM dual" when it is passed to the EXECUTE IMMEDIATE.
    Edited by: user5426606 on 20-May-2009 05:19

  • Pl/SQL Error ORA-00904 not showing in Oracle SQL Developer

    Hi,
    I am new to Oracle and the various development tools available.
    Whilst using Oracle SQL Developer we have come across a scenario where a PL/SQL package does not compile, but only shows warnings in the compiler log.
    The same packeage when compiled using PL/SQL Navigator shows a much more detailed list of errors, and highlights the real problem.
    Why does Oracle SQL Developer not show the following error?
    PL/SQL: ORA-00904: "SERIAL_LINE_ID": invalid identifier
    Regards
    Adrian

    There are various settings you can give to messages. (eg, informational, warning, severe).
    Tools-PL/SQL compiler options.
    Normally, just the first 20 messages are displayed.
    Either change code to get rid of warning messages, or change settings to ignore informational and warning messages.
    P.S. There is a dedicated sqldeveloper forum where your question should really have been posted.
    Edited by: Keith Jamieson on Mar 9, 2009 1:45 PM

  • NEED HELP IN CONFLICT HANDLER ERROR ORA-01403: no data found

    Hi All,
    I am using Oracle Streams to replicate the data...
    I need to update the records on the destination with some particular condition like if USER_COUNTRY = 'XXX' then the data need to be updated in the destination side else skip ...
    I wrote the procedure ..below .. the data is not replicating and found the below error from dba_apply_error..
    ORA-01403: no data found
    ORA-06512: at "SYS.LCR$_ROW_RECORD", line 419
    Table called history_row_lcrs is created in the strmadmin to store the lcr values...
    CREATE OR REPLACE PROCEDURE proc_test(in_any sys.anydata)IS
    lcr sys.lcr$_row_record;
    rc pls_integer;
    v_type varchar2(20);
    col_1 sys.anydata;
    lcr_usercountry varchar2(20);
    TRANS varchar2(20);
    skip_routine Exception;
    BEGIN
    rc:=in_any.GetObject(lcr);
    v_type:=lcr.get_command_type();
    col_1:=lcr.get_value('NEW','USER_COUNTRY');
    rc:=col_1.GetVarchar2(lcr_usercountry);
    for x in ( select user_country from TEST.TESTREP1
    where USER_COUNTRY=lcr_usercountry)
    Loop
    IF (x.USER_COUNTRY = 'XXX')
    THEN
    insert into strmadmin.history_row_lcrs VALUES (SYSDATE, lcr.GET_SOURCE_DATABASE_NAME(), lcr.GET_COMMAND_TYPE(),
    lcr.GET_OBJECT_OWNER(), lcr.GET_OBJECT_NAME(), lcr.GET_TAG(), lcr.GET_TRANSACTION_ID(), lcr.GET_SCN(),
    lcr.GET_COMMIT_SCN,lcr.GET_VALUES('old'), lcr.GET_VALUES('new', 'n'));
    lcr.EXECUTE(true);
    ELSE
    Raise Skip_routine;
    END IF;
    END Loop;
    Exception
    when skip_routine Then
    null;
    END;
    BEGIN
    DBMS_APPLY_ADM.SET_DML_HANDLER(
    object_name => 'TEST.TESTREP1',
    object_type => 'TABLE',
    operation_name => 'UPDATE',
    error_handler => false,
    user_procedure => 'STRMADMIN.PROC_TEST',
    apply_database_link => NULL,
    apply_name => NULL);
    END;
    Please try to help me if am doing something wrong...because I need to update only one colums am using DML_HANDLER instead of SET_UPDATE_CONFLICT_HANDLER...
    Any other inputs are also appreciated...
    Thanks In Advance and appreciate for the quick reply...

    I fired the query, am not getting any output from dbms_output.put_line('..|USER_COUNTRY..');
    Is that no data is reading or may be any reason else..
    in this table store_id is the primary key ..
    SQL> set serveroutput on
    SQL> CREATE OR REPLACE PROCEDURE test(in_any sys.anydata) IS
    2 lcr sys.lcr$_row_record;
    3 rc pls_integer;
    4 v_type varchar2(20);
    5 col_1 sys.anydata;
    6 col_2 sys.anydata;
    7 lcr_usercountry varchar2(20);
    8 lcr_storeid number;
    9 TRANS varchar2(20);
    10 store_id number;
    11 USER_COUNTRY varchar2(20);
    12
    13 BEGIN
    14 rc:=in_any.GetObject(lcr);
    15 v_type:=lcr.get_command_type();
    16 col_1:=lcr.get_value('NEW','USER_COUNTRY');
    17 rc:=col_1.GetVarchar2(lcr_usercountry);
    18 col_2:=lcr.get_value('NEW','STORE_ID');
    19 rc:=col_2.getnumber(lcr_storeid);
    20 select user_country into user_country from dev03.testrep1 where user_country=lcr_usercountry and store_id=lcr_storeid;
    21 dbms_output.put_line('---------||USER_COUNTRY ||-----------');
    22 END;
    23 /
    Procedure created.
    Thanks for your help ....

  • Need help with System.setClipboard error

    SDK version: 3.3.0.4589
    Requires flash 10.0.12 or higher
    Code:
    private function sendTextToClipboard():void
         System.setClipboard("User Name: " + uname + "\n" + "Password: " + pword);
    I am using the System.setClipboard function in my application and have incountered an interesting problem.
    When the call is made on a windows box (XP and Vista) IE crashes.
    The following is the Vista IE error that is being thrown:
    Problem signature:
    Problem Event Name: APPCRASH
    Application Name: iexplore.exe
    Application Version: 8.0.6001.18865
    Application Timestamp: 4b077416
    Fault Module Name: Flash10c.ocx
    Fault Module Version: 10.0.32.18
    Fault Module Timestamp: 4a613d79
    Exception Code: c0000005
    Exception Offset: 0016f1f2
    OS Version: 6.0.6002.2.2.0.256.6
    Locale ID: 1033
    Additional Information 1: fd00
    Additional Information 2: ea6f5fe8924aaa756324d57f87834160
    Additional Information 3: fd00
    Additional Information 4: ea6f5fe8924aaa756324d57f87834160
    The following is the XP SP3 IE error:
    Internet Explorer has encountered a problem with an add-on and needs to close.
    The following add-on was running when this problem occured:
    File:    FlDbg10b.ocx
    iexplore.exe - Application Error
    The instruction "0x052bee0e" referenced memory at "0x00000018".  The memory could not be read.
    Any help would be greatly apprieciated.

    Try the example in the docs and see if that works.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Newbie - need help with a SQL query for a bar chart

    Hi,
    I'm a new user on APEX with no real SQL knowledge and I'm trying to build a dashboard with charts into an existing APEX application. Based on another application, I have come up with the following SQL code:
    select null link
    , CATEGORY label
    , count (decode(PROJECT_STATUS,'1',PROJECT_ID))"Active"
    , count (decode(PROJECT_STATUS,'2',PROJECT_ID))"Complete"
    , count (decode(PROJECT_STATUS,'3',PROJECT_ID))"On Hold"
    , count (decode(PROJECT_STATUS,'4',PROJECT_ID))"Pipeline"
    , count (decode(PROJECT_STATUS,'5',PROJECT_ID))"Pending Review"
    from GRAPO_PROHEADTRK
    where (PROJECT_STATUS='1' or PROJECT_STATUS='2' or PROJECT_STATUS='3' or PROJECT_STATUS='4' or PROJECT_STATUS='5' or PROJECT_STATUS='6')
    group by CATEGORY
    Order by COUNT(PROJECT_ID) DESC
    The code from the other app was:
    select null link
    , FUNCTIONAL_AREA label
    , count (decode(PROJECT_STATUS,'Active',PROJECT_ID))"Active"
    , count (decode(PROJECT_STATUS,'Complete',PROJECT_ID))"Complete"
    , count (decode(PROJECT_STATUS,'On Hold',PROJECT_ID)) "On Hold"
    , count (decode(PROJECT_STATUS,'Recurring',PROJECT_ID))"Recurring"
    , count (decode(PROJECT_STATUS,'Pipeline',PROJECT_ID))"Pipeline"
    , count (decode(PROJECT_STATUS,'Not Approved',PROJECT_ID))"Not Approved"
    from PM_V2
    where LOB='S2S' and (FUNCTIONAL_AREA='Accounts Payable' or FUNCTIONAL_AREA='Expense' or FUNCTIONAL_AREA='Procurement' or FUNCTIONAL_AREA='Fixed Assets')
    group by FUNCTIONAL_AREA
    Order by COUNT(PROJECT_ID) DESC
    I'm getting a "Failed to parse SQL query!" error when I try to run validation.
    Is this enough info for some assistance? Any help would really be appreciated.
    Thanks,
    Rachel

    Hello,
    This is more of an SQL question, rather than specifically APEX-related. It's notable that you say: I'm a new user on APEX with no real SQL knowledgeWhich is fine (we all have to start somewhere, afterall) but it might be worth de-coupling the problem from APEX in the first instance. I'd also strongly recommend either taking a course, reading a book (e.g. http://books.google.co.uk/books?id=r5vbGgz7TFsC&printsec=frontcover&dq=Mastering+Oracle+SQL&hl=en#v=onepage&q=Mastering%20Oracle%20SQL&f=false) or looking for a basic SQL tutorial - it will save you a whole lot of heartache, I promise you. Search the oracle forums for the terms "Basic SQL Tutorial" and you should come up with a bunch of results.
    Given that you've copied your query template from another, I would suggest ensuring that the actual query works first of all. Try running it in either:
    * SQL Editor
    * SQL*Plus
    * an IDE like SQL Developer (available free from the OTN: http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html ) or TOAD or similar.
    You may find there are syntax errors associated with the query - it's difficult to tell without looking at your data model.
    select null link
    , CATEGORY label
    , count (decode(PROJECT_STATUS,'1',PROJECT_ID))"Active"
    , count (decode(PROJECT_STATUS,'2',PROJECT_ID))"Complete"
    , count (decode(PROJECT_STATUS,'3',PROJECT_ID))"On Hold"
    , count (decode(PROJECT_STATUS,'4',PROJECT_ID))"Pipeline"
    , count (decode(PROJECT_STATUS,'5',PROJECT_ID))"Pending Review"
    from GRAPO_PROHEADTRK
    where (PROJECT_STATUS='1' or PROJECT_STATUS='2' or PROJECT_STATUS='3' or PROJECT_STATUS='4' or PROJECT_STATUS='5' or PROJECT_STATUS='6')
    group by CATEGORYNote that your "order by" clause references a field called "PROJECT_ID", which exists in the old query but you've changed other similar references to "PROJECT_STATUS" - is it possible you've just missed this one? The perils of copy-paste coding I'm afraid...

  • Power Query for Excel - Need Help with Oracle SQL Syntax

    Hello everyone,
    I am new to Power Query and am not able to figure this out.  I am trying to pull in data into my Excel spreadsheet using a specific Oracle SQL query.  While in query editor, how do I take the Oracle.Database function and add my SQL statement? 
    I already know what I want, I don't want it to download all the table names.  According to the help page, I should be able to do this but it does not provide a syntax example
    Also, I don't understand what "optional options as nullable record" means.
    Below is what function and arguments the help page notes.  How do I use this?
    Oracle.Database(server as text, optional options as nullable record) as table
    Any help is greatly appreciated.
    Thank you,
    Jessica

    When I try this, I get an error 
    DataSource.Error: Oracle: Sql.Database does not support the query option 'Query' with value '"Select * from Owner.View_Name"'. Details: null
    I'm trying to download oracle data from a view into power query - Power Query navigator does not list th eviews from my source, it lists only the tables. When I try write sql statements, it throws me the above
    error. This is what I tried
     Oracle.Database("Source/Service",[Query="Select * from Owner.View_Name"])
    Any ideas how to fix this? 

  • I need help with my ipods error 21 please help

    my ipod doesn't like to restore on my computer its a windows 7 and i have the latest itunes can somebody please help me the i

    Error 20, 21, 23, 26, 28, 29, 34, 36, 37, 40
    These errors typically occur when security software interferes with the restore and update process. FollowTroubleshooting security software issues to resolve this issue. In rare cases, these errors may be a hardware issue. If the errors persist on another computer, the device may need service.
    The "device may need service" means a hardware problem. In that case make an appointment at the Genius Bar of an Apple store.
    Apple Retail Store - Genius Bar

  • [Solved] Need help with DSDT - 15 errors

    I downloaded a tool designed for mac DSDT editing from the internet, for Windows (as Linux doesn't show battery properly yet).
    Here's my system:
    Toshiba Satellite L750D
    AMD A8 APU
    ATI 6620HD Discrete Graphics
    On Linux, the following doesn't seem to work correctly:
    - Fan spins very high and makes a lot of noise
    - The battery BAT1 isn't even detected as a device and the only device under /sys/class/power_supply/ is ACAD, which is something else.
    On Linux, I get the following errors which suggests a buggy DSDT table:
    kyle@kyle-laptop ~ dmesg | grep ACPI
    [ 0.000000] BIOS-e820: [mem 0x00000000cf486000-0x00000000cf88efff] ACPI NVS
    [ 0.000000] BIOS-e820: [mem 0x00000000cfbbf000-0x00000000cfebefff] ACPI NVS
    [ 0.000000] BIOS-e820: [mem 0x00000000cfebf000-0x00000000cfef5fff] ACPI data
    [ 0.000000] ACPI: RSDP 00000000000fe020 00024 (v02 TOSQCI)
    [ 0.000000] ACPI: XSDT 00000000cfef5120 0007C (v01 TOSQCI TOSQCI00 00000001 01000013)
    [ 0.000000] ACPI: FACP 00000000cfef4000 000F4 (v04 TOSQCI TOSQCI00 00000001 ACPI 00040000)
    [ 0.000000] ACPI: DSDT 00000000cfede000 112E5 (v01 TOSQCI TOSQCI00 F0000000 ACPI 00040000)
    [ 0.000000] ACPI: FACS 00000000cfc97000 00040
    [ 0.000000] ACPI: HPET 00000000cfef3000 00038 (v01 TOSQCI TOSQCI00 00000001 ACPI 00040000)
    [ 0.000000] ACPI: APIC 00000000cfef2000 00084 (v02 TOSQCI TOSQCI00 00000001 ACPI 00040000)
    [ 0.000000] ACPI: MCFG 00000000cfef1000 0003C (v01 TOSQCI TOSQCI00 00000001 ACPI 00040000)
    [ 0.000000] ACPI: ASF! 00000000cfef0000 000A5 (v32 TOSQCI TOSQCI00 00000001 ACPI 00040000)
    [ 0.000000] ACPI: BOOT 00000000cfedd000 00028 (v01 TOSQCI TOSQCI00 00000001 ACPI 00040000)
    [ 0.000000] ACPI: SLIC 00000000cfedc000 00176 (v01 TOSQCI TOSQCI00 00000001 ACPI 00040000)
    [ 0.000000] ACPI: WDRT 00000000cfedb000 00047 (v01 TOSQCI TOSQCI00 00000001 ACPI 00040000)
    [ 0.000000] ACPI: MSDM 00000000cfeda000 00055 (v03 TOSQCI TOSQCI00 00000001 ACPI 00040000)
    [ 0.000000] ACPI: SSDT 00000000cfed9000 00E28 (v01 AMD POWERNOW 00000001 AMD 00000001)
    [ 0.000000] ACPI: SSDT 00000000cfed7000 0193D (v02 AMD ALIB 00000001 MSFT 04000000)
    [ 0.000000] ACPI: Local APIC address 0xfee00000
    [ 0.000000] ACPI: PM-Timer IO Port: 0x408
    [ 0.000000] ACPI: Local APIC address 0xfee00000
    [ 0.000000] ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
    [ 0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled)
    [ 0.000000] ACPI: LAPIC (acpi_id[0x02] lapic_id[0x02] enabled)
    [ 0.000000] ACPI: LAPIC (acpi_id[0x03] lapic_id[0x03] enabled)
    [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
    [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
    [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1])
    [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x03] high edge lint[0x1])
    [ 0.000000] ACPI: IOAPIC (id[0x04] address[0xfec00000] gsi_base[0])
    [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
    [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 low level)
    [ 0.000000] ACPI: IRQ0 used by override.
    [ 0.000000] ACPI: IRQ2 used by override.
    [ 0.000000] ACPI: IRQ9 used by override.
    [ 0.000000] Using ACPI (MADT) for SMP configuration information
    [ 0.000000] ACPI: HPET id: 0x10228210 base: 0xfed00000
    [ 0.005191] ACPI: Core revision 20120320
    [ 0.005342] ACPI: Forced DSDT copy: length 0x112E5 copied locally, original unmapped
    [ 0.275625] PM: Registering ACPI NVS region [mem 0xcf486000-0xcf88efff] (4231168 bytes)
    [ 0.275717] PM: Registering ACPI NVS region [mem 0xcfbbf000-0xcfebefff] (3145728 bytes)
    [ 0.277613] ACPI: bus type pci registered
    [ 0.285292] ACPI: Added _OSI(Module Device)
    [ 0.285296] ACPI: Added _OSI(Processor Device)
    [ 0.285297] ACPI: Added _OSI(3.0 _SCP Extensions)
    [ 0.285299] ACPI: Added _OSI(Processor Aggregator Device)
    [ 0.285300] ACPI: Added _OSI(Linux)
    [ 0.287480] ACPI: EC: Look up EC in DSDT
    [ 0.328586] ACPI: Executed 1 blocks of module-level executable AML code
    [ 0.333711] [Firmware Bug]: ACPI: BIOS _OSI(Linux) query honored via cmdline
    [ 0.334386] ACPI: Interpreter enabled
    [ 0.334389] ACPI: (supports S0 S3 S4 S5)
    [ 0.334404] ACPI: Using IOAPIC for interrupt routing
    [ 0.340413] ACPI: EC: GPE = 0x3, I/O: command/status = 0x66, data = 0x62
    [ 0.340624] ACPI: No dock devices found.
    [ 0.340630] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
    [ 0.340779] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
    [ 0.367355] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
    [ 0.367488] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PB2_._PRT]
    [ 0.367521] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PB4_._PRT]
    [ 0.367545] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PB5_._PRT]
    [ 0.367613] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P2P_._PRT]
    [ 0.367677] pci0000:00: >Requesting ACPI _OSC control (0x1d)
    [ 0.367680] pci0000:00: >ACPI _OSC request failed (AE_NOT_FOUND), returned control mask: 0x1d
    [ 0.367681] ACPI _OSC control for PCIe not granted, disabling ASPM
    [ 0.375952] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 7 10 11 12 14 15) *0
    [ 0.376034] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 7 10 11 12 14 15) *0
    [ 0.376110] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 7 10 11 12 14 15) *0
    [ 0.376163] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 7 10 11 12 14 15) *0
    [ 0.376204] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 7 10 11 12 14 15) *0
    [ 0.376235] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 7 10 11 12 14 15) *0
    [ 0.376268] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 7 10 11 12 14 15) *0
    [ 0.376300] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 7 10 11 12 14 15) *0
    [ 0.376629] PCI: Using ACPI for IRQ routing
    [ 0.388090] pnp: PnP ACPI init
    [ 0.388113] ACPI: bus type pnp registered
    [ 0.388383] pnp 00:00: >Plug and Play ACPI device, IDs PNP0a08 PNP0a03 (active)
    [ 0.388482] system 00:01: >Plug and Play ACPI device, IDs PNP0c02 (active)
    [ 0.388640] pnp 00:02: >Plug and Play ACPI device, IDs PNP0103 (active)
    [ 0.388760] pnp 00:03: >Plug and Play ACPI device, IDs PNP0200 (active)
    [ 0.388819] pnp 00:04: >Plug and Play ACPI device, IDs PNP0c04 (active)
    [ 0.388910] pnp 00:05: >Plug and Play ACPI device, IDs PNP0b00 (active)
    [ 0.388963] pnp 00:06: >Plug and Play ACPI device, IDs PNP0800 (active)
    [ 0.389048] pnp 00:07: >Plug and Play ACPI device, IDs PNP0303 (active)
    [ 0.389133] pnp 00:08: >Plug and Play ACPI device, IDs TOS0200 SYN1000 SYN0002 PNP0f13 (active)
    [ 0.389261] system 00:09: >Plug and Play ACPI device, IDs PNP0c02 (active)
    [ 0.389348] system 00:0a: >Plug and Play ACPI device, IDs PNP0c01 (active)
    [ 0.389762] pnp: PnP ACPI: found 11 devices
    [ 0.389764] ACPI: ACPI bus type pnp unregistered
    [ 1.799341] ACPI: bus type usb registered
    [ 6.119883] toshiba_bluetooth: Detected Toshiba ACPI Bluetooth device - installing RFKill handler
    [ 6.162801] ACPI: acpi_idle registered with cpuidle
    [ 6.189958] ACPI: Power Button [PWRB]
    [ 6.190091] ACPI: Lid Switch [LID]
    [ 6.190142] ACPI: Power Button [PWRF]
    [ 6.550426] ACPI Exception: AE_AML_PACKAGE_LIMIT, Index (0x0000000000000011) is beyond end of object (20120320/exoparg2-418)
    [ 6.550437] ACPI Error: Method parse/execution failed [\_SB_.BAT1.UBIX] (Node ffff880203e8a168), AE_AML_PACKAGE_LIMIT (20120320/psparse-536)
    [ 6.550443] ACPI Error: Method parse/execution failed [\_SB_.BAT1._BIX] (Node ffff880203e8a0f0), AE_AML_PACKAGE_LIMIT (20120320/psparse-536)
    [ 6.550449] ACPI Exception: AE_AML_PACKAGE_LIMIT, Evaluating _BIX (20120320/battery-419)
    [ 6.595368] ACPI: AC Adapter [ACAD] (on-line)
    [ 6.747736] ACPI: Video Device [VGA] (multi-head: yes rom: no post: no)
    [ 6.758044] ACPI: Thermal Zone [THRM] (55 C)
    [ 6.758620] ACPI: Video Device [VGA1] (multi-head: yes rom: no post: no)
    [ 7.772864] toshiba_acpi: Toshiba Laptop ACPI Extras version 0.19
    [ 7.876001] ACPI Warning: 0x0000000000000b00-0x0000000000000b07 SystemIO conflicts with Region \_SB_.PCI0.SMBS.SMB0 1 (20120320/utaddress-251)
    [ 7.876019] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
    [ 19.440618] ACPI: Power Button [PWRB]
    [ 19.441155] ACPI: Lid Switch [LID]
    [ 19.441886] ACPI: Power Button [PWRF]
    kyle@kyle-laptop ~
    Of interest;
    [ 6.550426] ACPI Exception: AE_AML_PACKAGE_LIMIT, Index (0x0000000000000011) is beyond end of object (20120320/exoparg2-418)
    [ 6.550437] ACPI Error: Method parse/execution failed [\_SB_.BAT1.UBIX] (Node ffff880203e8a168), AE_AML_PACKAGE_LIMIT (20120320/psparse-536)
    [ 6.550443] ACPI Error: Method parse/execution failed [\_SB_.BAT1._BIX] (Node ffff880203e8a0f0), AE_AML_PACKAGE_LIMIT (20120320/psparse-536)
    [ 6.550449] ACPI Exception: AE_AML_PACKAGE_LIMIT, Evaluating _BIX (20120320/battery-419)
    I have no idea how to fix this. So, I'm outsourcing help
    Here's the original DSDT which I extract:
    DefinitionBlock ("DSDT.aml", "DSDT", 1, "TOSQCI", "TOSQCI00", 0xF0000000)
    External (ALIB, MethodObj) // 2 Arguments
    External (\_SB_.ALIB, MethodObj) // 5 Arguments
    External (\_PR_.C003._PPC)
    External (\_PR_.C002._PPC)
    External (\_PR_.C001._PPC)
    External (\_PR_.C000._PPC, IntObj)
    OperationRegion (DBG0, SystemIO, 0x80, One)
    Field (DBG0, ByteAcc, NoLock, Preserve)
    IO80, 8
    OperationRegion (DBG1, SystemIO, 0x80, 0x02)
    Field (DBG1, WordAcc, NoLock, Preserve)
    P80H, 16
    OperationRegion (ACMS, SystemIO, 0x72, 0x02)
    Field (ACMS, ByteAcc, NoLock, Preserve)
    INDX, 8,
    DATA, 8
    OperationRegion (PSMI, SystemIO, 0xB0, 0x02)
    Field (PSMI, ByteAcc, NoLock, Preserve)
    APMC, 8,
    APMD, 8
    OperationRegion (PMRG, SystemIO, 0x0CD6, 0x02)
    Field (PMRG, ByteAcc, NoLock, Preserve)
    PMRI, 8,
    PMRD, 8
    IndexField (PMRI, PMRD, ByteAcc, NoLock, Preserve)
    Offset (0x24),
    MMSO, 32,
    Offset (0x50),
    HPAD, 32,
    Offset (0x60),
    P1EB, 16,
    Offset (0xC8),
    , 2,
    SPRE, 1,
    TPDE, 1,
    Offset (0xF0),
    , 3,
    RSTU, 1
    OperationRegion (P1E0, SystemIO, P1EB, 0x04)
    Field (P1E0, ByteAcc, NoLock, Preserve)
    , 14,
    PEWS, 1,
    WSTA, 1,
    , 14,
    PEWD, 1
    OperationRegion (IOCC, SystemIO, 0x0400, 0x80)
    Field (IOCC, ByteAcc, NoLock, Preserve)
    Offset (0x01),
    , 2,
    RTCS, 1
    Name (PRWP, Package (0x02)
    Zero,
    Zero
    Method (GPRW, 2, NotSerialized)
    Store (Arg0, Index (PRWP, Zero))
    Store (Arg1, Index (PRWP, One))
    If (LAnd (LEqual (DAS3, Zero), LEqual (DAS1, Zero)))
    If (LLessEqual (Arg1, 0x03))
    Store (Zero, Index (PRWP, One))
    Else
    If (LAnd (LEqual (DAS3, Zero), LEqual (Arg1, 0x03)))
    Store (Zero, Index (PRWP, One))
    If (LAnd (LEqual (DAS1, Zero), LEqual (Arg1, One)))
    Store (Zero, Index (PRWP, One))
    Return (PRWP)
    Method (SPTS, 1, NotSerialized)
    If (LEqual (Arg0, 0x03))
    Store (Zero, RSTU)
    Store (One, \_SB.PCI0.SMBS.CLPS)
    Store (One, \_SB.PCI0.SMBS.SLPS)
    Store (PEWS, PEWS)
    Method (SWAK, 1, NotSerialized)
    If (LEqual (Arg0, 0x03))
    Store (One, RSTU)
    Store (PEWS, PEWS)
    Store (One, \_SB.PCI0.SMBS.PWDE)
    Store (Zero, PEWD)
    Method (CHKH, 0, NotSerialized)
    If (\_SB.PCI0.SMBS.G05S)
    Store (One, \_SB.PCI0.SMBS.G05T)
    Else
    Store (Zero, \_SB.PCI0.SMBS.G05T)
    Store (Not (\_SB.PCI0.SMBS.GE16), \_SB.PCI0.SMBS.G16T)
    OperationRegion (GNVS, SystemMemory, 0xCFEBCE18, 0x00000013)
    Field (GNVS, AnyAcc, NoLock, Preserve)
    DAS1, 8,
    DAS3, 8,
    TNBH, 8,
    TCP0, 8,
    TCP1, 8,
    ATNB, 8,
    PCP0, 8,
    PCP1, 8,
    PWMN, 8,
    LPTY, 8,
    M92D, 8,
    WKPM, 8,
    ALST, 8,
    AFUC, 8,
    EXUS, 8,
    AIRC, 8,
    WLSH, 8,
    TSSS, 8,
    ODZC, 8
    OperationRegion (OGNS, SystemMemory, 0xCFEBDD98, 0x00000255)
    Field (OGNS, AnyAcc, Lock, Preserve)
    OG00, 8,
    OG01, 8,
    OG02, 8,
    OG03, 8,
    OG04, 8,
    OG05, 8,
    OG06, 8,
    OG07, 8,
    OG08, 8,
    OG09, 8,
    OG10, 8,
    OG11, 8,
    OG12, 8,
    OG13, 8,
    OG14, 8,
    OG15, 8,
    OG16, 8,
    OG17, 8,
    OG18, 8,
    OG19, 8,
    OG20, 8,
    BLK0, 32,
    BLK1, 32,
    BLK2, 32,
    BLK3, 32,
    BLK4, 32,
    BLK5, 32,
    BTEN, 1,
    WLAN, 1,
    WN3G, 1,
    ENSR, 2,
    CCDE, 1,
    DACB, 1,
    TPDV, 1,
    WOLI, 1,
    CIRE, 1,
    FGPE, 1,
    HDME, 1,
    CPUD, 1,
    PCIL, 1,
    FBBS, 1,
    SWKS, 1,
    OWNS, 4096,
    DVDI, 160,
    OWN0, 8,
    OWN1, 8,
    HEUE, 8,
    BEUE, 8,
    VEVT, 16,
    FEVT, 16,
    NEVT, 16,
    OPR0, 8,
    OPR1, 8,
    OPR2, 8,
    KBIN, 8,
    SLPB, 32
    OperationRegion (NVST, SystemMemory, 0xCFEBED61, 0x0000012A)
    Field (NVST, AnyAcc, Lock, Preserve)
    SMIF, 8,
    PRM0, 8,
    PRM1, 8,
    BRTL, 8,
    TLST, 8,
    IGDS, 8,
    LCDA, 16,
    CSTE, 16,
    NSTE, 16,
    CADL, 16,
    PADL, 16,
    LIDS, 8,
    PWRS, 8,
    BVAL, 32,
    ADDL, 16,
    BCMD, 8,
    DID, 32,
    INFO, 2048,
    TOML, 8,
    TOMH, 8,
    CEBP, 8,
    C0LS, 8,
    C1LS, 8,
    C0HS, 8,
    C1HS, 8,
    ROMS, 32,
    MUXF, 8,
    PDDN, 8
    Method (SCMP, 2, NotSerialized)
    Name (STG1, Buffer (0x50) {})
    Name (STG2, Buffer (0x50) {})
    Store (Arg0, STG1)
    Store (Arg1, STG2)
    If (LNotEqual (SizeOf (Arg0), SizeOf (Arg1)))
    Return (Zero)
    Store (Zero, Local0)
    While (LLess (Local0, SizeOf (Arg0)))
    If (LNotEqual (DerefOf (Index (STG1, Local0)), DerefOf (Index (
    STG2, Local0))))
    Return (Zero)
    Increment (Local0)
    Return (One)
    Name (WNOS, Zero)
    Name (MYOS, Zero)
    Name (HTTS, Zero)
    Name (OSTB, Ones)
    Name (TPOS, Zero)
    Name (LINX, Zero)
    Name (OSSP, Zero)
    Method (CKOS, 0, NotSerialized)
    If (LEqual (WNOS, Zero))
    If (SCMP (_OS, "Microsoft Windows"))
    Store (One, WNOS)
    If (SCMP (_OS, "Microsoft Windows NT"))
    Store (0x02, WNOS)
    If (SCMP (_OS, "Microsoft WindowsME: Millennium Edition"))
    Store (0x03, WNOS)
    If (SCMP (_OS, "Windows 2012"))
    Store (0x07, WNOS)
    If (CondRefOf (\_OSI, Local0))
    If (SCMP (_OS, "Windows 2006"))
    Store (0x05, WNOS)
    Else
    If (SCMP (_OS, "Windows 2009"))
    Store (0x06, WNOS)
    Else
    Store (0x04, WNOS)
    Return (WNOS)
    Method (SEQL, 2, Serialized)
    Store (SizeOf (Arg0), Local0)
    Store (SizeOf (Arg1), Local1)
    If (LNotEqual (Local0, Local1))
    Return (Zero)
    Name (BUF0, Buffer (Local0) {})
    Store (Arg0, BUF0)
    Name (BUF1, Buffer (Local0) {})
    Store (Arg1, BUF1)
    Store (Zero, Local2)
    While (LLess (Local2, Local0))
    Store (DerefOf (Index (BUF0, Local2)), Local3)
    Store (DerefOf (Index (BUF1, Local2)), Local4)
    If (LNotEqual (Local3, Local4))
    Return (Zero)
    Increment (Local2)
    Return (One)
    Method (OSTP, 0, NotSerialized)
    If (LEqual (OSTB, Ones))
    If (CondRefOf (\_OSI, Local0))
    Store (Zero, OSTB)
    Store (Zero, TPOS)
    If (_OSI ("Windows 2001"))
    Store (0x08, OSTB)
    Store (0x08, TPOS)
    If (_OSI ("Windows 2001.1"))
    Store (0x20, OSTB)
    Store (0x20, TPOS)
    If (_OSI ("Windows 2001 SP1"))
    Store (0x10, OSTB)
    Store (0x10, TPOS)
    If (_OSI ("Windows 2001 SP2"))
    Store (0x11, OSTB)
    Store (0x11, TPOS)
    If (_OSI ("Windows 2001 SP3"))
    Store (0x12, OSTB)
    Store (0x12, TPOS)
    If (_OSI ("Windows 2006"))
    Store (0x40, OSTB)
    Store (0x40, TPOS)
    If (_OSI ("Windows 2006 SP1"))
    Store (0x41, OSTB)
    Store (0x41, TPOS)
    Store (One, OSSP)
    If (_OSI ("Windows 2009"))
    Store (One, OSSP)
    Store (0x50, OSTB)
    Store (0x50, TPOS)
    If (_OSI ("Linux"))
    Store (One, LINX)
    Store (0x80, OSTB)
    Store (0x80, TPOS)
    Else
    If (CondRefOf (\_OS, Local0))
    If (SEQL (_OS, "Microsoft Windows"))
    Store (One, OSTB)
    Store (One, TPOS)
    Else
    If (SEQL (_OS, "Microsoft WindowsME: Millennium Edition"))
    Store (0x02, OSTB)
    Store (0x02, TPOS)
    Else
    If (SEQL (_OS, "Microsoft Windows NT"))
    Store (0x04, OSTB)
    Store (0x04, TPOS)
    Else
    Store (Zero, OSTB)
    Store (Zero, TPOS)
    Else
    Store (Zero, OSTB)
    Store (Zero, TPOS)
    Return (OSTB)
    Method (VTOB, 1, NotSerialized)
    Store (One, Local0)
    ShiftLeft (Local0, Arg0, Local0)
    Return (Local0)
    Method (BTOV, 1, NotSerialized)
    ShiftRight (Arg0, One, Local0)
    Store (Zero, Local1)
    While (Local0)
    Increment (Local1)
    ShiftRight (Local0, One, Local0)
    Return (Local1)
    Method (MKWD, 2, NotSerialized)
    If (And (Arg1, 0x80))
    Store (0xFFFF0000, Local0)
    Else
    Store (Zero, Local0)
    Or (Local0, Arg0, Local0)
    Or (Local0, ShiftLeft (Arg1, 0x08), Local0)
    Return (Local0)
    Method (POSW, 1, NotSerialized)
    If (And (Arg0, 0x8000))
    If (LEqual (Arg0, 0xFFFF))
    Return (Ones)
    Else
    Not (Arg0, Local0)
    Increment (Local0)
    And (Local0, 0xFFFF, Local0)
    Return (Local0)
    Else
    Return (Arg0)
    Method (GBFE, 3, NotSerialized)
    CreateByteField (Arg0, Arg1, TIDX)
    Store (TIDX, Arg2)
    Method (PBFE, 3, NotSerialized)
    CreateByteField (Arg0, Arg1, TIDX)
    Store (Arg2, TIDX)
    Method (ITOS, 1, NotSerialized)
    Store (Buffer (0x09)
    /* 0000 */ 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    /* 0008 */ 0x00
    }, Local0)
    Store (Buffer (0x11)
    "0123456789ABCDEF"
    }, Local7)
    Store (0x08, Local1)
    Store (Zero, Local2)
    Store (Zero, Local3)
    While (Local1)
    Decrement (Local1)
    And (ShiftRight (Arg0, ShiftLeft (Local1, 0x02)), 0x0F, Local4)
    If (Local4)
    Store (Ones, Local3)
    If (Local3)
    GBFE (Local7, Local4, RefOf (Local5))
    PBFE (Local0, Local2, Local5)
    Increment (Local2)
    Return (Local0)
    Scope (_PR)
    Processor (C000, 0x00, 0x00000410, 0x06)
    Processor (C001, 0x01, 0x00000000, 0x00)
    Processor (C002, 0x02, 0x00000000, 0x00)
    Processor (C003, 0x03, 0x00000000, 0x00)
    Name (_S0, Package (0x04)
    Zero,
    Zero,
    Zero,
    Zero
    If (LEqual (DAS1, One)) {}
    If (LEqual (DAS3, One))
    Name (_S3, Package (0x04)
    0x03,
    0x03,
    Zero,
    Zero
    Name (_S4, Package (0x04)
    0x04,
    0x04,
    Zero,
    Zero
    Name (_S5, Package (0x04)
    0x05,
    0x05,
    Zero,
    Zero
    Scope (_GPE)
    Method (_L1C, 0, NotSerialized)
    Store (0xFFFF, Local1)
    Store (\_SB.PCI0.SMBS.MIN, Local2)
    ShiftLeft (Local2, 0x08, Local1)
    Store (\_SB.PCI0.SMBS.SEC, Local2)
    Or (Local1, Local2, Local1)
    Store (Local1, P80H)
    Method (_L08, 0, NotSerialized)
    Notify (\_SB.PCI0.PB2, 0x02)
    Notify (\_SB.PCI0.PB3, 0x02)
    Notify (\_SB.PCI0.PB4, 0x02)
    Notify (\_SB.PCI0.PB5, 0x02)
    Notify (\_SB.PCI0.PB6, 0x02)
    Notify (\_SB.PCI0.PB7, 0x02)
    Notify (\_SB.PCI0.SPB0, 0x02)
    Notify (\_SB.PCI0.SPB1, 0x02)
    Notify (\_SB.PCI0.SPB2, 0x02)
    Notify (\_SB.PCI0.SPB3, 0x02)
    Name (XX05, Buffer (One)
    0x05
    Name (XX06, Buffer (One)
    0x05
    Method (_L05, 0, NotSerialized)
    Name (HPOK, Zero)
    Sleep (0xC8)
    If (\_SB.PCI0.SMBS.GE05)
    Store (Zero, \_SB.PCI0.SMBS.G05T)
    Else
    Store (One, \_SB.PCI0.SMBS.G05T)
    Notify (\_SB.PCI0.SPB2, Zero)
    Method (_L18, 0, NotSerialized)
    Notify (\_SB.PCI0.OHC1, 0x02)
    Notify (\_SB.PCI0.OHC2, 0x02)
    Notify (\_SB.PCI0.OHC3, 0x02)
    Notify (\_SB.PCI0.OHC4, 0x02)
    Notify (\_SB.PCI0.EHC1, 0x02)
    Notify (\_SB.PCI0.EHC2, 0x02)
    Notify (\_SB.PCI0.EHC3, 0x02)
    Notify (\_SB.PCI0.XHC0, 0x02)
    Notify (\_SB.PCI0.XHC1, 0x02)
    Notify (\_SB.PWRB, 0x02)
    Method (_L09, 0, NotSerialized)
    Store (0x4400, P80H)
    Store (\_SB.PCI0.SMBS.O012, Local0)
    Or (Local0, \_SB.PCI0.SMBS.O013, Local0)
    Or (Local0, \_SB.PCI0.SMBS.O014, Local0)
    CreateWordField (XX05, Zero, SZZE)
    CreateField (XX05, 0x10, 0x03, FUCC)
    CreateField (XX05, 0x13, 0x05, DEVV)
    CreateByteField (XX05, 0x03, BUSS)
    CreateByteField (XX05, 0x04, HPST)
    Store (0x05, SZZE)
    Store (Zero, BUSS)
    Store (0x05, DEVV)
    Store (Zero, FUCC)
    CreateWordField (XX06, Zero, SZZ6)
    CreateField (XX06, 0x10, 0x03, FUC6)
    CreateField (XX06, 0x13, 0x05, DEV6)
    CreateByteField (XX06, 0x03, BUS6)
    CreateByteField (XX06, 0x04, HPS6)
    Store (0x05, SZZ6)
    Store (Zero, BUS6)
    Store (0x06, DEV6)
    Store (Zero, FUC6)
    If (LEqual (Local0, One))
    If (LEqual (WLSH, Zero))
    Store (One, \_SB.PCI0.SMBS.O012)
    Store (One, \_SB.PCI0.SMBS.O013)
    Store (One, \_SB.PCI0.SMBS.O014)
    Store (Zero, \_SB.PCI0.SMBS.E012)
    Store (Zero, \_SB.PCI0.SMBS.E013)
    Store (Zero, \_SB.PCI0.SMBS.E014)
    Else
    Store (Zero, HPST)
    \_SB.ALIB (0x06, XX05, \_SB.ALIB (0x06, XX06, Store (One, \_SB.PCI0.SMBS.O012), Store (
    One, \_SB.PCI0.SMBS.O013), Store (One, \_SB.PCI0.SMBS.O014)), Store (Zero, \_SB.PCI0.SMBS.E012), Store (Zero, \_SB.PCI0.SMBS.E013))
    Store (Zero, \_SB.PCI0.SMBS.E014)
    If (LEqual (Local0, Zero))
    If (LEqual (WLSH, Zero))
    Store (One, \_SB.PCI0.SMBS.E012)
    Store (One, \_SB.PCI0.SMBS.E013)
    Store (One, \_SB.PCI0.SMBS.E014)
    Store (Zero, \_SB.PCI0.SMBS.O012)
    Store (Zero, \_SB.PCI0.SMBS.O013)
    Store (Zero, \_SB.PCI0.SMBS.O014)
    Else
    Store (One, \_SB.PCI0.SMBS.E012)
    Store (One, \_SB.PCI0.SMBS.E013)
    Store (One, \_SB.PCI0.SMBS.E014)
    Store (Zero, \_SB.PCI0.SMBS.O012)
    Store (Zero, \_SB.PCI0.SMBS.O013)
    Store (Zero, \_SB.PCI0.SMBS.O014)
    Store (One, HPST)
    \_SB.ALIB (0x06, XX05, \_SB.ALIB (0x06, XX06, \_SB.PCI0.PB5.XPPR (Zero), Sleep (0x14),
    Notify (\_SB.PCI0.PB5, Zero)), Notify (\_SB.PCI0.PB6, Zero), Notify (\_SB.PCI0.SPB0, Zero))
    Method (_L0E, 0, NotSerialized)
    CreateWordField (XX05, Zero, SZZE)
    CreateField (XX05, 0x10, 0x03, FUCC)
    CreateField (XX05, 0x13, 0x05, DEVV)
    CreateByteField (XX05, 0x03, BUSS)
    CreateByteField (XX05, 0x04, HPST)
    Store (0x05, SZZE)
    Store (Zero, BUSS)
    Store (0x03, DEVV)
    Store (Zero, FUCC)
    Name (HPOK, Zero)
    If (LGreaterEqual (OSTB, 0x40))
    Sleep (0x14)
    If (\_SB.PCI0.SMBS.GE14)
    Store (Zero, \_SB.PCI0.SMBS.G14T)
    Store (0x18, INFO)
    Store (0x86, BCMD)
    Sleep (0x64)
    Sleep (0x64)
    If (CondRefOf (\_SB.ALIB, Local0))
    Store (Zero, HPST)
    \_SB.ALIB (0x06, XX05, Else
    \_SB.PCI0.PB3.XPPR (Zero)
    }, Store (0x0F1A, P80H), Else
    Store (One, \_SB.PCI0.SMBS.G14T)
    If (CondRefOf (\_SB.ALIB, Local0))
    Store (One, HPST)
    \_SB.ALIB (0x06, XX05, Else
    \_SB.PCI0.PB3.XPPR (One)
    }, Store (0x021A, P80H), Else
    Sleep (0x14)
    If (\_SB.PCI0.SMBS.GE14)
    Store (Zero, \_SB.PCI0.SMBS.G14T)
    Store (One, \_SB.PCI0.PB3.PDC2)
    Store (\_SB.PCI0.PB3.VGA.DVID, Local7)
    Sleep (0x0A)
    Store (One, Local4)
    Store (0x05, Local5)
    While (LAnd (Local4, Local5))
    Store (\_SB.PCI0.PB3.XPRD (0xA5), Local6)
    And (Local6, 0x7F, Local6)
    If (LLessEqual (Local6, 0x04))
    Store (Zero, Local4)
    Else
    Store (\_SB.PCI0.PB3.VGA.DVID, Local7)
    Sleep (0x05)
    Decrement (Local5)
    If (CondRefOf (\_SB.ALIB, Local0))
    Store (Zero, HPST)
    \_SB.ALIB (0x06, XX05, Else
    \_SB.PCI0.PB3.XPPR (Zero)
    }, Store (One, HPOK), Store (0x1F1A, P80H))
    Else
    Store (One, \_SB.PCI0.SMBS.G14T)
    Store (Zero, HPOK)
    If (CondRefOf (\_SB.ALIB, Local0))
    Store (One, HPST)
    \_SB.ALIB (0x06, XX05, Else
    \_SB.PCI0.PB3.XPPR (One)
    }, Store (Zero, Local2), While (LLess (Local2, 0x0F))
    Store (One, \_SB.PCI0.PB3.PDC2)
    Store (One, Local4)
    Store (0xC8, Local5)
    While (LAnd (Local4, Local5))
    Store (\_SB.PCI0.PB3.XPRD (0xA5), Local6)
    And (Local6, 0x7F, Local6)
    If (LAnd (LGreaterEqual (Local6, 0x10), LNotEqual (Local6, 0x7F)))
    Store (Zero, Local4)
    Else
    Sleep (0x05)
    Decrement (Local5)
    If (LNot (Local4))
    Store (\_SB.PCI0.PB3.XPDL (), Local5)
    If (Local5)
    \_SB.PCI0.PB3.XPRT ()
    Sleep (0x05)
    Increment (Local2)
    Else
    Store (0x18, INFO)
    Store (0x87, BCMD)
    If (LEqual (\_SB.PCI0.PB3.XPR2 (), Ones))
    Store (One, HPOK)
    Store (0x10, Local2)
    Else
    Store (Zero, HPOK)
    Store (0x10, Local2)
    Else
    Store (0x10, Local2)
    Store (0x121A, P80H)
    If (LNot (HPOK))
    Store (\_SB.PCI0.PB3.VGA.DVID, Local7)
    Sleep (0x0A)
    Store (One, Local4)
    Store (0x05, Local5)
    While (LAnd (Local4, Local5))
    Store (\_SB.PCI0.PB3.XPRD (0xA5), Local6)
    And (Local6, 0x7F, Local6)
    If (LLessEqual (Local6, 0x04))
    Store (Zero, Local4)
    Else
    Store (\_SB.PCI0.PB3.VGA.DVID, Local7)
    Sleep (0x05)
    Decrement (Local5)
    If (CondRefOf (\_SB.ALIB, Local0))
    Store (Zero, HPST)
    \_SB.ALIB (0x06, XX05, Else
    \_SB.PCI0.PB3.XPPR (Zero)
    }, If (HPOK)
    Notify (\_SB.PCI0.PB3, Zero)
    Method (_L10, 0, NotSerialized)
    If (LEqual (ODZC, One))
    If (\_SB.PCI0.SMBS.G16T)
    Sleep (0x14)
    If (\_SB.PCI0.SMBS.GE16)
    Store (Zero, \_SB.PCI0.SMBS.G16T)
    If (LOr (LEqual (\_SB.PCI0.SATA.VIDI, 0x78001022), LEqual (\_SB.PCI0.SATA.VIDI, 0x78011022)))
    Notify (\_SB.PCI0.AFD, 0x80)
    If (LEqual (\_SB.PCI0.SATA.VIDI, 0x78041022))
    If (LEqual (\_SB.PCI0.AFD.HDD0, One))
    Notify (\_SB.PCI0.SATA.ODDZ, 0x80)
    Else
    Notify (\_SB.PCI0.SATA.ODDZ, 0x80)
    Store (0xDF15, P80H)
    Else
    Sleep (0x14)
    If (LNot (\_SB.PCI0.SMBS.GE16))
    Store (One, \_SB.PCI0.SMBS.G16T)
    If (LOr (LEqual (\_SB.PCI0.SATA.VIDI, 0x78001022), LEqual (\_SB.PCI0.SATA.VIDI, 0x78011022)))
    Notify (\_SB.PCI0.AFD, 0x80)
    If (LEqual (\_SB.PCI0.SATA.VIDI, 0x78041022))
    If (LEqual (\_SB.PCI0.AFD.HDD0, One))
    Notify (\_SB.PCI0.SATA.ODDZ, 0x80)
    Else
    Notify (\_SB.PCI0.SATA.ODDZ, 0x80)
    Store (0xDF14, P80H)
    Name (PICM, Zero)
    Name (GPIC, Zero)
    Method (_PIC, 1, NotSerialized)
    Store (Arg0, PICM)
    Store (Arg0, GPIC)
    If (GPIC)
    \_SB.DSPI ()
    Name (PTSF, Zero)
    Method (_PTS, 1, NotSerialized)
    Store (One, PTSF)
    Store (One, \_SB.PCI0.LPC0.EC0.IESQ)
    SPTS (Arg0)
    If (LEqual (Arg0, One))
    Store (0x51, IO80)
    \_SB.S80H (0x51)
    If (LEqual (Arg0, 0x03))
    If (\_SB.SSTS)
    Store (Zero, \_SB.PCI0.LPC0.EC0.WLID)
    Else
    Store (One, \_SB.PCI0.LPC0.EC0.WLID)
    Store (0x53, IO80)
    \_SB.S80H (0x53)
    Store (One, \_SB.PCI0.SMBS.SLPS)
    If (LEqual (Arg0, 0x04))
    Store (0x54, IO80)
    \_SB.S80H (0x54)
    Store (One, \_SB.PCI0.SMBS.SLPS)
    Store (One, RSTU)
    Store (One, \_SB.INS4)
    Store (One, \_SB.PCI0.LPC0.EC0.FLS4)
    If (\_SB.SSTS)
    Store (Zero, \_SB.PCI0.LPC0.EC0.WLID)
    Else
    Store (One, \_SB.PCI0.LPC0.EC0.WLID)
    If (LEqual (Arg0, 0x05))
    Store (0x55, IO80)
    \_SB.S80H (0x55)
    \_SB.GSMI (0x03)
    Method (_WAK, 1, NotSerialized)
    Store (Zero, PTSF)
    SWAK (Arg0)
    If (LEqual (Arg0, One))
    Store (0xE1, IO80)
    \_SB.S80H (0xE1)
    Store (0xF1, \_SB.PCI0.P2P.PR4B)
    If (LEqual (Arg0, 0x03))
    Store (0x55, \_SB.INS3)
    Store (One, \_SB.PCI0.LPC0.EC0.CPLE)
    Store (0xE3, IO80)
    \_SB.S80H (0xE3)
    CHKH ()
    If (\_SB.ECOK)
    If (LGreaterEqual (TPOS, 0x40))
    If (LEqual (TPOS, 0x80))
    Store (Zero, \_SB.PCI0.LPC0.EC0.OSTP)
    Else
    Store (One, \_SB.PCI0.LPC0.EC0.OSTP)
    Else
    Store (Zero, \_SB.PCI0.LPC0.EC0.OSTP)
    Notify (\_SB.BAT1, 0x81)
    Notify (\_SB.PWRB, 0x02)
    If (LEqual (Arg0, 0x04))
    Store (0x55, \_SB.INS3)
    Store (Zero, \_SB.INS4)
    Store (0xE4, IO80)
    \_SB.S80H (0xE4)
    \_SB.PCI0._INI ()
    \_SB.PCI0.EHC1.STOS ()
    If (\_SB.ECOK)
    If (LGreaterEqual (TPOS, 0x40))
    If (LEqual (TPOS, 0x80))
    Store (Zero, \_SB.PCI0.LPC0.EC0.OSTP)
    Else
    Store (One, \_SB.PCI0.LPC0.EC0.OSTP)
    Else
    Store (Zero, \_SB.PCI0.LPC0.EC0.OSTP)
    Notify (\_SB.BAT1, 0x81)
    Notify (\_SB.PWRB, 0x02)
    Return (Zero)
    Scope (_SI)
    Method (_SST, 1, NotSerialized)
    If (LEqual (Arg0, One))
    Store ("===== SST Working =====", Debug)
    If (LEqual (Arg0, 0x02))
    Store ("===== SST Waking =====", Debug)
    If (LEqual (Arg0, 0x03))
    Store ("===== SST Sleeping =====", Debug)
    If (LEqual (Arg0, 0x04))
    Store ("===== SST Sleeping S4 =====", Debug)
    Scope (_SB)
    Name (ECOK, One)
    Name (INS3, Zero)
    Name (INS4, One)
    Name (WLWF, Zero)
    Name (L3WF, Zero)
    Name (DCNT, Zero)
    Name (SSTS, Zero)
    Name (LDSS, Zero)
    Method (GBFE, 3, NotSerialized)
    CreateByteField (Arg0, Arg1, TIDX)
    Store (TIDX, Arg2)
    Method (PBFE, 3, NotSerialized)
    CreateByteField (Arg0, Arg1, TIDX)
    Store (Arg2, TIDX)
    Method (ITOS, 1, NotSerialized)
    Store (Buffer (0x09)
    /* 0000 */ 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    /* 0008 */ 0x00
    }, Local0)
    Store (Buffer (0x11)
    "0123456789ABCDEF"
    }, Local7)
    Store (0x08, Local1)
    Store (Zero, Local2)
    Store (Zero, Local3)
    While (Local1)
    Decrement (Local1)
    And (ShiftRight (Arg0, ShiftLeft (Local1, 0x02)), 0x0F, Local4)
    If (Local4)
    Store (Ones, Local3)
    If (Local3)
    GBFE (Local7, Local4, RefOf (Local5))
    PBFE (Local0, Local2, Local5)
    Increment (Local2)
    Return (Local0)
    Device (PWRB)
    Name (_HID, EisaId ("PNP0C0C"))
    Method (_STA, 0, NotSerialized)
    Return (0x0B)
    Device (PCI0)
    Name (_HID, EisaId ("PNP0A08"))
    Name (_CID, EisaId ("PNP0A03"))
    Name (_ADR, Zero)
    OperationRegion (SCTH, PCI_Config, 0x7A, One)
    Field (SCTH, ByteAcc, NoLock, Preserve)
    RSMF, 1
    Method (_INI, 0, NotSerialized)
    If (LEqual (GPIC, Zero)) {}
    Else
    DSPI ()
    OSTP ()
    Store (0x07D0, MYOS)
    If (CondRefOf (\_OSI, Local0))
    If (_OSI ("Linux"))
    Store (0x03E8, MYOS)
    If (_OSI ("Windows 2001"))
    Store (0x07D1, MYOS)
    If (_OSI ("Windows 2001 SP1"))
    Store (0x07D1, MYOS)
    If (_OSI ("Windows 2001 SP2"))
    Store (0x07D2, MYOS)
    If (_OSI ("Windows 2006"))
    Store (0x07D6, MYOS)
    If (_OSI ("Windows 2009"))
    Store (0x07D9, MYOS)
    If (_OSI ("Windows 2012"))
    Store (0x07DC, MYOS)
    OperationRegion (NBMS, PCI_Config, 0x60, 0x08)
    Field (NBMS, DWordAcc, NoLock, Preserve)
    MIDX, 32,
    MIDR, 32
    Mutex (NBMM, 0x00)
    Method (NBMR, 1, NotSerialized)
    Acquire (NBMM, 0xFFFF)
    And (Arg0, 0x7F, Local0)
    Store (Local0, MIDX)
    Store (MIDR, Local0)
    Store (0x7F, MIDX)
    Release (NBMM)
    Return (Local0)
    Method (NBMW, 2, NotSerialized)
    Acquire (NBMM, 0xFFFF)
    And (Arg0, 0x7F, Local0)
    Or (Local0, 0x80, Local0)
    Store (Local0, MIDX)
    Store (Arg1, MIDR)
    Store (And (Local0, 0x7F, Local0), MIDX)
    Release (NBMM)
    OperationRegion (NBXP, PCI_Config, 0xE0, 0x08)
    Field (NBXP, DWordAcc, NoLock, Preserve)
    NBXI, 32,
    NBXD, 32
    Mutex (NBXM, 0x00)
    Method (NBXR, 1, NotSerialized)
    Acquire (NBXM, 0xFFFF)
    Store (Arg0, NBXI)
    Store (NBXD, Local0)
    Store (Zero, NBXI)
    Release (NBXM)
    Return (Local0)
    Method (NBXW, 2, NotSerialized)
    Acquire (NBXM, 0xFFFF)
    Store (Arg0, NBXI)
    Store (Arg1, NBXD)
    Store (Zero, NBXI)
    Release (NBXM)
    Method (XPTR, 2, NotSerialized)
    If (LAnd (LLess (Arg0, 0x02), LGreater (Arg0, 0x07)))
    Return (Zero)
    Else
    If (LLess (Arg0, 0x04))
    Subtract (Arg0, 0x02, Local1)
    Store (0x01310800, Local0)
    Else
    Subtract (Arg0, 0x04, Local1)
    Store (0x01300900, Local0)
    Add (Local0, ShiftLeft (Local1, 0x08), Local0)
    ShiftLeft (Local0, Local1, Local0)
    NBXW (Local0, Arg1)
    Return (Ones)
    Method (XPLP, 2, NotSerialized)
    Method (XPLL, 2, NotSerialized)
    Name (_UID, One)
    Name (_BBN, Zero)
    Name (SUPP, Zero)
    Name (CTRL, Zero)
    Name (AMHP, Zero)
    Method (XOSC, 4, NotSerialized)
    CreateDWordField (Arg3, Zero, CDW1)
    CreateDWordField (Arg3, 0x04, CDW2)
    CreateDWordField (Arg3, 0x08, CDW3)
    If (LEqual (Arg0, Buffer (0x10)
    /* 0000 */ 0x5B, 0x4D, 0xDB, 0x33, 0xF7, 0x1F, 0x1C, 0x40,
    /* 0008 */ 0x96, 0x57, 0x74, 0x41, 0xC0, 0x3D, 0xD7, 0x66
    Store (CDW2, SUPP)
    Store (CDW3, CTRL)
    And (CTRL, 0x1D, CTRL)
    If (Not (And (CDW1, One)))
    If (And (CTRL, One)) {}
    If (And (CTRL, 0x10)) {}
    If (LNotEqual (Arg1, One))
    Or (CDW1, 0x08, CDW1)
    If (LNotEqual (CDW3, CTRL))
    Or (CDW1, 0x10, CDW1)
    Store (CTRL, CDW3)
    Return (Arg3)
    Else
    Or (CDW1, 0x04, CDW1)
    Return (Arg3)
    Method (TOM, 0, NotSerialized)
    Multiply (TOML, 0x00010000, Local0)
    Multiply (TOMH, 0x01000000, Local1)
    Add (Local0, Local1, Local0)
    Return (Local0)
    Name (CRES, ResourceTemplate ()
    WordBusNumber (ResourceProducer, MinFixed, MaxFixed, SubDecode,
    0x0000, // Granularity
    0x0000, // Range Minimum
    0x00FF, // Range Maximum
    0x0000, // Translation Offset
    0x0100, // Length
    0x00,, )
    WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
    0x0000, // Granularity
    0x0000, // Range Minimum
    0x0CF7, // Range Maximum
    0x0000, // Translation Offset
    0x0CF8, // Length
    0x00,, , TypeStatic)
    WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
    0x0000, // Granularity
    0x0D00, // Range Minimum
    0xFFFF, // Range Maximum
    0x0000, // Translation Offset
    0xF300, // Length
    ,, , TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
    0x00000000, // Granularity
    0x000A0000, // Range Minimum
    0x000BFFFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00020000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, Cacheable, ReadOnly,
    0x00000000, // Granularity
    0x000C0000, // Range Minimum
    0x000C3FFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00004000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, Cacheable, ReadOnly,
    0x00000000, // Granularity
    0x000C4000, // Range Minimum
    0x000C7FFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00004000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadOnly,
    0x00000000, // Granularity
    0x000C8000, // Range Minimum
    0x000CBFFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00004000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadOnly,
    0x00000000, // Granularity
    0x000CC000, // Range Minimum
    0x000CFFFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00004000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
    0x00000000, // Granularity
    0x000D0000, // Range Minimum
    0x000D3FFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00004000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
    0x00000000, // Granularity
    0x000D4000, // Range Minimum
    0x000D7FFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00004000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
    0x00000000, // Granularity
    0x000D8000, // Range Minimum
    0x000DBFFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00004000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
    0x00000000, // Granularity
    0x000DC000, // Range Minimum
    0x000DFFFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00004000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
    0x00000000, // Granularity
    0x000E0000, // Range Minimum
    0x000E3FFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00004000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
    0x00000000, // Granularity
    0x000E4000, // Range Minimum
    0x000E7FFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00004000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
    0x00000000, // Granularity
    0x000E8000, // Range Minimum
    0x000EBFFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00004000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
    0x00000000, // Granularity
    0x000EC000, // Range Minimum
    0x000EFFFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00004000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
    0x00000000, // Granularity
    0x80000000, // Range Minimum
    0xF7FFFFFF, // Range Maximum
    0x00000000, // Translation Offset
    0x77000000, // Length
    0x00,, _Y00, AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
    0x00000000, // Granularity
    0xFC000000, // Range Minimum
    0xFFFFFFFF, // Range Maximum
    0x00000000, // Translation Offset
    0x04000000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    IO (Decode16,
    0x0CF8, // Range Minimum
    0x0CF8, // Range Maximum
    0x01, // Alignment
    0x08, // Length
    Method (_CRS, 0, NotSerialized)
    CreateDWordField (CRES, \_SB.PCI0._Y00._MIN, BTMN)
    CreateDWordField (CRES, \_SB.PCI0._Y00._MAX, BTMX)
    CreateDWordField (CRES, \_SB.PCI0._Y00._LEN, BTLN)
    Store (TOM (), BTMN)
    Subtract (0xF8000000, BTMN, BTLN)
    Return (CRES)
    Device (MEMR)
    Name (_HID, EisaId ("PNP0C02"))
    Name (MEM1, ResourceTemplate ()
    Memory32Fixed (ReadWrite,
    0x00000000, // Address Base
    0x00000000, // Address Length
    _Y01)
    Memory32Fixed (ReadWrite,
    0x00000000, // Address Base
    0x00000000, // Address Length
    _Y02)
    Memory32Fixed (ReadWrite,
    0xFF800000, // Address Base
    0x00000020, // Address Length
    Method (_CRS, 0, NotSerialized)
    CreateDWordField (MEM1, \_SB.PCI0.MEMR._Y01._BAS, MB01)
    CreateDWordField (MEM1, \_SB.PCI0.MEMR._Y01._LEN, ML01)
    CreateDWordField (MEM1, \_SB.PCI0.MEMR._Y02._BAS, MB02)
    CreateDWordField (MEM1, \_SB.PCI0.MEMR._Y02._LEN, ML02)
    If (GPIC)
    Store (0xFEC00000, MB01)
    Store (0xFEE00000, MB02)
    Store (0x1000, ML01)
    Store (0x1000, ML02)
    Return (MEM1)
    Method (XCMP, 2, NotSerialized)
    If (LNotEqual (0x10, SizeOf (Arg0)))
    Return (Zero)
    If (LNotEqual (0x10, SizeOf (Arg1)))
    Return (Zero)
    Store (Zero, Local0)
    While (LLess (Local0, 0x10))
    If (LNotEqual (DerefOf (Index (Arg0, Local0)), DerefOf (Index (
    Arg1, Local0))))
    Return (Zero)
    Increment (Local0)
    Return (One)
    Method (AFN0, 0, Serialized)
    If (LEqual (PDDN, One))
    ^VGA.AFN0 ()
    If (LEqual (PDDN, 0x02))
    ^PB2.VGA.AFN0 ()
    If (LEqual (PDDN, 0x03))
    ^PB3.VGA.AFN0 ()
    Method (AFN1, 1, Serialized)
    Method (AFN2, 2, Serialized)
    Method (AFN3, 2, Serialized)
    If (LEqual (PDDN, One))
    ^VGA.AFN3 (Arg0, Arg1)
    If (LEqual (PDDN, 0x02))
    ^PB2.VGA.AFN3 (Arg0, Arg1)
    If (LEqual (PDDN, 0x03))
    ^PB3.VGA.AFN3 (Arg0, Arg1)
    Method (AFN4, 1, Serialized)
    If (LEqual (PDDN, One))
    ^VGA.AFN4 (Arg0)
    If (LEqual (PDDN, 0x02))
    ^PB2.VGA.AFN4 (Arg0)
    If (LEqual (PDDN, 0x03))

    First remove any acpi_os_name=linux or acpi_osi=linux that you have on the kernel command line, if need be use acpi_osi="!Linux", told you that already in the other thread, I only suggested that you decompile your dsdt so you can pinpoint which acpi_os_name and acpi_osi names are being checked and try to spoof _using windows_ with those names.
    This is the part you should be looking at first:
    Method (OSTP, 0, NotSerialized)
    If (LEqual (OSTB, Ones))
    If (CondRefOf (\_OSI, Local0))
    Store (Zero, OSTB)
    Store (Zero, TPOS)
    If (_OSI ("Windows 2001"))
    Store (0x08, OSTB)
    Store (0x08, TPOS)
    If (_OSI ("Windows 2001.1"))
    Store (0x20, OSTB)
    Store (0x20, TPOS)
    If (_OSI ("Windows 2001 SP1"))
    Store (0x10, OSTB)
    Store (0x10, TPOS)
    If (_OSI ("Windows 2001 SP2"))
    Store (0x11, OSTB)
    Store (0x11, TPOS)
    If (_OSI ("Windows 2001 SP3"))
    Store (0x12, OSTB)
    Store (0x12, TPOS)
    If (_OSI ("Windows 2006"))
    Store (0x40, OSTB)
    Store (0x40, TPOS)
    If (_OSI ("Windows 2006 SP1"))
    Store (0x41, OSTB)
    Store (0x41, TPOS)
    Store (One, OSSP)
    If (_OSI ("Windows 2009"))
    Store (One, OSSP)
    Store (0x50, OSTB)
    Store (0x50, TPOS)
    If (_OSI ("Linux"))
    Store (One, LINX)
    Store (0x80, OSTB)
    Store (0x80, TPOS)
    Else
    If (CondRefOf (\_OS, Local0))
    If (SEQL (_OS, "Microsoft Windows"))
    Store (One, OSTB)
    Store (One, TPOS)
    Else
    If (SEQL (_OS, "Microsoft WindowsME: Millennium Edition"))
    Store (0x02, OSTB)
    Store (0x02, TPOS)
    Else
    If (SEQL (_OS, "Microsoft Windows NT"))
    Store (0x04, OSTB)
    Store (0x04, TPOS)
    Else
    Store (Zero, OSTB)
    Store (Zero, TPOS)
    Else
    Store (Zero, OSTB)
    Store (Zero, TPOS)
    Return (OSTB)
    You can clearly see that linux is being checked for and different stuff is done for it, as is the case for each windows version, like I also said in the other thread first try to spoof a windows version where the battery shows up and the fan works correctly. Only after trying that and if it fails, I would go about trying to fix the dsdt myself.

  • Need help with a SQL qurey that returns multiple rows for one record?

    I have the following query where I use a CASE WHEN clause to determine the date of a shift that begins with "FRLO" on day1 - day14 of the pay period. It works great if a schedule record contains one day that begins "FRLO", but if more than one day is "FRLO" then it only returns the first day it finds and not the others. Is there some way to get the query to return a ron for every day 1 - 14 that begins "FRLO"? System if Oracle 11G
    Order of the results is not important as this is part of a larger query that orders the results.
    Thanks in advance for any help,
    George
    SELECT s.empid,
    CASE
    WHEN UPPER (SUBSTR (s.Day1, 0, 4)) = 'FRLO'
    THEN
    pp.startpp
    WHEN UPPER (SUBSTR (s.Day2, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 1
    WHEN UPPER (SUBSTR (s.Day3, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 2
    WHEN UPPER (SUBSTR (s.Day4, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 3
    WHEN UPPER (SUBSTR (s.Day5, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 4
    WHEN UPPER (SUBSTR (s.Day6, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 5
    WHEN UPPER (SUBSTR (s.Day7, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 6
    WHEN UPPER (SUBSTR (s.Day8, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 7
    WHEN UPPER (SUBSTR (s.Day9, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 8
    WHEN UPPER (SUBSTR (s.Day10, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 9
    WHEN UPPER (SUBSTR (s.Day11, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 10
    WHEN UPPER (SUBSTR (s.Day12, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 11
    WHEN UPPER (SUBSTR (s.Day13, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 12
    WHEN UPPER (SUBSTR (s.Day14, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 13
    END
    startdate,
    NULL starttime,
    NULL endtime,
    8 hours,
    0 minutes
    FROM schedules s
    JOIN
    payperiods pp
    ON pp.periodid = s.periodid
    WHERE UPPER (SUBSTR (s.Day1, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day2, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day3, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day4, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day5, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day6, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day7, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day8, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day9, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day10, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day11, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day12, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day13, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day14, 0, 4)) = 'FRLO';
    CURRENT OUTPUT
    EMPID STARTDATE STARTTIME ENDTIME HOURS MINUTES
    753738, 3/25/2013 , , ,8 ,0
    753740, 3/25/2013 , , ,8 ,0
    753748, 3/25/2013 , , ,8 ,0
    DESIRED OUTPUT
    EMPID STARTDATE STARTTIME ENDTIME HOURS MINUTES
    753738, 3/25/2013 , , ,8 ,0
    753740, 3/25/2013 , , ,8 ,0
    753748, 3/25/2013 , , ,8 ,0
    753738, 3/26/2013 , , ,8 ,0
    753740, 3/26/2013 , , ,8 ,0
    753740, 3/28/2013 , , ,8 ,0
    753748, 1/1/2013 , , ,8 ,0
    753738, 4/3/2013 , , ,8 ,0
    753748, 4/3/2013 , , ,8 ,0
    CREATE TABLE SCHEDULES
    SCHEDULEID NUMBER(12) NOT NULL,
    EMPID NUMBER(12) NOT NULL,
    PERIODID VARCHAR2(6 BYTE) NOT NULL,
    AREAID NUMBER(12) NOT NULL,
    DAY1 VARCHAR2(50 BYTE),
    DAY2 VARCHAR2(50 BYTE),
    DAY3 VARCHAR2(50 BYTE),
    DAY4 VARCHAR2(50 BYTE),
    DAY5 VARCHAR2(50 BYTE),
    DAY6 VARCHAR2(50 BYTE),
    DAY7 VARCHAR2(50 BYTE),
    DAY8 VARCHAR2(50 BYTE),
    DAY9 VARCHAR2(50 BYTE),
    DAY10 VARCHAR2(50 BYTE),
    DAY11 VARCHAR2(50 BYTE),
    DAY12 VARCHAR2(50 BYTE),
    DAY13 VARCHAR2(50 BYTE),
    DAY14 VARCHAR2(50 BYTE),
    NOPTIND1 INTEGER DEFAULT 0,
    NOPTIND2 INTEGER DEFAULT 0,
    NOPTIND3 INTEGER DEFAULT 0,
    NOPTIND4 INTEGER DEFAULT 0,
    NOPTIND5 INTEGER DEFAULT 0,
    NOPTIND6 INTEGER DEFAULT 0,
    NOPTIND7 INTEGER DEFAULT 0,
    NOPTIND8 INTEGER DEFAULT 0,
    NOPTIND9 INTEGER DEFAULT 0,
    NOPTIND10 INTEGER DEFAULT 0,
    NOPTIND11 INTEGER DEFAULT 0,
    NOPTIND12 INTEGER DEFAULT 0,
    NOPTIND13 INTEGER DEFAULT 0,
    NOPTIND14 INTEGER DEFAULT 0
    CREATE TABLE PAYPERIODS
    PERIODID VARCHAR2(6 BYTE) NOT NULL,
    STARTPP DATE,
    ENDPP DATE
    Insert into SCHEDULES
    (SCHEDULEID, EMPID, PERIODID, AREAID, DAY1,
    DAY2, DAY3, DAY4, DAY5, DAY6,
    DAY7, DAY8, DAY9, DAY10, DAY11,
    DAY12, DAY13, DAY14, NOPTIND1, NOPTIND2,
    NOPTIND3, NOPTIND4, NOPTIND5, NOPTIND6, NOPTIND7,
    NOPTIND8, NOPTIND9, NOPTIND10, NOPTIND11, NOPTIND12,
    NOPTIND13, NOPTIND14)
    Values
    (3693744, 753738, '082013', 2167, 'X',
    'FRLO<1530>', 'FRLO<1530>', '1530', '1530', '1530',
    'X', 'X', '1530', '1530', 'FRLO',
    '1530', '1530', 'X', 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0);
    Insert into SCHEDULES
    (SCHEDULEID, EMPID, PERIODID, AREAID, DAY1,
    DAY2, DAY3, DAY4, DAY5, DAY6,
    DAY7, DAY8, DAY9, DAY10, DAY11,
    DAY12, DAY13, DAY14, NOPTIND1, NOPTIND2,
    NOPTIND3, NOPTIND4, NOPTIND5, NOPTIND6, NOPTIND7,
    NOPTIND8, NOPTIND9, NOPTIND10, NOPTIND11, NOPTIND12,
    NOPTIND13, NOPTIND14)
    Values
    (3693745, 753740, '082013', 2167, 'X',
    'FRLO<1530>', 'FRLO<1530>', '1530', 'FRLO', '1530',
    'X', 'X', '1530', '1530', '1530',
    '1530', '1530', 'X', 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0);
    Insert into SCHEDULES
    (SCHEDULEID, EMPID, PERIODID, AREAID, DAY1,
    DAY2, DAY3, DAY4, DAY5, DAY6,
    DAY7, DAY8, DAY9, DAY10, DAY11,
    DAY12, DAY13, DAY14, NOPTIND1, NOPTIND2,
    NOPTIND3, NOPTIND4, NOPTIND5, NOPTIND6, NOPTIND7,
    NOPTIND8, NOPTIND9, NOPTIND10, NOPTIND11, NOPTIND12,
    NOPTIND13, NOPTIND14)
    Values
    (3693746, 753748, '082013', 2167, 'X',
    'FRLO<1530>', '1530', '1530', '1530', '1530',
    'X', 'X', 'FRLO<1530>', '1530', 'FRLO',
    '1530', '1530', 'X', 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0);
    COMMIT;
    Insert into PAYPERIODS
    (PERIODID, STARTPP)
    Values
    ('082013', TO_DATE('03/24/2013 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    COMMIT;

    Do you have the opportunity to change the data model to have one day per row ? It would make this easier to get this result without the need for a 14-way CASE or UNION.
    If not...
    The case statement will return as soon as it matches one of the conditions. Since you want a match when any column in the row starts with FRLO you can use a UNION ALL treating each column as a separate result. There may be more efficient ways to do this, but here is one way:
    Select S.Empid,       Pp.Startpp Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day1, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+1 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day2, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+2 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day3, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+3 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day4, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+4 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day5, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+5 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day6, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+6 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day7, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+7 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day8, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+8 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day9, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+9 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day10, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+10 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day11, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+11 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day12, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+12 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day13, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+13 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day14, 0, 4)) = 'FRLO'

  • Need help with MS SQL server JDBC driver

    Anyone has experience getting ACS working with SQL2005? We keep getting ‘com.adobe.adept.persist.DatabaseException: java.sql.SQLException: No suitable driver’
    We’re using sqljdbc.jar and sqljdbc4.jar that downloaded from Microsoft website. We added this to every library folder under tomcat, JRE and SDK but it did not help. Any suggestion will be helpful.
    Thanks-

    Hi,
    We have ACS with SQL Server 2005 Std correctly working.
    We have this settings:
    ############ SQL Server Connection ############
    com.adobe.adept.persist.sql.driverClass=com.microsoft.sqlserver.jdbc.SQLServerDriver
    com.adobe.adept.persist.sql.connection=jdbc:sqlserver://ip-addressSQL:PortSQL;databaseName =Adept
    com.adobe.adept.persist.sql.dialect=microsoft
    com.adobe.adept.persist.sql.user=userSQL
    com.adobe.adept.persist.sql.password=passSQL
    Wi use Microsoft SQL Server JDBC Driver 3.0 downloaded from Microsoft website (http://www.microsoft.com/download/en/details.aspx?id=21599)
    Good luck,

Maybe you are looking for

  • How do I launch Photoshop CC in Windows 8.1?

    I've successfully downloaded the trial version of Photoshop CC and have launched the Adobe Initialliser, but can't see where I go from here. The PS icon within the Initialliser is not a live link, I've only the option to view tutorials. I'm not techn

  • How to download list of transaction from SAP area menu in SAP1 transaction

    Hello All, My requirement is I want to download the list of transaction under the SAP area menu in SAP1 transaction. I tried with SE43, entered area menu as S000, but it doesn't give me of the same hierarchy and some transaction were missing, for exa

  • Trackpad forgets speed setting

    Under Lion, my Magic Trackpad keeps forgetting its speed settings (how quickly a single-finger motion moves the cursor on the screen). I have it set one notch down from fastest, and it will randomly reset to the middle setting. I've not had this prob

  • PO change didnt transfer to corresponding SO via IDOC.

    Hi, I created an PO and using IDOC to create corresponding SO in the system. The first time,the PO created with 1 item and the IDOC is triggered and the corresponding SO wtih 1 item is generated by this IDOC successfully. But the second time, if i ch

  • Error in sync process

    I've recently installed Nokia PC suite and when sync to Microsoft Outlook (exchange) I receive the following message at the start of the sync. Personal folders (in the title bar) The file C:\Documents and Settings\AKing\Local Settings\Application Dat