Regarding sql function error  for Hijri date to Gregorian date

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

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

Similar Messages

  • SQL function column in drop down list's data provider's query

    Just wondering, if it is somehow possible to use SQL function column for drop down list through data provider.
    At the moment, I am using id column as return value and name as display value from this query through CachedRowSetDataProvider:
    SELECT ALL someTable.Id,
    someTable.Name,
    someTable.Postal_Code,
    FROM someTable
    However, I want to change display to use calculated column as display value, for example Name_PostalCode from below mentioned changed query:
    SELECT ALL someTable.Id,
    CONCAT(someTable.Name, ' - Pin Code: ',someTable.Postal_Code) Name_PostalCode ,
    someTable.Name,
    someTable.Postal_Code,
    FROM someTable
    But JSC doesn't seem to like this.
    Is it someway possible to achieve this?
    Thanks.

    >
    But JSC doesn't seem to like this. Can you explain more. When doesn't it like it, in the design view, in the query editor, when your run it? What is the error you are seeing?
    See http://blogs.sun.com/divas/entry/displaying_multiple_fields_in_a

  • Question Regarding SQL logic error!

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

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

  • XdbConfiguration.sql giving errors for package XDB_CONFIGURATION

    Hi,
    I am getting following errors(at the bottom) while running xdbConfiguration.sql before installing the demo.
    I am logged in as sys user(sysdba) and using running
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    on Windows2000.
    Is the wrong version of Oracle. Do I have have 9.2.4.0.
    Thanks in advance for help.
    Om Soni
    Errors for PACKAGE BODY XDB_CONFIGURATION:
    LINE/COL ERROR
    51/6 PL/SQL: Statement ignored
    51/54 PLS-00302: component 'DELETE_FORCE' must be declared
    56/4 PL/SQL: SQL Statement ignored
    56/20 PL/SQL: ORA-22970: name does not correspond to an object view

    Hi ,
    I upgraded to 9.2.0.4.0. The error still shows up while running the xdbConfiguration.sql.
    The following errors show up:
    Errors for PACKAGE BODY XDB_CONFIGURATION:
    LINE/COL ERROR
    51/6 PL/SQL: Statement ignored
    51/54 PLS-00302: component 'DELETE_FORCE' must be declared
    56/4 PL/SQL: SQL Statement ignored
    58/9 PL/SQL: ORA-00942: table or view does not exist
    I got rid of first two error by removing dbms_xdb.DELETE_FORCE from line
    dbms_xdb.deleteResource(targetResource,dbms_xdb.DELETE_FORCE);
    Last two error are at line :
    select make_ref(DATABASE_SUMMARY,'DATABASE_SUMMARY')
    into xmlref
    from DATABASE_SUMMARY;
    Looking at the script DATABASE_SUMMARY is not a object.
    May be the script has a bug in it.
    -Om

  • Any BAPI/Function Module for adding new record with dates in PA0027

    Hi all,
    I am tryig to find is there any BAPI/Function module for updating new record with Start Date and End date for specified Personal Number in PA0027 Table.
    In PA0027 table i will be passing start date and end date for selected personal number, it needs to add new record with this details in the table checking the condition that this start date and end dates should not be between any of of start date and end dates for the specified personal number.
    thanks for ur time.
    Murali

    Hi Raj/Suresh thanks for ur answers.
    but i am having a problem,i gave this values.
    INFTY               -
                0027
    NUMBER              -
                00000010
    SUBTYPE             -
                010
    OBJECTID
    LOCKINDICATOR
    VALIDITYEND         -
                03/12/2006
    VALIDITYBEGIN       -
                03/01/2006
    RECORDNUMBER        -
                000
    RECORD              -
                P0027
    OPERATION           -
                CHK
    TCLAS               -
                A
    DIALOG_MODE         -
                0
    NOCOMMIT            -
                Y
    VIEW_IDENTIFIER
    SECONDARY_RECORD
    i am getting short dump saying that
    The source field is too short.
    The current program, "SAPLHRMM", tried to assign a field to a field symbo
    However, the field is shorter than the type of the field symbol, which
    is not allowed.
    The statement in question is in the form ASSIGN f TO <fs> CASTING or
    ASSIGN f TO <fs> with a field symbol that was created using the
    STRUCTURE addition.
    I tried  operation - Chage,Create (same thing for all inputs)
    is this correct funtion moduel for my requirment?
    what ever i am passing the start and end dates this should check in the table records with this personal number and if this start date and end dates are not between of any start and end dates then it should add new record with this dates.
    Thanks for ur time.
    Murali.

  • Error for datatype mismatch or wrong data in XML to database ODI interface

    Hello All,
    I am doing XML to DB mapping in ODI. but when there is any mismatch in the datatype between source and target or any data issue, ODI is not showing any error for that. it is just inserting the data in the DB from XML up to that erroneous record without any error message.Could anybody please help, how can I get the error message for the same, from ODI when I execute that interface?
    Thanks in Advance!

    no I could not find any records in the error table i.e E$_X table.

  • Regarding Creating Functional Specs for BI project

    Hi Gurus,
    I am looking for some documents on "Creating Functional Specs for BI project", as my prokect is in the initial stage.
    Hence we require to collect relevant info for implementing the FI-CO, SD & MM with BI project.
    I will be assigning points.
    My ID is: [email protected]
    Thank you.
    Regards,
    Pradeep Kandepu
    Edited by: pradeep kandepu on May 30, 2008 7:32 AM

    HI shanbhu
    can u please send those document to me also..
    and if you hace send me the Technical spec also
    My id is [email protected]
    Edited by: Bramhananda Reddy on Jun 7, 2008 4:31 PM
    Edited by: Bramhananda Reddy on Jun 7, 2008 4:31 PM

  • Bex Error for a particular set of data

    Hi Gurus,
        I have strange problem going on with my report, i have report which has variable
        for fiscal period (we can enter like 001/2007), the reports runs fine for 001/2207
        and 002/2007 but fails to run for 003/2007. i have data in the cube for that
        fiscal period.
        Please suggest a solution for this.
    Thanks a ton..

    Hi,
    Check for the fiscal year variant value for that  fisal period 003/2007in the cube is it same as that of othertwo values of the fiscal period.
    May be at the report level or at the cube level you have restricted the values of the fisacl variant for a particular value and for that variant value there is no fiscal period of 003/2007.
    Also it may be possible that your report key figures are restrcited year to date... that is till current fiscal period only through some other way.. and thats why you can only see data till current fiscal.
    Hope it helps
    Thanks

  • Payment Run (F110) error for MT103 - BFIBL02-303 - Bank Data is incomplete

    Hi,
    I'm trying to do a foreign vendor payment run in F110. We have a payment method type Z for these vendors, and FBPZ I have this payment type set to use the Payment Medium Workbench (PMW) with MT103 format.
    When I run the proposal I receve the error message BFIBL02-303 - Bank Data is incomplete (Bank country  , bank key  ). Looking at the MT103 produced I thought it was due to the vendor bank details missing, but I've checked the vendor and they aren't.
    I've tried to dig around in the code a little and notice that the 303 error message is produced in LFPAYM_SWIFT01 in Form FILL_BANK_FIELD (Fills bank fields (S.W.I.F.T. fields 52, 53, 54, 56, 57)), which looks as if it is our (the sending) bank details that it is failing on, though I can't see why.
    Does anyone have any ideas?
    The MT103 produced looks as follows:
    BANKGB22
    103
    :23B:CRED
    :32A:111026EUR999,99
    :33B:EUR999,99
    :50K:/12345678
    Our Name
    Our Address Line 1
    Our Address Line 2
    Our Address Line 3
    :52A:BANKGB22
    :59:/
    Customer Name
    Address Line 1
    Address Line 2
    Thanks
    Ben

    Hi
    Check in tcode FBZP for the payment method for this country, in the screen for required master record specifications. You might have bank details. After, in the settings for country (SM30/V_005_B 'Country Field Checks') check the values for this bank. In the data for vendor you need data for bank, in in required master record specif. you need bank data. If you have the SWIFT maybe you have to populate it in vendor.
    I hope this helps you
    Regards
    Eduardo

  • Invalid Number Error for Decimal Field While Loading Data

    I am loading a delimited text file using the SQL* loader however I am reciving an error in my decimal fields. When a decimal field only has leading zeros before the decimal point I receive invalid number error. Below will clarify:
    i.e.) 00000000.30 [*Invalid number*]
    i.e.) 00046567.45 [*Valid number*]
    i.e.) 00000001.00 [*Valid number*]
    I've tried setting the precision/scale in the table, tried declaring it a decimal field instead of number, none of these methods fixed the issue. Any help I would really appreciate.
      POLICY_NUMBER             NUMBER,
      EFFECTIVE_DATE     DATE "YYYYMMDD"          NULLIF EFFECTIVE_DATE = '',
      TRANSACTION_DATE     DATE "YYYYMMDD",
      TRANSACTION_AMOUNT     DECIMAL EXTERNAL,   -- Tried TRANSACTION_AMOUNT DECIMAL EXTERNAL (10)  & TRANSACTION_AMOUNT NUMBER
      MF_TRX_CODE          NUMBER,
      USER_ID          CHAR,
      GROUP_NUMBER          NUMBER,
      EXPIRATION_DATE     DATE "YYYYMMDD"          NULLIF EXPIRATION_DATE = '',
      BILL_NUMBER          NUMBER,Any help is greatly appreciated. Thanks before hand.

    Hi,
    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    SQL> SELECT * FROM TEST;
    TRANSACTION_AMOUNT
    SQL> SELECT * FROM TEST;
    TRANSACTION_AMOUNT
              11000,00
                293,37
               2000,00
               1134,32
                  0,30
    SQL>Between the selects I loaded the table with sql*loader using...
    Load Data
    INFILE *
    APPEND
    INTO TABLE TEST
    FIELDS TERMINATED BY '|'
    TRAILING NULLCOLS
      TRANSACTION_AMOUNT     DECIMAL EXTERNAL
    BEGINDATA
    00011000.00
    00000293.37
    00002000.00
    00001134.32
    00000000.30The log is
    SQL*Loader: Release 10.2.0.1.0 - Production on Tue Dec 23 17:23:47 2008
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Control File:   test.ctl
    Data File:      test.ctl
      Bad File:     test.bad
      Discard File:  none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array:     64 rows, maximum of 256000 bytes
    Continuation:    none specified
    Path used:      Conventional
    Table TEST, loaded from every logical record.
    Insert option in effect for this table: APPEND
    TRAILING NULLCOLS option in effect
       Column Name                  Position   Len  Term Encl Datatype
    TRANSACTION_AMOUNT                  FIRST     *   |       CHARACTER           
    Table TEST:
      5 Rows successfully loaded.
      0 Rows not loaded due to data errors.
      0 Rows not loaded because all WHEN clauses were failed.
      0 Rows not loaded because all fields were null.
    Space allocated for bind array:                  16512 bytes(64 rows)
    Read   buffer bytes: 1048576
    Total logical records skipped:          0
    Total logical records read:             5
    Total logical records rejected:         0
    Total logical records discarded:        0
    Run began on Tue Dec 23 17:23:47 2008
    Run ended on Tue Dec 23 17:23:50 2008
    Elapsed time was:     00:00:02.86
    CPU time was:         00:00:00.06Regards,

  • PL/SQL Function error

    Hi Guys,
    I've been getting driven a little crazy with this piece of code...
    create or replace function "GetHeirachy" (current VARCHAR2) return VARCHAR2 is
         name VARCHAR2(4000);
         hold VARCHAR2(4000);
         parent VARCHAR2(4000);
    BEGIN
         LOOP
         SELECT PARENT_ITEM_ID, ITEM_NAME INTO parent, name
         FROM HTMLDB_OARS.ITEM_REGISTER
         WHERE ITEM_ID = current;
         IF hold IS NULL THEN
              hold := name;
         ELSE
              hold := name || '/' || hold;
         END IF;
         current := parent;
              EXIT WHEN current IS NULL;
         END LOOP;
         RETURN hold;
    END "GetHeirachy";
    basically the table structure is a self referencing table that creates a heirachy effect, and i need to be able to return a string of "parent/child/grandchild" for display purposes, the function begins with the grandchild and then uses the references to collect each parent and add it to the return.
    When i put the function into sql workshop it is fine but if i try soemthing as simple as
    begin
    htp.prn(GetHeirachy('34'));
    end;
    i get these errors;
    ORA-06550: line 2, column 9:
    PLS-00905: object HTMLDB_OARS.GETHEIRACHY is invalid
    ORA-06550: line 2, column 1:
    PL/SQL: Statement ignored1. begin
    2. htp.prn(GETHEIRACHY('34'));
    3. end;
    Is there something simple wrong with my function code? pl/sql isn't my native language... and i don't know how to debug properly!
    Cheers,
    Alex

    alright - code complete, i'll post it for the sake of others doing soemthing similar;
    create or replace function GetHeirachy (current varchar2) return VARCHAR2 is
    name VARCHAR2(4000);
    hold VARCHAR2(4000);
    parent VARCHAR2(4000);
    cur VARCHAR2(4000);
    BEGIN
    cur := current;
    for i in 1..10 LOOP
    SELECT PARENT_ITEM_ID, ITEM_NAME INTO parent, name
    FROM HTMLDB_OARS.ITEM_REGISTER
    WHERE ITEM_ID = cur;
    IF hold IS NULL THEN
    hold := name;
    ELSE
    hold := name || '/' || hold;
    END IF;
    cur := parent;
    EXIT WHEN cur IS NULL;
    END LOOP;
    RETURN hold;
    END GetHeirachy;
    :) - cheers for the help.

  • Help Needed regarding SQL Loader Error

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

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

  • Regarding BAPI/Function Module for updating fields FAKSK and LIFEX

    Hi All,
    I have a requirement wherein i need to update the fields FAKSK(Billing block ) and LIFEX(External Identification number).
    We have already tried using the function Module WS_DELIVERY_UPDATE and also BAPI_OUTB_DELIVERY_CHANGE but we didnt find both the fields in any of the above BAPI or function module.
    To be more specific to the requirement we need to remove the Billing block and update the LIFEX filed.
    If anyone have come accross such situation Please advice.
    Thanks ina dva

    hi satya ranjan,
    put an append to structure 'vbkok' which is used as input parameter for WS_DELIVERY_UPDATE / WS_DELIVERY_UPDATE_2.
    enter faksk and lifex and data field plus an active-flag for every data field.
    e.g.:
    ZZKZTRSPG     ZZKZTRSPG     CHAR     1     0
    ZZTRSPG     TRSPG     CHAR     2     0
    find include 'LV50SFZ2' in WS_DELIVERY_UPDATE am implement like this:
    if  vbkok_wa-ZZKZTRSPG <> space .
    perform likp_bearbeiten_vorbereiten(sapfv50k).
    if not vbkok_wa-ZZKZTRSPG eq space.
      likp-trspg = vbkok_wa-zztrspg.
    endif.
    perform likp_bearbeiten(sapfv50k).
    endif.
    regards
    marcus

  • MS SQL - Syntax error for valid query

    I have a problem with the second query in this code (gives me
    a syntax error in my HAVING line)
    <cfquery name="getDupes" datasource="#application.ODBC1#"
    dbtype="ODBC" username="#application.userNameODBC1#"
    password="#application.userPassODBC1#">
    SELECT *
    FROM view_FormCount
    WHERE formCount >= 2
    ORDER BY formNum
    </cfquery>
    <cfset variables.lstForms = "">
    <cfoutput query="getDupes">
    <cfset variables.lstForms=
    listAppend(variables.lstForms,"'#getDupes.formNum#'")>
    </cfoutput>
    <cfset variables.whereClause = "(formNum =
    #ReplaceNoCase(variables.lstForms,',',' OR formNum =
    ','ALL')#)">
    <cfquery name="getDetails"
    datasource="#application.ODBC1#" dbtype="ODBC"
    username="#application.userNameODBC1#"
    password="#application.userPassODBC1#">
    SELECT tblForms.formNum, tblForms.formName,
    tblForms.formCustNum, tblCompanies.companyAbbr
    FROM tblForms INNER JOIN tblCompanies ON tblForms.formCustNum
    = tblCompanies.companyNum
    GROUP BY tblForms.formNum, tblForms.formName,
    tblForms.formCustNum, tblCompanies.companyAbbr
    HAVING #variables.whereClause#
    ORDER BY tblForms.formNum, tblForms.formCustNum
    </cfquery>
    Now, the really odd thing is if I just take the query text
    out of the CFQUERY tags and use CFOUTPUT instead (to see in my
    browser what query is getting executed) I get a query that I can
    paste into Enterprise Mgr and runs fine.
    I can even paste the resulting text into my code in a CFQUERY
    and CF will run it fine.
    In other words, the dynamic version query gives me an error,
    but if I just output the SQL statement, copy-and-paste that into
    the CFQUERY that's erroring out (replacing what's there) to run as
    a static query, it works fine (sample of static query below).
    The error I get when I try to do it dynamically is "Error
    Executing Database Query. [Macromedia][SQLServer JDBC
    Driver][SQLServer]Line 4: Incorrect syntax near '10169318'. The
    error occurred on line 21." which is where the HAVING clause
    starts.
    SELECT tblForms.formNum, tblForms.formName,
    tblForms.formCustNum, tblCompanies.companyAbbr FROM tblForms INNER
    JOIN tblCompanies ON tblForms.formCustNum = tblCompanies.companyNum
    GROUP BY tblForms.formNum, tblForms.formName, tblForms.formCustNum,
    tblCompanies.companyAbbr HAVING (formNum = '10169318' OR formNum =
    '1016CONCERTA' OR formNum = '1016NSAIDS' OR formNum =
    '1016STRATTERA' OR formNum = '1016WELLBUTRIN' OR formNum =
    '18504211' OR formNum = '185093807' OR formNum = '73208565' OR
    formNum = '732120027' OR formNum = '7322154' OR formNum = '7323402'
    OR formNum = '7323522' OR formNum = '73238900' OR formNum =
    '7324211' OR formNum = '7324211S' OR formNum = '7324265' OR formNum
    = '73242891' OR formNum = '732434341' OR formNum = '732434342' OR
    formNum = '73243435' OR formNum = '73243436' OR formNum =
    '73243439' OR formNum = '73243440' OR formNum = '73243441' OR
    formNum = '73243442' OR formNum = '73243443' OR formNum = '7324359'
    OR formNum = '7324360' OR formNum = '7324370' OR formNum =
    '7324560' OR formNum = '7324959' OR formNum = '7326411ptreg' OR
    formNum = '7326599' OR formNum = '7326600' OR formNum = '7326620'
    OR formNum = '7326707' OR formNum = '7326931' OR formNum =
    '7328410' OR formNum = '732851031TOP' OR formNum = '7328512' OR
    formNum = '7328548' OR formNum = '7328548P2' OR formNum =
    '7328548P3' OR formNum = '7328548P4' OR formNum = '73289400' OR
    formNum = '73290D' OR formNum = '7329154' OR formNum =
    '73291544JHS' OR formNum = '73291545JHS' OR formNum =
    '73291546JHSMH' OR formNum = '73291547JHSMH' OR formNum = '7329174'
    OR formNum = '7329308' OR formNum = '7329402' OR formNum =
    '7329424' OR formNum = '7329455' OR formNum = '7329520' OR formNum
    = '7329539' OR formNum = '73297701JH' OR formNum = '73298273' OR
    formNum = '73298400' OR formNum = '73298403' OR formNum =
    '73298404' OR formNum = '7329883' OR formNum = '73298860' OR
    formNum = '7329887' OR formNum = '73298974' OR formNum = '7329899'
    OR formNum = '7329899S' OR formNum = '73299190' OR formNum =
    '7329987' OR formNum = '7329999PTO' OR formNum = '732AV5160' OR
    formNum = '732CMHFRAZ' OR formNum = '732HIPAA' OR formNum =
    '732HIPAAFLYERS' OR formNum = '734HEART' OR formNum = '7444711' OR
    formNum = '7449230' OR formNum = '744HR4991' OR formNum =
    '7538014MI' OR formNum = '77511044' OR formNum = '77511045' OR
    formNum = '775stampnochange' OR formNum = '80851001BLUE' OR formNum
    = '80MR4200' OR formNum = '80MR4273' OR formNum = '80MR4274' OR
    formNum = '80MR4300' OR formNum = '80MR9934' OR formNum =
    '80MR9935' OR formNum = '80SHC100' OR formNum = '80SHC4301' OR
    formNum = '80SHC9830' OR formNum = '80SHC9832') ORDER BY
    tblForms.formNum, tblForms.formCustNum

    AWFrueh1808 wrote:
    > OK, that's simple enough. But then I'm really confused
    as to why the query in
    > my original post/example didn't work.
    >
    > The only single quotes in my #whereClause# variable were
    wrapped around each
    > varchar value in the WHERE clause (well, HAVING) as in
    HAVING formNum = '12345'
    > OR formNum = '54321'
    >
    > I never used a single quote within the value itself. And
    yet
    > preservesinglequotes fixed it. So what was CF doing? Why
    did the single
    > quotes still show up in the error msg - and in the right
    place?
    >
    As I said the default behavior is to escape the quotes in
    your variables
    as data. So the default output of your SQL statement, before
    preserveSingleQuotes() would be like this.
    HAVING formNum = ''12345'' OR formNum = ''54321''
    As you can see that is not the desired results in your case.
    In your
    case you have the proper number of single quotes in your
    string and you
    do not want any added. You want to preserve them so to say.
    Thus
    adding preserveSingleQuotes() around your whereClase
    variable, i.e.
    preserveSingleQuotes(whereClause) says do not add any quotes,
    keep them
    all single.

  • Function module for calculating next day's date

    Dear all,
    We have a requirement of displaying transaction validity date on SAP smart form. The date input is available from the transaction.
    We need to add 1 day to this to get correct date printed in the output. We applied the logic of 'input date +1', but this logic does not give correct output when the final date co-incides with change in month (i.e 1st of next month).
    Is there any function module available which would do the addition in proper date format and calculate next day's date correctly?
    Regards,
    DS

    Use FM RP_CALC_DATE_IN_INTERVAL
    Example :
    data: v_curr type sy-datum,
    v_next type sy-datum.
    v_curr = '20080415'.
    CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
    EXPORTING
    DATE = v_curr
    DAYS = '01'
    MONTHS = '0'
    SIGNUM = '+'
    YEARS = 0
    IMPORTING
    CALC_DATE = v_next.
    write:/5 'Current date', v_curr.
    write:/5 'Future date', v_next.

