Problem with the SQL Query

Hey all,
I made a view so that I could join three databases together and put the results on the association table. However, I keep getting an error that I'm not using the SELECT keyword, when I am. Maybe there is another bug somewhere else?
CREATE OR REPLACE VIEW "SUPPLIER_COMPETENCY_VW" ("SUPPLIER_PK", "COMPETENCY_PK", "ROW_CREATE_EMAIL", "ROW_CREATE_TIMESTAMP", "ROW_UPDATE_EMAIL", "ROW_UPDATE_TIMESTAMP") AS
SELECT
SUPPLIER_COMPETENCY_VW.SUPPLIER_PK||'|'||SUPPLIER_COMPETENCY_VW.COMPETENCY_PK,
SUPPLIER_COMPETENCY_VW.SUPPLIER_PK,
SUPPLIER_COMPETENCY_VW.COMPETENCY_PK,
SUPPLIER_COMPETENCY_VW.ROW_CREATE_EMAIL,
SUPPLIER_COMPETENCY_VW.ROW_CREATE_TIMESTAMP,
SUPPLIER_COMPETENCY_VW.ROW_UPDATE_EMAIL,
SUPPLIER_COMPETENCY_VW.ROW_UPDATE_TIMESTAMP
FROM
SUPPLIER_COMPETENCY_TB, TPL_SUPPLIERS_TB, TPL_CONTACTS_TB
WHERE
TBL_SUPPLIER_TB.SUPPLIER_PK = SUPPLIER_COMPETENCY_TB.SUPPLIER_PK
AND
TBL_COMPETENCY_TB.COMPETENCY_PK = SUPPLIER_COMPETENCY_TB.SUPPLIER_PK
Any Suggestions?
Sumer

CREATE VIEW "SUPPLIER_COMPETENCY_VW" ("SUPPLIER_PK", "COMPETENCY_PK", "ROW_CREATE_EMAIL", "ROW_CREATE_TIMESTAMP", "ROW_UPDATE_EMAIL", "ROW_UPDATE_TIMESTAMP") AS
SELECT
SUPPLIER_COMPETENCY_TB.SUPPLIER_PK||'|'||SUPPLIER_COMPETENCY_TB.COMPETENCY_PK,
SUPPLIER_COMPETENCY_TB.SUPPLIER_PK,
SUPPLIER_COMPETENCY_TB.COMPETENCY_PK,
SUPPLIER_COMPETENCY_TB.ROW_CREATE_EMAIL,
SUPPLIER_COMPETENCY_TB.ROW_CREATE_TIMESTAMP,
SUPPLIER_COMPETENCY_TB.ROW_UPDATE_EMAIL,
SUPPLIER_COMPETENCY_TB.ROW_UPDATE_TIMESTAMP
FROM
SUPPLIER_COMPETENCY_TB
The same error keeps coming up of being unable to find the SELECT keyword, yet im not sure where the error is.
Sumer

