View previous topic :: View next topic |
Author |
Message |
suma Beginner
Joined: 23 Jan 2006 Posts: 65 Topics: 29
|
Posted: Fri Apr 13, 2007 6:29 am Post subject: SQLCODE when using COUNT(*) for a Table |
|
|
Hi all,
I have query as shown below....
SELECT COUNT (*)
FROM TABLE1
WHERE COL1 = '123';
Does anybody know what will be SQLCODE for this query if COUNT = 3.
And when SQLCODE will be 0 for the above query...
Thanks
Suma |
|
Back to top |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Fri Apr 13, 2007 6:52 am Post subject: |
|
|
Is that using Spufi or in a program? _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
 |
suma Beginner
Joined: 23 Jan 2006 Posts: 65 Topics: 29
|
Posted: Fri Apr 13, 2007 6:53 am Post subject: |
|
|
I am using it in a COBOL program.....In SPUFI I am getting SQLCODE as 100 |
|
Back to top |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Fri Apr 13, 2007 6:54 am Post subject: |
|
|
yes - in spufi you will get +100 but in your program you SHOULD get 000 _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
 |
Mickeyd Beginner
Joined: 02 Jan 2003 Posts: 27 Topics: 0
|
Posted: Mon Apr 16, 2007 12:44 pm Post subject: |
|
|
In COBOL for the count you will get a zero, you have to check the count field
in order to determine if you have any data that matched your count query. |
|
Back to top |
|
 |
|
|