Maybe you are looking for

  • Issue with trigger, multi-table insert and error logging

    I find that if I try to perform a multi-table insert with error logging on a table that has a trigger, then some constraint violations result in an exception being raised as well as logged: <pre> SQL> select * from v$version; BANNER Oracle Database 1

  • Create standby using incremental backup

    can I create standby database using a backup of primary which was created using below command? ( incremental backup level 0) BACKUP INCREMENTAL LEVEL 0 AS COMPRESSED BACKUPSET DATABASE TAG 'mybackup_date' PLUS ARCHIVELOG DELETE INPUT; v11.2.0.2 physi

  • Using Numbers  to create spreadsheet.

    Using Numbers 08 to create spredsheet. Need it to divide Cost by usage to get unit cost. It then gets calculation wrong. ie. divides 211.43 by 1467 and gives answer of 0.6666666 recuring Answer should be 0.144124 Help Please.

  • WLI 6.1 SP4 with WLI 2.1 SP2

    We would like to install Weblogic 6.1 SP4 with Weblogic Process Integration 2.1 SP2 and we have read on the papers of WLI 2.1 SP2, that it supports WLS 6.1 SP3. Is it possible to install WLI 2.1 SP2 with WLS 6.1 SP4? If the answer is "yes", please le

  • Regarding quantity variations in po

    Hi, when we create the PO for 181.904 units but it takes 181 units. how can we configure for to take 181.904 units.