Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2007
    Posts
    197

    Smile Unanswered: Migrating from MySQL

    Table structure is

    CREATE TABLE adbanner_master (
    adBanner_id NUMBER NOT NULL PRIMARY KEY,
    adBanner_name varchar2(128) NOT NULL UNIQUE,
    adBanner_image VARCHAR2(1024),
    mouse_over_image VARCHAR2(1024),
    adbanner_desc VARCHAR2(1024),
    adbanner_link varchar2(128) default NULL,
    isactive varchar2(1) default NULL,
    createdby varchar2(128) NOT NULL,
    createdate date NOT NULL,
    modifiedby varchar2(128) default NULL,
    modifieddate date default NULL,
    hit_count NUMBER default NULL,
    end_date date default NULL,
    start_date date default NULL,
    start_ddate date default NULL
    ) ;


    But when i want to insert

    INSERT INTO adbanner_master VALUES ('5', 'chakedeindia', '<img height=\"142\" width=\"93\" alt=\"\" src=\"/cms/admin/userfiles/Image/images.jpg\" />&nbsp;', NULL, 'chakdeindia', 'http://www.window2india.com', 'Y', 'devi', '2007-07-03', 'devi', '2007-09-07', '4', '2007-09-29', '2007-08-02', '2007-09-07');

    This is error i m getting

    ORA-01861: literal does not match format string

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    With Oracle characters between single quote marks are strings.
    'This is a string, 2008-09-15, not a date'
    use TO_DATE() function when you want a date datatype.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Or use the ISO date literal format:

    DATE '2007-09-07'

  4. #4
    Join Date
    Jun 2007
    Posts
    197

    Smile

    I have taken VARCHAR2(1024) for oracle in place of TEXT data type in MySQL
    Is sufficient or somthing else data type will work

  5. #5
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    VARCHAR2 is the stanard Oracle datatype for text strings - it can go up to 4000 characters, i.e. VARCHAR2(4000). For larger amounts of text, CLOB is used.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •