very very urgent
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: very very urgent

  1. #1
    Join Date
    Sep 2000
    Posts
    305
    HI
    I have one table of soo many login_ids there are thousands of login_id in that table and I have one another table in which there are very few login_id now when I am runiing one query in which I want all result from first table as well as the id should not be in second table but it is giving me the problem it is giving me 0 which is not posible.

    What could be the problem please help me this is very urgent.
    thanks in Advance

  2. #2
    Join Date
    Apr 2001
    Location
    Czechia
    Posts
    712
    Post the query, please.
    Ales
    The whole difference between a little boy and an adult man is the price of toys

  3. #3
    Join Date
    Sep 2000
    Posts
    305
    select login_id,tim
    from play_game
    where trunc(game_date) < trunc(sysdate-3)
    and GAME_ID=24 and login_id not in (select login_id from himalaya3_epromo_winners)

    I m also sending the tables
    play_game
    PLAY_ID NUMBER(6)
    LOGIN_ID VARCHAR2(50)
    GAME_DATE DATE
    GAME_ID NUMBER
    POINTS NUMBER
    TIM NUMBER(4)

    himalaya3_epromo_winners

    WIN_ID NUMBER
    LOGIN_ID VARCHAR2(50)
    WIN_WEEK NUMBER
    WIN_DATE DATE

  4. #4
    Join Date
    Apr 2001
    Location
    Czechia
    Posts
    712
    I don't see anything wrong with that.
    Try to execute the queries separately, the problem could be in the conditions for game_date or game_id.
    What's the result of following queries?
    Code:
    select DISTINCT login_id from himalaya3_epromo_winners
    Code:
    select login_id,tim 
    from play_game 
    where trunc(game_date) < trunc(sysdate-3) 
    and GAME_ID=24
    You can also test the sets of login_ids:
    Code:
    select count(*) from
    (
      select distinct login_id from play_game
      minus
      select distinct login_id from himalaya3_epromo_winners
    )
    If all looks good and the whole query does not yield records then the conditions simply are not satisfied.
    Ales
    The whole difference between a little boy and an adult man is the price of toys

Posting Permissions

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



Click Here to Expand Forum to Full Width