Similar Messages

  • Whats wrong with the sql query-- giving no rows selected

    i have a table audit_data with 4 columns , eff_m & end_m are declared as timestamp and the time stamp data is different for all the records
    Please advice as soon as possible as this is a production problem
    ORG_GRP_I grn_n ED_EFF_m (timestamp) ED_END_M OFV
    1 999 01-Jan-06 1 03-Aug-06 0 0
    1 999 28-Jul-06 0 04-Aug-06 1 0
    1 999 04-Aug-06 1 04-Aug-06 1 0
    1 999 04-Aug-06 0 6.08
    This query is giving no rows returned,even though there is data in database
    SELECT NVL(OFV,0)
    FROM audit_data ag
    WHERE ag.ORG_GRP_I = 1
    AND ag.GRN_N = 999
    AND (ag.ED_EFF_M,NVL(ag.ED_END_M,SYSDATE)) IN (SELECT MAX(ED_EFF_M),MAX(NVL(ED_END_M,SYSDATE))
    FROM audit_data ag2
    WHERE ag2.ORG_GRP_I= ag.org_grp_i
    AND ag2.grn_n=ag.grn_n
    AND To_Date(To_Char(ag2.ED_EFF_M,'MM/DD/YYYY'),'MM/DD/YYYY') <= TO_DATE(TO_CHAR('08/04/06','MM/DD/YYYY'),'MM/DD/YYYY')
    AND To_Date(To_Char(NVL(ag2.ED_END_M,SYSDATE),'MM/DD/YYYY'),'MM/DD/YYYY') >= TO_DATE(TO_CHAR('08/04/06','MM/DD/YYYY'),'MM/DD/YYYY'));
    This query is giving value 6.08, when made type conversions.
    what wrong with the above query.please advice
    SELECT NVL(OFV,0)
    FROM audit_data ag
    WHERE ag.ORG_GRP_I = 1
    AND ag.GRN_n = 999
    AND (to_date(to_char(ag.ED_EFF_M,'mm/dd/yyyy'),'mm/dd/yyyy'),NVL(to_date(to_char(ag.ED_END_M,'mm/dd/yyyy'),'mm/dd/yyyy'),SYSDATE)) IN
    (SELECT MAX(to_date(to_char(ED_EFF_M,'mm/dd/yyyy'),'mm/dd/yyyy')),MAX(NVL(ED_END_M,SYSDATE))
    FROM audit_data ag2
    WHERE ag2.ORG_GRP_I= ag.org_grp_i
    AND ag2.grn_n=ag.grn_n
    AND To_Date(To_Char(ag2.ED_EFF_M,'MM/DD/YYYY'),'MM/DD/YYYY') <= TO_date('08/04/2006','MM/DD/YYYY')
    AND To_Date(To_Char(NVL(ag2.ED_END_M,SYSDATE),'MM/DD/YYYY'),'MM/DD/YYYY') >= TO_DATE('08/04/2006','MM/DD/YYYY'));

    In the second query you convert a string to a date correctly using TO_DATE(string,date format)
    In the first query you try to make a char of something that already is a char, e.g. TO_CHAR('08/04/06','MM/DD/YYYY').
    The TO_CHAR functions expects either a number or a date as its first parameter. That's why it's giving you a ORA-01722.

  • Mapping Problem with Native SQL query

    My application uses a native SQL query to locate certain entities. It looks like this:
    SELECT UPLOADATTEMPTREF, STUDENTNUMBER, USERID, WORKITEMCODE, WORKITEMINSTURN, WORKITEMTITLE, MODULERUNCODE, STUDENTNAME, SUBMISSIONDEADLINE, UPLOADATTEMPTSERVERDATE, FILENAME, UPLOADCOMPLETESERVERDATE, NEWFILENAME, FILESIZE, FILEPATH, DOWNLOADSERVERDATE, MODULECODE, MODULETITLE
    FROM Submission_Attempt WHERE UPLOADATTEMPTREF IN (
    SELECT uploadAttemptRef FROM (" +<br /><br />                         "SELECT MAX(uploadAttemptRef) AS uploadAttemptRef, UserID, workItemInstUrn, " +<br /><br />                         "workItemCode FROM Submission_Attempt where workiteminsturn = ?1 " +<br /><br />                         "GROUP BY UserID, workItemInstUrn, workItemCode) Table1 ) " +<br /><br />                         "and uploadCompleteServerDate is not null;"<br />
    My expectation was that EclipseLink would be able to handle the mapping of the results to the entity quite happily. However, I get a NonSynchronizedVector of Objects - each Object representing one field of data.
    I need help with either:
    Converting the above SQL into JPQL so that I (hopefully) don't have to worry about the SQL or
    Understanding why this isn't working properly...
    Anyone able to help?
    Edited by: phunnimonkey on Nov 6, 2008 3:33 AM

    Never mind - the problem was to do with not specifying a class when creating the native query.

  • Problem with the SQL Data Source (Essbase server in Unix Env)

    I too have the same problem.
    I have setup the Datasource for an Oracle db in the Essbase Server (which is on a Unix Box) using the Oracle Wire Protocol.I tested the ODBC connection in the Server and it connect with the credentials.
    But if i choose the same DSN in the EAS and try to connect i get the below error
    Error: 1021001 Failed to Establish Connection With SQL Database Server.
    I even downloaded a document from the Oracle site.. on the SQL interface in Essbase but i could not find the inst-sql.sh file to enable Essbase SQL Interface on the server. Is this required??
    I tried with both the User & System DSN on the server but no luck.
    Any help on this will be highly appreciated. Thanks in advance.
    Posting in a new thread since the old one is answered and no points available to score.

    It can depend on the version, it is different for version 11, further information :- How to define a relational data source in (odbc.ini) V11 Essbase?
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How can i use index in select query.. facing problem with the select query.

    Hi Friends,
    I am facing a serious problem in one of the select query. It is taking a lot of time to fetch data in Production Scenario.
    Here is the query:
      SELECT * APPENDING CORRESPONDING FIELDS OF TABLE tbl_summary
        FROM ztftelat LEFT JOIN ztfzberep
         ON  ztfzberep~gjahr = st_input-gjahr
         AND ztfzberep~poper = st_input-poper
         AND ztfzberepcntr  = ztftelatrprctr
        WHERE rldnr  = c_telstra_accounting
          AND rrcty  = c_actual
          AND rvers  = c_ver_001
          AND rbukrs = st_input-bukrs
          AND racct  = st_input-saknr
          AND ryear  = st_input-gjahr
          And rzzlstar in r_lstar                            
          AND rpmax  = c_max_period.
    There are 5 indices present for Table ZTFTELAT.
    Indices of ZTFTELAT:
      Name   Description                                               
      0        Primary key( RCLNT,RLDNR,RRCTY,RVERS,RYEAR,ROBJNR,SOBJNR,RTCUR,RUNIT,DRCRK,RPMAX)                                          
      005    Profit (RCLNT,RPRCTR)
      1        Ledger, company code, account (RLDNR,RBUKRS, RACCT)                                
      2        Ledger, company code, cost center (RLDNR, RBUKRS,RCNTR)                           
      3        Account, cost center (RACCT,RCNTR)                                        
      4        RCLNT/RLDNR/RRCTY/RVERS/RYEAR/RZZAUFNR                        
      Z01    Activity Type, Account (RZZLSTAR,RACCT)                                        
      Z02    RYEAR-RBUKRS- RZZZBER-RLDNR       
    Can anyone help me out why it is taking so much time and how we can reduce it ? and also tell me if I want to use index number 1 then how can I use?
    Thanks in advance.

    Hi Shiva,
    I am using two more select queries with the same manner ....
    here are the other two select query :
    ***************1************************
    SELECT * APPENDING CORRESPONDING FIELDS OF TABLE tbl_summary
        FROM ztftelpt LEFT JOIN ztfzberep
         ON  ztfzberep~gjahr = st_input-gjahr
         AND ztfzberep~poper = st_input-poper
         AND ztfzberepcntr  = ztftelptrprctr
        WHERE rldnr  = c_telstra_projects
          AND rrcty  = c_actual
          AND rvers  = c_ver_001
          AND rbukrs = st_input-bukrs
          AND racct  = st_input-saknr
          AND ryear  = st_input-gjahr
          and rzzlstar in r_lstar             
          AND rpmax  = c_max_period.
    and the second one is
    *************************2************************
      SELECT * APPENDING CORRESPONDING FIELDS OF TABLE tbl_summary
        FROM ztftelnt LEFT JOIN ztfzberep
         ON  ztfzberep~gjahr = st_input-gjahr
         AND ztfzberep~poper = st_input-poper
         AND ztfzberepcntr  = ztftelntrprctr
        WHERE rldnr  = c_telstra_networks
          AND rrcty  = c_actual
          AND rvers  = c_ver_001
          AND rbukrs = st_input-bukrs
          AND racct  = st_input-saknr
          AND ryear  = st_input-gjahr
          and rzzlstar in r_lstar                              
          AND rpmax  = c_max_period.
    for both the above table program is taking very less time .... although both the table used in above queries have similar amount of data. And i can not remove the APPENDING CORRESPONDING. because i have to append the data after fetching from the tables.  if i will not use it will delete all the data fetched earlier.
    Thanks on advanced......
    Sourabh

  • Problem with a SQL query involving dates

    I have a database with each task made by a developer in the company's systems, with 2 fields to determine the duration of the tasks: begin_date and end_date, both Dates. Now I have to make an SQL query returning the total of hours each one worked counting every task, so I'm using something like this (simplifying):
    select user_id, sum(end_date - begin_date)
    from task
    group by user_id
    but I get a weird fractional number. How do I do this query?

    What database are you using? Oracle?
    The weird fractional number is probably the difference between the dates in days. If you want it in hours, try multiplying it with 24.
    select user_id, sum(end_date - begin_date) * 24
    from task
    group by user_id

  • Help with the SQL Query: How to use case.

    Q:- I have written a query which will written the following output.
    C1 C2 C3
    a ---- b.1 ---- 1
    a ---- b.1 ---- 1
    a ---- b.1 ---- 2
    a ---- b.1 ---- 3
    a ---- b.1 ---- 3
    a ---- b.2 ---- 1
    a ---- b.2 ---- 2
    a ---- b.2 ---- 2
    a ---- b.3 ---- 1
    ac---- b.1 ---- 1
    ac---- b.1 ---- 2
    ac---- b.2 ---- 1
    ac---- b.2 ---- 2
    ac---- b.2 ---- 3
    ac---- b.2 ---- 3
    ac---- b ---- 1
    But i want the output to print in the following way. Please suggest.
    C1 C2 C3
    a ---- b.1 ---- 1
    ------------------2
    ------------------3
    a ---- b.2 ---- 1
    ------------------2
    a ---- b.3 ---- 1
    ac---- b.1 ---- 1
    ------------------2
    ac---- b.2 ---- 1
    ------------------2
    ac---- b.2 ---- 3
    ac---- b ---- 1
    Edited by: user555994 on Jan 18, 2011 1:42 AM
    Edited by: user555994 on Jan 18, 2011 1:43 AM

    Or may be
    SQL> ed
    Wrote file afiedt.buf
      1  WITH sample_data AS
      2    (SELECT 'a' C1,'b.1' C2, 1 C3 FROM dual UNION ALL
      3     SELECT 'a' C1,'b.1' C2, 1 C3 FROM dual UNION ALL
      4     SELECT 'a' C1,'b.1' C2, 2 C3 FROM dual UNION ALL
      5     SELECT 'a' C1,'b.1' C2, 3 C3 FROM dual UNION ALL
      6     SELECT 'a' C1,'b.1' C2, 3 C3 FROM dual UNION ALL
      7     SELECT 'a' C1,'b.2' C2, 1 C3 FROM dual UNION ALL
      8     SELECT 'a' C1,'b.2' C2, 2 C3 FROM dual UNION ALL
      9     SELECT 'a' C1,'b.2' C2, 2 C3 FROM dual UNION ALL
    10     SELECT 'a' C1,'b.3' C2, 1 C3 FROM dual UNION ALL
    11     SELECT 'ac' C1,'b.1' C2, 1 C3 FROM dual UNION ALL
    12     SELECT 'ac' C1,'b.1' C2, 2 C3 FROM dual UNION ALL
    13     SELECT 'ac' C1,'b.2' C2, 1 C3 FROM dual UNION ALL
    14     SELECT 'ac' C1,'b.2' C2, 2 C3 FROM dual UNION ALL
    15     SELECT 'ac' C1,'b.2' C2, 3 C3 FROM dual UNION ALL
    16     SELECT 'ac' C1,'b.2' C2, 3 C3 FROM dual UNION ALL
    17     SELECT 'ac' C1,'b' C2, 1 C3 FROM dual
    18     )
    19  SELECT
    20         NVL2(LAG(C1) OVER (PARTITION BY C1,C2 ORDER BY C1,C2,C3),NULL,C1) C1
    21        ,NVL2(LAG(C2) OVER (PARTITION BY C1,C2 ORDER BY C1,C2,C3),NULL,C2) C2
    22        ,C3
    23* FROM (SELECT DISTINCT c1,c2,c3 FROM sample_data)
    SQL> /
    C1 C2          C3
    a  b.1          1
                    2
                    3
    a  b.2          1
                    2
    a  b.3          1
    ac b            1
    ac b.1          1
                    2
    ac b.2          1
                    2
    C1 C2          C3
                    3
    12 rows selected.
    SQL>

  • I am struck up with the sql query pleas help me

    Hi,
    i am struck up with this query
    select cpuid,hostid,timestamp from
    system_Cpu
    where hostid='dscp02469' AND cpuid='second'
    CPUID HOSTID TIMESTAMP
    second dscp02469 29:jun:2006:18:30:18
    second dscp02469 29:jun:2006:18:31:04
    second dscp02469 29:jun:2006:18:32:53
    second dscp02469 29:jun:2006:18:40:39
    second dscp02469 29:jun:2006:18:41:26
    second dscp02469 29:jun:2006:18:42:31 (top entry)
    i have to get top five minutes records
    CPUID HOSTID TIMESTAMP
    second dscp02469 29:jun:2006:18:40:39
    second dscp02469 29:jun:2006:18:41:26
    second dscp02469 29:jun:2006:18:42:31
    i am writing this query
    select cpuid,hostid,timestamp from system_Cpu where hostid='dscp02469' AND cpuid='second' having max(timestamp)-timestamp<5/1440
    having max(timestamp)-timestamp<5/1440
    ERROR at line 2:
    ORA-00979: not a GROUP BY expression
    Message was edited by:
    user517983

    You seem to be offended...
    Well, here is what I tried out (and then posted)...
    SQL> select cpuid,hostid,to_char(timestamp, 'dd/mon/yyyy hh24:mi:ss') FROM(select cpuid,hostid,times
    tamp, max(timestamp) over () maxts from system_Cpu where hostid='dscp02469' AND cpuid='second' )WHER
    E maxts-timestamp<5/1440 ;
    CPUID  HOSTID    TO_CHAR(TIMESTAMP,'D
    second dscp02469 29/jun/2006 18:40:39
    second dscp02469 29/jun/2006 18:41:26
    second dscp02469 29/jun/2006 18:42:31And just to display time component, I modified it a bit...
    SQL> select cpuid,hostid,to_char(timestamp, 'dd/mon/yyyy hh24:mi:ss') FROM(select cpuid,hostid,times
    tamp, max(timestamp) over () maxts from system_Cpu where hostid='dscp02469' AND cpuid='second' )WHER
    E maxts-timestamp<5/1440 ;
    CPUID  HOSTID    TO_CHAR(TIMESTAMP,'D
    second dscp02469 29/jun/2006 18:40:39
    second dscp02469 29/jun/2006 18:41:26
    second dscp02469 29/jun/2006 18:42:31It worked for me. BTW, the way I interpreted the OP's requirement was-give all records that are within 5 minutes interval from the top (or max) timestamp.
    I may be wrong...

  • Whats wrong with the sql query insert .... plz tell me

    {
    String sql = "INSERT INTO candidate VALUES (";
    sql += candidate.getEnrollmentNumber() + ",";
    sql += candidate.getDateOfEnrollment() + ",";
    sql += candidate.getName() + ",";
    sql += candidate.getContactNumber() + ",";
    sql += candidate.getGender() + ",";
    sql += candidate.getMailingAddress() + ",";
    sql += candidate.getEmailId() +",";
    sql += candidate.getClassOfVehicle() + ",";
    sql += candidate.getTypeOfVehicle() + ",";
    sql += candidate.getDateOfBirth() + ",";
    sql += candidate.getBatchTime() +")";
    System.out.println("sql: " +sql);
    //executeQuery(sql);
    executeUpdate(sql);
    }catch(SQLException e){
    e.printStackTrace();
    Giving me error as " com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax;

    If you are inserting a string into your sql, you need to put it in single quotes (but not numbers).
    Example:
    sql += " ' "+candidate.getFirstName() " ', "
    Additionally, if firstName contains a single quote, it needs to be escaped by converting it to two single quotes.
    Note you don't have to do any of this if you use preparedStatements.
    Note: remove both spaces in " ' " so you get "'" in the above example, otherwise you are inserting spaces into your value.
    I use " ' " so you can more easily see what I did..

  • [Execute SQL Task] Error: Executing the query "DECLARE_@XMLA nvarchar(3000) ,__@DateSerial nvarch..." failed with the following error: "Incorrect syntax near '-'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly,

    Hi
    DECLARE @XMLA nvarchar(3000)
    , @DateSerial nvarchar(35);
    -- Change date to format YYYYMMDDHHMMSS
    SET @DateSerial = CAST(GETDATE() AS DATE);
    --SELECT @DateSerial
    Set @XMLA = 
    N' <Batch xmlns="http://schemas.microsoft.com/analysis services/2003/engine">
     <ErrorConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2"
    xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200"
    xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200">
    <KeyErrorLimit>-1</KeyErrorLimit>
    <KeyNotFound>IgnoreError</KeyNotFound>
    <NullKeyNotAllowed>IgnoreError</NullKeyNotAllowed>
     </ErrorConfiguration>
     <Parallel>
    <Process xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2"
    xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200"
    xmlns:ddl300="http://schemas.microsoft.com/analysisservices/2011/engine/300" xmlns:ddl300_300="http://schemas.microsoft.com/analysisservices/2011/engine/300/300">
     <Object>
     <DatabaseID>MultidimensionalProject5</DatabaseID>
     <CubeID>giri</CubeID>
     <MeasureGroupID>Fact Internet Sales</MeasureGroupID>
     </Object>
     <Type>ProcessFull</Type>
     <WriteBackTableCreation>UseExisting</WriteBackTableCreation>
     </Process>
      </Parallel>
    </Batch>';
    EXEC (@XMLA) At SHALL-PCAdventureWorksDw ;
     iam executive the    query when iam getting below error.
      [Execute SQL Task] Error: Executing the query "DECLARE
    @XMLA nvarchar(3000)
    , @DateSerial nvarch..." failed with the following error: "Incorrect syntax near '-'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set
    correctly, or connection not established correctly. 
     how to solve this error;
     please help me

    What are you trying to do? What sort of data source is  SHALL-PCAdventureWorksDw?
    When you use EXEC() AT, I would execpt to see an SQL string to be passed to EXEC(), but you are passing an XML string????
    If you explain why you think this would work in the first place, maybe we can help you.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • : "Invalid object name '#Temp'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

     Hi   .
        I was creating the  pass the values t in temp tables  though s sis package vs2012 .
      First I was taken on executive SQL TASK.
     IN EXCUTIVE SQL TASK  . I was write the stored proce:
    Sp;
    reate  procedure  USP_GETEMP2333
    AS
    begin
    Select  eid,ename,dept,salary from emp
    end;
    create table #temp(eid int,ename varchar(20),dept varchar(20),salary int)
      insert into #temp
       exec USP_GETMP02333
       go.
     It was executive correctly.
     I was taken another sequence container. In the sequence container iam creating one   executive  sql
    In 2<sup>nd</sup> excutive sql task: sql statements is
    if object_id('emp_fact_sal') is not null
     drop table emp_fact_sal
    select eid,ename as emp_name,sal_bar=
    case when salary<=5000 then 'l'
    when salary >5000 and salary<=7000 then 'm'
    else
    'h'
    end
    into emp_fact_sal from #temp.
     and one falt flies  it was taken to designation .
     iam changing  all  connection properties:
     in oldeb connection:
    in excutive sal task properties .
    delay validation is true,
    and retain connection maner is also true,
    and package mode is 64 bit is false.
     But iwas excutive in 2<sup>nd</sup> excutive ql task .
    Iam getting this type of errors,
                    [Execute SQL Task] Error: Executing the query " if object_id('emp_fact_sal') is not null
     drop ta..." failed with the following error: "Invalid object name '#Temp'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established
    correctly.
     Please help me

    Arthur suggestion works but you shouldnt even be doing this on a SQL Task.
    Use a data flow task. You'll have better control over the data that is being transfered and get better performance because no staging table will be used.
    Just because there are clouds in the sky it doesn't mean it isn't blue. But someone will come and argue that in addition to clouds, birds, airplanes, pollution, sunsets, daltonism and nuclear bombs, all adding different colours to the sky, this
    is an undocumented behavior and should not be relied upon.

  • Help with an SQL Query on the Logger

    We are running UCCE 8.5(3) and need help with an SQL query. When I run the below I would also like to see skill group information(name preferably)? Any help would be greatly appreciated!
    select * from dbo.t_Termination_Call_Detail where DateTime between '10-11-2012 00:00:00:00' and
    '10-11-2012 23:59:59:59'

    David, thanks for replying.  Unfortunitly I don't know enough about SQL to put that into a query and have it return data.  Would you be able to give an example on what the query would look like?

  • Space problems with the SAP Database MS SQL 2000

    Hi,
    Actually, I have a size problem with the database, I have MS SQL Server 2000 with Service Pack4 on a Windows 2003 Server environment that is my DataBase Server of my ERP ECC 6.0. On the other hand I have a storage where I have 229 Gb of free space used only for the database files of the SAP data and the SAP log file.
    But when I check the DB space allocation on trx. DB02 I saw this:
    3 Database files and 1 transaction log:
    The 3 database files are: PRDDATA1 (size 15,313 MB used 15016 MB) , PRDDATA2 (size 14106 MB used 13984 MB), PRDDATA3 (size 14472 MB used 14352 MB) and the log file is PRDLOG1 ( size 1000 MB) all of them with no limit option and growth by 10%.
    So I went to the SQL Enterprise Manager and I saw that my Database PRD properties and I got this information:
    My database size is 44892.48 Mb size with only 1330.36 Mb of free space and that is alarming.
    So the question here is how ,if I have a storage where the sap data is storing with 229 Gb of free space, can I make the database files grow up in order to use all the available space of my storage.
    Can you help me please because it is critical being my productive system?
    Best Regards
    Erik Espinosa

    I resolved this issue myself. Thanks for all your help.
    Best Regards,
    Erik Espinosa

  • The SQL query is not executing

    Hi
    I have the following situation: In a project we designed our reports calling a stored procedure the exits in a MS SQL Server 200 database. The Stored Procedures works fine and when they are used in the report everything works perfectly.
    The reports are being made with CR DEsigner 11, when the designer ends them, ha pass them to me and we put them in our java web application. I open them and even preview them since the Crystal Reprots Perspective of Eclipse and I can see the data, so everything to this point is OK.
    The problem comes when I change of connection, I'm trying to connect every report to the same host and database, and when the reprot is displayed in the browser there is no data. I profile the SQL commands that are executed when the report is requested and I found that the reprot is not executing the stored procedure.
    I guess because i'm connectring the report to the same database and host that was used when the report is created and i'm also passing exactly the same parameters of the stored procedure, then report thinks that it doesn't have executing again becuase it will be the same information.
    SO, i wonder if there is a way to request to the report to execute the sql query every time i have to display it.
    thanks for any help.

    What happens when you try to view the report using a simple viewer.jsp?without changing the connection?
    2009-05-25 14:06:09,250 ERROR com.businessobjects.reports.sdk.JRCCommunicationAdapter -  detected an exception: Error de conexión: [SQLServer 2000 Driver for JDBC]Error establishing socket.
    But the database server is ok, so i think the rpt needs more information to be connect to the database.
    Also what happens if you dont use the data bean and give everything there only?
    The same, the rpt is not executing the stored procedure.
    Did anything change on the RDBMS side? Additional packages, changes to the schema, ownership, etc?
    No, the server is ok and the database is ok.
    If you configure Log4J logging to DEBUG, you should see the database invokes from the Crystal Java engine, specifically the queries sent and the number of rowsets returned. Do you notice any errors?
    I have a problem here with log4j. In my project i'm using spring and with the help of spring i configure log4j, basically with spring is easier to configure log4j.
    I'm telling you this because i have log4j working but when my application reaches the code to change the connection to the rerport, log4j dies and stop sending any message to the stdout or to a log file. I haven't since this behavior in any other app o library. So i want to guess i have something wrong with my log4j or maybe with log4j+spring.
    So, i remove all the code of spring referring to log4j, but the problem with log4j wasn't solved.
    What i will try now is to remove spring from the project.
    This is my log4j.properties:
    log4j.rootLogger=DEBUG, stdout
    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
    log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m%n

  • Condition Concatination with the SQL String

    Hi Friends,
    I am facing problem in concatinating the below sring
    [  ','||:id1||',' like '%,'''||hou.name||''',%' ] in the below query in the place of [ hou.name =:id1 ]
    My Query :
    Declare
    TYPE cur_typ IS REF CURSOR;
    c cur_typ;
    query_str VARCHAR2(4000);
    v_part_num varchar2(40);
    v_inventory_item_id number;
    v_customer_name varchar2(30);
    v_op_name varchar2(240);
    begin
    query_str := 'SELECT partno part_num ,
    item_id inventory_item_id ,
    customer customer_name ,
    hou.name op_name
    FROM hr_organization_units hou,
    oe_transaction_types_all sot ,
    ra_customers rc ,
    ra_addresses_all ra ,
    ra_site_uses_all rsu ,
    oe_order_headers_all h ,
    oe_order_lines_all l ,
    pwr_sod50 ps
    WHERE hou.name =:id1 -- in this place the string need to be concatinated
    and ps.group_id = 9999999
    AND hou.organization_id=h.org_id
    AND ps.line_id =l.line_id
    AND l.header_id =h.header_id
    AND h.invoice_to_org_id=rsu.site_use_id
    AND rsu.address_id =ra.address_id
    AND ra.customer_id =rc.customer_id
    AND h.order_type_id =sot.transaction_type_id
    and rownum<5';
    OPEN c FOR query_str using v_op_name;
    loop
    FETCH c INTO v_part_num,v_inventory_item_id,v_customer_name;
    EXIT WHEN c%NOTFOUND;
    dbms_output.put_line(v_part_num||','||v_inventory_item_id||','||v_customer_name||','||v_op_name);
    end loop;
    CLOSE c;
    end;
    Thanks In Advance!
    Thanks & Regards
    Ramya Nomula

    Hi,
    Code seems Ok, What is the error u get when you execute it?
    Check Execute the SQL Query individually and look into it.
    Check it with sample value to the string which to be concatenated in your code.
    SET SERVEROUTPUT ON;
    DECLARE
        TYPE cur_typ IS REF CURSOR;
        c cur_typ;
        query_str VARCHAR2(4000);
        v_part_num varchar2(40);
        v_inventory_item_id number;
        v_customer_name varchar2(30);
        v_op_name varchar2(240);
    BEGIN
        query_str := '
        SELECT partno part_num ,
            item_id inventory_item_id ,
            customer customer_name ,
            hou.name op_name
        FROM hr_organization_units hou,
            oe_transaction_types_all sot ,
            ra_customers rc ,
            ra_addresses_all ra ,
            ra_site_uses_all rsu ,
            oe_order_headers_all h ,
            oe_order_lines_all l ,
            pwr_sod50 ps
        WHERE hou.name =:id1 -- in this place the string need to be concatinated
            and ps.group_id = 9999999
            AND hou.organization_id=h.org_id
            AND ps.line_id =l.line_id
            AND l.header_id =h.header_id
            AND h.invoice_to_org_id=rsu.site_use_id
            AND rsu.address_id =ra.address_id
            AND ra.customer_id =rc.customer_id
            AND h.order_type_id =sot.transaction_type_id
            and rownum<5';
        OPEN c FOR query_str USING v_op_name;
        LOOP
            FETCH c INTO v_part_num,v_inventory_item_id,v_customer_name;
            EXIT WHEN c%NOTFOUND;
            dbms_output.put_line(v_part_num||','||v_inventory_item_id||','||v_customer_name||','||v_op_name);
        END LOOP;
        CLOSE c;
    END;Thanks,
    Dharan V

Maybe you are looking for

  • HT201343 Can I mirror my Mac although it's an old version?

    We can only mirror our Mac with through AirPlay onto Apple TV if the Macbook Pro is a 2011 version or earlier. My macBook Pro is a mid-2009. Has anyone found a way to get around this limitation? I don't want to have to buy a new Mac! Thank you.

  • Error when deploying war file into application server

    I wrote a web service in java using RAD and managed to check it using a web service client with no errors. However, after creating a war file and tried to deploy this into the Sun application server, the following can be seen at the application serve

  • Acrobat X Pro - Digital Signatures

    Good Morning! I am trying to add a digital signature field in Adobe Pro X.  It seems fine when I'm doing the editing and preview, but when I save as .pdf, the form doesn't allow it to be signed.  If I click on the form in that field nothing happens.

  • Uploading to existing Albums on facebook with the new Blackberry Z 10 (PLS HELP!)

    Hi, I cannot upload to my existing albums on facebook.  when I upload a picture it just automatically puts it in the moble uploads.  There has to be a way to upload to my existing albums but I have been unable to figure out how.  Please help me:....T

  • Work Order Operation Duplicated on Operation/Activity Number

    I had a coworker duplicated his activity number on a operation. He hit save after he had changed the operation number. Now it is giving an error "Inconsistent data: Order 20066826 02/11/2008, duplicate entry U 0125. This had only happened once before