PDO bindParam and TO_DATE conversion

I am using Oracle XE, and I am trying to insert data into a table having a blob column, I am however having problems with the date column.
The date to be inserted has to be converted to a format oracle understands, how do I do this with bindParam. Here is what I am doing (in PHP) :
$entryDate = 'August 05, 2008';
$imageInfo = getimagesize($passportFile);
$date_created = null;
$type = null;
$passportBinary = null;
$stmt = $PDO->prepare("INSERT INTO blobtest (date_created, type, binary) VALUES(:date_created, :type, EMPTY_BLOB()) RETURNING binary INTO :binary");
$stmt->bindParam(':type', $type);
$stmt->bindParam(':date_created', $date_created);
$stmt->bindParam(':binary', $passportBinary, PDO::PARAM_LOB);
$date_created = "TO DATE('$entryDate', 'MONTH DD, YYY')";
$type = $imageInfo['mime'];
$passportBinary = fopen($passportFile, 'rb');
$stmt->execute();
Is there a better way around it ??

I could be wrong but I would expect the to_date function to be part of your hard coded SQL as opposed to your bind variable.
i.e. Something like the below (not sure about the quoting):
$stmt = $PDO->prepare("INSERT INTO blobtest (date_created, type, binary) VALUES(to_date(:date_created,'MONTH DD, YYYY'), :type, EMPTY_BLOB()) RETURNING binary INTO :binary");
$date_created = "'$entryDate')";

