Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Posts
    22

    Smile Unanswered: Query - Unable to fetch data

    Hi,
    I am facing a unique issue in querying.

    The primary key is application generated 21 digit number key. When I try to query by the primary key, then then no data is fetched.

    EG: Query which WORKS:
    1. Select * from address where state = 'SC';



    EG: Query which does NOT work.
    2. Select * from address where addresskey=2.0040420221632E19
    OR
    Select * from address where addresskey=20040420221632000000

    (NOTE that the key seleted is one of keys that are fetched during the query#1 run)

    What could be happening?

    Thanks and Regards.,
    Aravind

  2. #2
    Join Date
    Jan 2004
    Location
    North Haven, CT
    Posts
    110

    Re: Query - Unable to fetch data

    20040420221632000000 is only 20 digits. you might have missed
    the last digit when you display it.

    Originally posted by aravindvin
    Hi,
    I am facing a unique issue in querying.

    The primary key is application generated 21 digit number key. When I try to query by the primary key, then then no data is fetched.

    EG: Query which WORKS:
    1. Select * from address where state = 'SC';



    EG: Query which does NOT work.
    2. Select * from address where addresskey=2.0040420221632E19
    OR
    Select * from address where addresskey=20040420221632000000

    (NOTE that the key seleted is one of keys that are fetched during the query#1 run)

    What could be happening?

    Thanks and Regards.,
    Aravind

  3. #3
    Join Date
    Feb 2004
    Posts
    22

    Re: Query - Unable to fetch data

    Actually No..

    it is the correct key which i am copying from TOAD.

    Also this number is generated in application as big decimal and stored in oracel as number (21,1)

    Any ideas ?

  4. #4
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Just an idea ... you said that this field is a number of (21,1) which means it is 21 digits long, and the last of them is a decimal. That would make something like "12345678901234567890.1".
    Before you execute a select statement, try to set a column format, such as:
    PHP Code:
    COLUMN addresskey FORMAT 99,999,999,999,999,999,990.0

    SELECT addresskey FROM address WHERE state 
    'SC'
    Perhaps now you'll see the missing digit and second query will fetch some data ...

Posting Permissions

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