View previous topic :: View next topic |
Author |
Message |
vani Beginner
Joined: 28 May 2003 Posts: 51 Topics: 30
|
Posted: Thu Dec 04, 2003 12:11 pm Post subject: Select Count(*) |
|
|
Hi,
This is something inique problem. We did a database migration ,
the steps used were, DDLs generation, then getting all the DBIDs, OBIDs and all and then then generated DSN1COPY, after which Rebuild index was run.
All went through fine,
But if we make a SELECT (*) on that table we get 0 rows, but if we make SELECT * then all the data is dispalyed, have tried everyhting, running runstats, unloading and loading data. but still the row count is the same.
Any suggestions!!!!! |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Dec 04, 2003 1:38 pm Post subject: |
|
|
Vani,
How is the SELECT COUNT(*) being execueted? Is it via SPUFI/QMF or a program? If it is spufi or qmf make sure that you are pointing to the right DB2 region. you can check if there are any tables existing with the same name.
Code: |
SELECT *
FROM SYSIBM.SYSTABLES
WHERE NAME = 'TABLE NAME'
|
Now you will get all the tables/views with the same name.Alternatively did you run your query with DSNSTEP2?
Hope this helps...
cheers
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
vani Beginner
Joined: 28 May 2003 Posts: 51 Topics: 30
|
Posted: Thu Dec 04, 2003 10:57 pm Post subject: |
|
|
I am executing it to batch Spufi using DSNTEP2 only, and the DB2 region name is the same. i have cross checked it. |
|
Back to top |
|
 |
SureshKumar Intermediate
Joined: 23 Jan 2003 Posts: 211 Topics: 21
|
Posted: Fri Dec 05, 2003 8:37 am Post subject: |
|
|
Vani, Are you using SELECT COUNT (*) or just SELECT (*) , just in case its a syntax issue.. |
|
Back to top |
|
 |
Shaik Salauddin Beginner
Joined: 16 Dec 2003 Posts: 3 Topics: 0
|
Posted: Fri Dec 19, 2003 8:55 am Post subject: |
|
|
Can you please check the value for the column name as CARD in SYSIBM.SYSTABLES and SYSINDEXPART for the table name. If the runstats have run fine it would have updated with proper statistics. Otherwise it will have -1 in them. This is just to confirm whether the statistics have updated properly or not. But irrespective of the value in the card, if we use a count(*) it will result the number of rows.
Hope this may be of littile help...
Thanks,
Shaik |
|
Back to top |
|
 |
|
|