Similar Messages

  • A view, function and TO_DATE causing an error.

    I have the following statement which calls a view, VW_DIST_RPT_WORK_LIST which in turn calls a function which returns either 'Null' or a date string e.g. '07 Oct 2003' as a VARCHAR2 (alias PROJECTED_DELIVERY_DATE).
    Statement:
    SELECT CUSTOMER_NAME, PROTOCOL_REFERENCE, SHIPPING_REFERENCE, CUSTOMER_REFERENCE, COUNTRY, PROJECTED_DELIVERY_DATE, STATUS, NOTES,
    TO_DATE(PROJECTED_DELIVERY_DATE)
    FROM VW_DIST_RPT_WORK_LIST
    WHERE EXPECTED_DESP_DT IS NOT NULL
    AND UPPER(PROJECTED_DELIVERY_DATE) NOT LIKE('NULL%')
    AND EXPECTED_DESP_DT <= TO_DATE('07/10/2003', 'DD/MM/YYYY')
    AND TO_DATE(PROJECTED_DELIVERY_DATE) <= TO_DATE('31/12/2003', 'DD/MM/YYYY') --< Problem here
    I need to be able to specify a date filter on the PROJECTED_DELIVERY_DATE field and hence used the TO_DATE(PROJECTED_DELIVERY_DATE) <= TO_DATE('31/12/2003', 'DD/MM/YYYY') but this is generating an ORA-01858: a non-numeric character was found where a numeric character was expected.
    I think the problem lies with the fact that this field can contain 'Null' which cannot be converted to a date using TO_DATE. I've tried adding a NOT LIKE ('NULL%') statement to catch any nulls which may be creeping in bu this doesn't solve the problem.
    I've added TO_DATE(PROJECTED_DELIVERY_DATE) to the select above to determine if the nulls are being caught and if the TO_DATE in performing the conversion correctly which it is on both counts.
    Any ideas anyone ?

    The answer provided above by Monika will work for this situation. However, you should seriously think whether you should be using a string for date datatype. Ideally, you should rewrite the function that returns PROJECTED_DELIVERY_DATE and change the return type to DATE. The least you should do is to return NULL (instead of the string 'NULL') from the function. Oracle handles nulls perfectly, there is no reason you should write code to handle nulls;
    One more thing. Looking at the type of error you are receiving, it seems that you are using rule based optimizer. Why do I think so? Because, in rule based optimizer, the conditions are evaluated in a specific order (viz, bottoms-up for AND clauses). To show this, look at the following simple demonstration. I did this in Oracle 8.1.6 (also in 9.2.0.4.0 on Windows).
    -- Check the database version
    select * from v$version;
    BANNER
    Oracle8i Enterprise Edition Release 8.1.6.1.0 - Production
    PL/SQL Release 8.1.6.1.0 - Production
    CORE 8.1.6.0.0 Production
    TNS for Solaris: Version 8.1.6.0.0 - Production
    NLSRTL Version 3.4.0.0.0 - Production
    -- Create the test table
    create table test (a number(2));
    insert into test(a) values (0);
    insert into test(a) values (1);
    insert into test(a) values (2);
    insert into test(a) values (3);
    insert into test(a) values (4);
    insert into test(a) values (5);
    insert into test(a) values (6);
    insert into test(a) values (7);
    commit;
    -- See that I have not analyzed the table. This will make use of RULE based optimizer
    select * from test
    where a > 0
    and 1/a < .25;
    and 1/a < .25
    ERROR at line 3:
    ORA-01476: divisor is equal to zero
    -- Look at the query clause. Even though I specifically asked for records where a is positive
    -- the evaluation path of rule based optimizer started at the bottom and as it evaluated the
    -- first row with a=0, and caused an error.
    -- Now look at the query below. I just re-arranged the conditions so that a > 0 is evaluated
    -- first. As a result, the row with a=0 is ignored and the query executes without any problem.
    select * from test
    where 1/a < .25
    and a > 0;
    A
    5
    6
    7
    -- Now I analyze the table to create statistics. This will make the query use the
    -- cost based optimizer (since optimizer goal is set to CHOOSE)
    analyze table test compute statistics;
    Table analyzed.
    -- Now I issue the erring query. See it executes without any problem. This indicates that
    -- the cost based optimizer was intelligent enough to evaluate the proper path instead of
    -- looking only at the syntax.
    select * from test
    where a > 0
    and 1/a < .25;
    A
    5
    6
    7
    Does the above example seem familiar to your case? Even though you had the AND UPPER(PROJECTED_DELIVERY_DATE) NOT LIKE('NULL%') in your query, a record with PROJECTED_DELIVERY_DATE = 'NULL' was evaluated first and that caused the error.
    Summary
    1. Use dates for dates and strings for strings
    2. Use cost based optimizer
    Thanks
    Suman

  • PLSQL and to_date query returning error...

    I'm sure this has something to do with a conversion which I'm not understanding however :
    Metric_date field is a DATE type field in the database.
    DECLARE
    disknum NUMBER;
    diskcost NUMBER;
    fystart VARCHAR(20):='01-JUN-'||(:FINANCE_FY-1);
    fyend VARCHAR(20):='31-MAY-'||:FINANCE_FY;
    BEGIN
    select metric_value into disknum from
       (SELECT metric_value from core_metrics where metric_subname='TIER_1_DISK_NUMBER' and metric_date between to_date(fystart,'DD-MON-YYYY') and to_date(fyend,'DD-MON-YYYY')  order by metric_date DESC)
    where rownum=1;
    select metric_value into diskcost from
    (SELECT metric_value from core_metrics where metric_subname='TIER_1_COST_PER_DISK' and metric_date between to_date(fystart,'DD-MON-YYYY') and to_date(fyend,'DD-MON-YYYY') order by metric_date DESC)
    where rownum=1;
    RETURN to_char((disknum*diskcost)/5,'$999,999,999');
    END;When executed I get
    Error computing item source value for page item P17_VMAX_TIER1_DISK_COST_SUM.
    ORA-01840: input value not long enough for date format
    Technical Info (only visible for developers)
    is_internal_error: true
    apex_error_code: WWV_FLOW_FORMS.ITEM_SOURCE_ERR
    ora_sqlcode: -1840
    ora_sqlerrm: ORA-01840: input value not long enough for date format
    component.type: APEX_APPLICATION_PAGE_ITEMS
    component.id: 14284527609957008
    component.name: P17_VMAX_TIER1_DISK_COST_SUM
    error_backtrace:
    ORA-06512: at line 8
    ORA-06512: at line 19
    ORA-06512: at "SYS.DBMS_SYS_SQL", line 1926
    ORA-06512: at "SYS.WWV_DBMS_SQL", line 966
    ORA-06512: at "SYS.WWV_DBMS_SQL", line 992
    ORA-06512: at "APEX_040100.WWV_FLOW_DYNAMIC_EXEC", line 503
    ORA-06512: at "APEX_040100.WWV_FLOW_FORMS", line 611Edited by: bostonmacosx on Mar 28, 2013 2:42 PM

    Thanks for all the help and I'm close to getting this nailed down:
    DECLARE
    defnumber NUMBER:=0;
    disknum NUMBER;
    diskcost NUMBER;
    fystart VARCHAR(20):='01-JUN-'||(:FINANCE_FY-1);
    fyend VARCHAR(20):='31-MAY-'||:FINANCE_FY;
    BEGIN
    if :FINANCE_FY is NULL THEN
    return 'hello';
    end if;
    select metric_value into disknum from
       (SELECT metric_value from core_metrics where metric_subname='TIER_1_DISK_NUMBER' and metric_date between to_date(fystart,'DD-MON-YYYY') and to_date(fyend,'DD-MON-YYYY')  order by metric_date DESC)
    where rownum=1;
    select metric_value into diskcost from
    (SELECT metric_value from core_metrics where metric_subname='TIER_1_COST_PER_DISK' and metric_date between to_date(fystart,'DD-MON-YYYY') and to_date(fyend,'DD-MON-YYYY') order by metric_date DESC)
    where rownum=1;
    RETURN to_char((disknum*diskcost)/5,'$999,999,999');
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
        return disknum;
    END; What I am running into though is that I want to return some text if :Finance_FY is not set to let the user know what is happening. However the RETURN is not allowing me to return anything except one of my variables....in fact I can't even RETURN defnumber.
    I thought I could return a string or a number.
    The above is a function for a Page Item of type "Display Only"
    The error I get is
    Error computing item source value for page item P17_VMAX_OTHER_THAN_DISK.
    ORA-06502: PL/SQL: numeric or value error
    Technical Info (only visible for developers)
    is_internal_error: true
    apex_error_code: WWV_FLOW_FORMS.ITEM_SOURCE_ERR
    ora_sqlcode: -6502
    ora_sqlerrm: ORA-06502: PL/SQL: numeric or value error
    component.type: APEX_APPLICATION_PAGE_ITEMS
    component.id: 14298319812267057
    component.name: P17_VMAX_OTHER_THAN_DISK
    error_backtrace:
    ORA-06512: at line 3
    ORA-06512: at line 7
    ORA-06512: at "SYS.DBMS_SYS_SQL", line 1926
    ORA-06512: at "SYS.WWV_DBMS_SQL", line 966
    ORA-06512: at "SYS.WWV_DBMS_SQL", line 992
    ORA-06512: at "APEX_040100.WWV_FLOW_DYNAMIC_EXEC", line 503
    ORA-06512: at "APEX_040100.WWV_FLOW_FORMS", line 611

  • Combined Upgrade and Unicode conversion of Sap 4.6C to ECC6.0

    Hello all,
    my project team intends to carry out a combined upgrade and unicode conversion of an SAP ERP 4.6C system with MDMP to ECC6.0 (no enhancement package). The system is running on Oracle 10.2.
    In preparation for this upgrade, I have gone through the SAP notes 928729, 54801.
    We need to get a rough estimate of the entire downtime so as to alert our end users. From the CU&UC documentation in 928729, I read up note 857081. However the program in this note cannot be used to estimate the downtime as my system is < SAP netweaver 6.20.
    Is there any other SAP note or tool or program that I can use to estimate the downtime for the entire CU&UC? Thanks a lot!

    Hi,
    Combined upgrade depend upon number of factors like database size, resources on the server and optimization. In order to get idea of how much downtime, it will take, I would suggest you to do combined upgrade and unicode conversion on sandbox system which should be the replica of your production system. And try to optimize it. From there you can get approx. downtime required.
    Also, please read combined upgrade and unicode conversion guides on  http://service.sap.com/unicode@sap
    Thanks
    Sunny

  • What is the difference between TO_CHAR and TO_DATE()?

    Hi everybody,
    i am facing a problem in my system.It is quite urgent, can you explain me "What is the difference between TO_CHAR and TO_DATE()?".
    According to user's requirement, they need to generate a code with format "YYMRRR".
    YY = year of current year
    M = month of current month (IF M >=10 'A' ,M >=11 'B' , M >=10 'C')
    RRR = sequence number
    Example: we have table USER(USER_ID , USER_NAME , USER_CODE)
    EX: SYSDATE = "05-29-2012" MM-DD-YYYY
    IF 10
    ROW USER_ID , USER_NAME , USER_CODE
    1- UID01 , AAAAA , 125001
    2- UID02 , AAAAA , 125002
    10- UID010 , AAAAA , 12A010
    This is the original Script code. But This script runs very well at my Local. Right format. But it just happens wrong format on production.
    12A010 (Right) => 11C010 (Wrong).
    SELECT TO_CHAR(SYSDATE, 'YY') || DECODE( TO_CHAR(SYSDATE, 'MM'),'01','1', '02','2', '03','3', '04','4', '05','5', '06','6', '07','7', '08','8','09','9', '10','A', '11','B', '12','C') ||     NVL(SUBSTR(MAX(USER_CODE), 4, 3), '000') USER_CODE FROM TVC_VSL_SCH                                                       
         WHERE TO_CHAR(SYSDATE,'YY') = SUBSTR(USER_CODE,0,2)                         
         AND TO_CHAR(SYSDATE,'MM') = DECODE(SUBSTR(USER_CODE,3,1),'1','01',          
              '2','02', '3','03', '4','04', '5','05',          
              '6','06', '7','07', '8','08', '9','09',          
              'A','10', 'B','11', 'C','12')                    
    I want to know "What is the difference between TO_CHAR and TO_DATE()?".

    try to use following select
    with t as
    (select TO_CHAR(SYSDATE, 'YY') ||
             DECODE(TO_CHAR(SYSDATE, 'MM'),
                    '01', '1',
                    '02', '2',
                    '03', '3',
                    '04', '4',
                    '05', '5',
                    '06', '6',
                    '07', '7',
                    '08', '8',
                    '09', '9',
                    '10', 'A',
                    '11', 'B',
                    '12', 'C') as code
        from dual)
    SELECT t.code || NVL(SUBSTR(MAX(USER_CODE), 4, 3), '000') USER_CODE
      FROM TVC_VSL_SCH
    WHERE SUBSTR(USER_CODE, 1, 3) = t.codeand yes you need check time on your prodaction server
    good luck
    Edited by: Galbarad on May 29, 2012 3:56 AM

  • Subnodes and content conversion in FTP-Adapter

    Hello experts,
    the scenaria is IDOC -> XI -> FTP and content conversion is used.
    The structure of the IDOC is like:
    <head></head>
    <pos>
          <subnode></subnode>
    </pos>
    <pos>
           <subnode></subnode>
    </pos>
    There can be 1 ore more positions.
    We mapped this to a XML-structure according to help.sap.com
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm
    As we are not allowed to use subnodes all segments have to be on one level.
    How can I map to a structure (with 1 OR MORE positions) like
    <head></head>
    <pos></pos>
    <subnode></subnode>
    <pos></pos>
    <subnode></subnode>
    At the moment we are only able to map to:
    <head></head>
    <pos></pos>
    <pos></pos>
    <subnode></subnode>
    <subnode></subnode>
    In the datatype I can't specify that a position always is followed by a subnode ... i only can use remove context in mapping and put all subnodes beneath the positions. Is there any possibility in graphical mapping to change this?
    Thanks and regards,
    David

    Ok, what can I do, to describe a data typs with variable amount of pos' FOLLOWED by subnodes?
    Or is it possible to create an item line with pos and subnode and remove this line later (move everything to first level).
    <item>
        <pos>
        <subnode>
    </item>
    <item>
        <pos>
        <subnode>
    </item>
    <item>
        <pos>
        <subnode>
    </item>
    MAP TO:
    <pos>
    <subnode>
    <pos>
    <subnode>
    <pos>
    <subnode>
    I can't create a data type like this...
    EDIT:
    Remember, there can be documents with 1 or many positions... and the fieldname always is the same.... the datatype definition doesn't acceppt duplicate fieldnames and fields that are not in a defined sequence.
    Edited by: David Claes on Jul 10, 2008 2:09 PM
    Edited by: David Claes on Jul 10, 2008 2:11 PM

  • Bad performance due to the use of AGO and TO_DATE time series functions

    Hi all,
    I'm building an OBI EE Project on top of a 1TB DW, and i'm facing major performance problems due to the use of the AGO and TO_DATE time series functions in some of the Metrics included on the reports. I discovered that when a report with one of those metrics is submited to the DB, the resulting query/explain plan is just awful!... Apparently OBI EE is asking the DB to send everything it needs to do the calculations itself. The CPU cost goes to the roof!
    I've tried new indexes, updated statistics, MV's, but the result remains the same, i.e., if you happen to use AGO or TO_DATE in the report you'll get lousy query time...
    Please advise, if you have come across the same problem.
    Thanks in advance.

    Nico,
    Combining the solution to view the data in dense form (http://gerardnico.com/wiki/dat/obiee/bi_server/design/obiee_densification_design_preservation_dimension), and the use of the lag function (http://gerardnico.com/wiki/dat/obiee/presentation_service/obiee_period_to_period_lag_lead_function) appears to be the best solution for us.
    Thanks very much.

  • 4.7EEx1.10 to ECC6.0 upgrade and Unicode conversion

    Hi Experts,
    We are going to initiate the upgrade from next month onwards. Subsequently i have started preparing the plan and strategy for the same.
    As our current setup is 4.7EEx110/Win 2003 R2-64 bit/Oracle 10.2.0.4.0 (Non unicode). And we have recently migrated on to this setup from WIn2k 32 bit. Also the current hardware is Unicode compatible.
    With respect to strategy for achieving this Upgrade and Unicode conversion, i am planning as follows.
    Step 1) Perform Unicode conversion on the current landscape (Both Export/import on the same servers)
    Step 2) Setup Temporary landscape as part of Dual maintenance strategy and migrate data from the current systems to temporary systems using backup/restore method.
    Step 3) Perform the SAP version upgrade on the current landscape and setup transport routes from temporary to current landscape in order to keep it in sync
    Step 4) after successful upgrade, decommission the temporary landscape
    Please provide your suggestions and valuable advices if there is anything wrong with my strategy and execution plan.
    Regards,
    Dheeraj

    Hi,
    Thanks. As i have already referred these notes as i am seeking advise with respect to my upgrade approach.
    However i have planned to perform in the following manner.
    1) Refresh Sandbox with Prod data and perform Upgrade to ECC6.0 EHP5 & subsequently Unicode conversion on the same server (Since both export & Import has to perform on the same hardware as we have recently migrated on this hardware which is Unicode compatible)
    2) Setup temporary landscape for DEv & QAs and establish transport connection to Production system in order to move urgent changes
    3) Keep a track of the changes which have transported during upgrade phase so that the same can be implemented in the upgraded systems i.e. Dev & QAS
    4) After Sandbox Migration and signoff, we will perform Dev & QAS upgrade & unicode conversion on the same hardware (Note: Since these are running on VMware can we export the data from the upgraded system and import on to a new VM?)
    5) Plan for production cutover and Upgrade the Prod system to ECC6.0 Ehp5 and then Unicode conversion. As i am planning to perform upgrade over the weekend and then Unicode conversion activity in the next weekend (Is it a right way?)
    My Production setup: DB on one Physical host and CI on separate Virtual host
    6) After the stabilization phase, we are planning for OS & DB upgrade as follows:
          a) Windows upgrade from 2003 R2 to Windows 2008 R2
          b) Oracle Upgrade from 10.2 to 11.2
    If anyone thinks that there is anything wrong with my above approach and need changes then please revert.
    I have one more doubt as I am going to upgrade 4.7EEx110 (WAS 620, Basis SP64) to ECC6.0 EHp5.As I presume that I can straight away upgrade from the current version to ECC6.0 Ehp5 without installing EHP. Kindly confirm
    Thanks

  • I recently subscribed to Adobe ExportPDF and tried to convert a PDF file to MS Word.  So far,  after many tries,  I get soe type of error and the conversion fails.  Please advise?

    I recently subscribed to Adobe ExportPDF and tried to convert a PDF file to MS Word.  So far,  after many tries,  I get soe type of error and the conversion fails.  Please advise?

    Hi there,
    It sounds like there may be an issue with the quality of the PDF. Not all PDFs are created equal, and especially those created from scanned documents can be problematic if the scan quality isn't the best. Is there a dark background on the PDF, or stray marks or smudges?
    You can try converting with OCR disabled at outlined in this document: How to disable Optical Character Recognition (O... | Adobe Community. But, while that's a good test to find out where the problem lies, you'll end up with a Word document that isn't editable, so it's not an optimal solution.
    Please let us know how it goes.
    Best,
    Sara

  • Combined Upgrade and Unicode conversion question

    Hello Everyone,
    I will be performing combined Upgrade and Unicode conversion soon. Currently i have run Prepare and do not have any errors.
    I have already run SPUMG consistency check and i do not have any errors there. Since this is Combined Upgrade and unicode conversion according to guide i do not need to do the Nametab conversion right now. But now if i go this place:
    SPUMG -> Status -> Additional Information  , i see a status with red for Unicode nametabs are not consistent or not up-to-date.
    Please let me know if i can ignore this step and do the nametab conversion after upgrade is complete and before unicode conversion.
    Thanks,
    FBK

    Please follow the instructions from the guides.
    The Unicode nametabs will be generated automatically during the upgrade.
    An additional check is integrated into the final preparation steps in the target releases.
    Regards,
    Ronald

  • Cost and/or Conversion Rates are missing for some planning resources

    Hi,
    In Workplan of projects, we are facing a issue "Cost and/or Conversion Rates are missing for some planning resources". even though the schedules for the project WP is defined.
    Any inputs on this is highly apprciated. Thanks !!!
    Regards,
    Pallavi

    Did you check the Cost for all the Planned Workplan Budget Lines. Generally, this type of error comes when the Quantity is defined but the Cost is missing for any Line. Find that Planned Workplan Budget Lines and enter the Cost for them and save it.
    I hope it may help you.
    Regards,
    Khan.

  • Combined upgrade and Unicode conversion for ECC5 MDMP system

    Hello,
    We are planning to do Upgrade and Unicode conversion of ECC5 MDMP system to ECC6 EHP4 Unicode. We are adopting Combined upgrade and Unicode conversion strategy to minimise the downtime.
       In source version ECC5 we are in support pack level 6. Should we need to update the support pack to any target version to start with CU&UC or we can start with ECC5 with SP 6 itself.
    Since we cant afford more downtime for support pack update also, is it ok to start with upgrade and unicode conversion with current version.
    please advice.
    Regards
    Vinay

    Hello Vinay,
    please note that as a prerequisite the Basis SP should be accurate for an MDMP conversion.
    There is no MUST to have the latest Basis SP, but without you could have severe issues in SPUMG.
    On the application side, there are in most cases no hard requirements on the SP level.
    Best regards,
    Nils Buerckel
    SAP AG

  • Where is the Combined Upgrade and Unicode Conversion Guide

    Hi All
    Embarassing question time.
    I am after the Combined Upgrade and Unicode Conversion Guide for 4.7 to ERP 6.0, but can only find the Combined Upgrade and Unicode Conversion Guide for 46C to ERP 6.0.
    Can anyone advise where the 4.7 guide is.
    Thanks
    Sam

    Thank God SAP don't include it in the Install guide. The Install Guides are complex already. BTW if you need more info on unicode and its conversion go here
    https://service.sap.com/unicode@sap

  • To_date Conversion problem

    Hi,
    In the Below mentioned query the out put records corresponding to the between date is not correct.
    ie Some records between this date is not showing
    SELECT ALL AA.SALESREP_ID,max( TO_DATE(AA.Inv_Date,'DD/MM/YY')) as Inv_Date,
    MS.RESOURCE_NAME, sum(AA.INOICE_AMOUNT) as INV_Amount,
    sum(AA.COLLECTED_AMOUNT) as Collected_Amount
    FROM AMMI_SALES_COMMISSION_V AA , MMI_SALESREPS MS
    WHERE (AA.SALESREP_ID = MS.SALESREP_ID)
    group by AA.SALESREP_ID,MS.RESOURCE_NAME
    having max( to_date(AA.Inv_Date,'DD/MM/YY'))
    between TO_DATE('01/01/2010','DD/MM/YY') and TO_DATE('31/07/2010','DD/MM/YY')
    What is the reason for this? Any solution for this?
    I tried to_char function also.
    Note:
    In the AMMI_SALES_COMMISSION_V view the invoice date is converted in To_char format

    In the Below mentioned query the out put records corresponding to the between date is not correct.
    ie Some records between this date is not showing
    This smells like wrong input masks.
    Look at this:
    SQL> drop table t1;
    Table dropped.
    SQL> create table t1 (id1 number, date1 date);
    Table created.
    SQL> insert into t1 values (1, sysdate);
    1 row created.
    SQL> insert into t1 values (2, to_date('23.08.10', 'dd.mm.yy'));
    1 row created.
    SQL> insert into t1 values (3, to_date('23.08.10', 'dd.mm.rr'));
    1 row created.
    SQL> insert into t1 values (4, to_date('23.08.2010', 'dd.mm.yy'));
    1 row created.
    SQL> insert into t1 values (5, to_date('23.08.2010', 'dd.mm.yyyy'));
    1 row created.
    SQL> insert into t1 values (6, to_date('23.08.10', 'dd.mm.yyyy'));
    1 row created.Now we have 6 records there.
    SQL> select count(*) from t1;
      COUNT(*)
             6and with an similar query like yours you would also expect 6 records, but only *5* will show up:
    SQL> select count(*) from t1 where date1 between to_date('01.08.10', 'dd.mm.yy') and to_date('31.08.10', 'dd.mm.yy');
      COUNT(*)
             5only when you look at the original records in the table, you can see, how this could happen:
    SQL> select * from t1;
           ID1 DATE1
             1 23.08.2010
             2 23.08.2010
             3 23.08.2010
             4 23.08.2010
             5 23.08.2010
             6 23.08.0010
    6 rows selected.
    SQL> You see record #6? This date is not in 2010 but in 0010.
    I guess, you have also some dates of this type in your table.

  • What is automatic and manual conversion?

    Hi gurus,
    I am pretty new on this and would like to know as a functional consultant what is automatic and manual conversion. How do you do it?
    Thanks a bunch,
    JEss.

    Hi,
    Conversion is converting the legacy data from your old system to SAP system.  This can be done through SAP provided tools like LSMW (Legacy system migration workbench) and through BDC (Batch data conversion).  This would be called as automatic conversion.  In both the tools you first have to record the transaction for which you want to convert the data and then provide the data in excel or txt format.
    The Tcode for LSMW is LSMW and for BDC is SHDB.
    Manual conversion is actually keying in the data in the respective transactions.
    Shrikant

Maybe you are looking for

  • I would like to download and install Photoshop CS6 for Mac

    I bought last year Photoshop CS6, and up to now I used it on windows system. Now I chaged system to mac, and I would like to download product Adobe Photoshop CS6, for mac - but when I try, I get offer for creative cloud membership for one year insted

  • Upgrade da Windows a Mac

    Ho comprato un computer iBook Mac. Sto lasciando Windows per andare su Mac. ho comprato tempo fa un Acrobat 6 e poi ho fatto l'upgrade a 9 sempre per windows. posso adesso comprare l'upgrade acrobat XI Standard per mac utilizzando il codice di quello

  • Horizontal scrolling with mouse wheel?

    I have built a website for a client that scrolls only horizontally. Is it possible to scroll with the mouse wheel horizontally? Is there certain HTML I need to add? Thank you

  • Questions about os 5.0.0.484

    Just updated to os v5.0.0.484 and it has threaded messages but is there a way to stop it from linking some contacts in bb messenger and also opening the sms in messenger? It also now does not show sms short preview on home screen from some of the the

  • Pro's & Con's of using auto channel and power

    I have a network with over 50 AP's on one floor. I have let the WiSM blade automatically set the channel and power of each AP. I am finding that the coverage cells are way overlapped and AP's with the same channel are to close to each other. Would I