Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2010
    Posts
    40

    Unanswered: help with SQL0153N

    Hi all,

    I have a query that is running in prod and gathers data in 20 minutes. This is a sequel with joins many tables. There is a requirement to join another table to add more filters. I am trying to see if I can create a temp view with the existing sequel and join the new table for the new filter criteria. The existing query runs fine by itself but as soon as I join the new table it throws me an error
    SQL0153N The statement does not include a required column list.
    SQLSTATE=42908.


    I have tried to add the columns in the second select, did a simple select * and also tried selecting the set of columns in the beginning of select statement .Attached are both my queries

    PS - we are running db2 v9.5.0.8

    Thanks

    Smriti
    Attached Files Attached Files

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    I can't be bothered to open files that can carry viruses, but does you "temp view" contain "select * ..." by chance?
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Nov 2011
    Posts
    334
    You can debug it in tow phases:
    1, Is there any errors when running the query "select process_id from tabA where premium_id <> 10345"
    1, is there any errors when running the query with as temp (xxxxx) select * from temp. and check the column list to see whether there is a column called process id.

  4. #4
    Join Date
    Nov 2010
    Posts
    40
    Quote Originally Posted by fengsun2 View Post
    You can debug it in tow phases:
    1, Is there any errors when running the query "select process_id from tabA where premium_id <> 10345".
    No there is no error when i run this query by itself.

    1, is there any errors when running the query with as temp (xxxxx) select * from temp. and check the column list to see whether there is a column called process id.
    yes when running the query with as clause I get this error
    SQL0153N The statement does not include a required column list.
    SQLSTATE=42908

    thanks

    smriti

  5. #5
    Join Date
    Nov 2010
    Posts
    40
    sorry it didnot post the whole reply
    [QUOTE=fengsun2;6572438]You can debug it in tow phases:
    1, Is there any errors when running the query "select process_id from tabA where premium_id <> 10345".
    No there is no error when i run this query by itself.

  6. #6
    Join Date
    Nov 2011
    Posts
    334
    Maybe the problem is because of the isolation clause :"with ur"
    plz put the "with ur" to the end of the statement and try again.....

Posting Permissions

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