ADSM-L

Re: Query for Summary Table

2005-08-23 15:27:15
Subject: Re: Query for Summary Table
From: Debbie Bassler <Deborah_Bassler AT PAPAJOHNS DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Tue, 23 Aug 2005 15:25:47 -0400
I did see the decimal field, with a (p,s) of (18,0).  However, I didn't
realize the quotes were not needed,,,,,,,

I'll also check out the redbook that Wanda suggested,,,,

Thanks to all,
Debbie





Andrew Raibeck <storman AT US.IBM DOT COM>
Sent by: "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
08/23/2005 02:11 PM
Please respond to "ADSM: Dist Stor Manager"


        To:     ADSM-L AT VM.MARIST DOT EDU
        cc:
        Subject:        Re: [ADSM-L] Query for Summary Table


Debbie, if you examine the attributes of the BYTES column from the COLUMNS
table:

select * from columns where tabname='SUMMARY' and colname='BYTES'

you will see that BYTES is a decimal field. So the single quotes are not
necessary, and your syntax should otherwise work. These all do the same
thing:

select * from summary where bytes != 0
select * from summary where bytes <> 0
select * from summary where not bytes = 0
select * from summary where not bytes == 0
select * from summary where bytes <> 0

Regards,

Andy

Andy Raibeck
IBM Software Group
Tivoli Storage Manager Client Development
Internal Notes e-mail: Andrew Raibeck/Tucson/IBM@IBMUS
Internet e-mail: storman AT us.ibm DOT com

The only dumb question is the one that goes unasked.
The command line is your friend.
"Good enough" is the enemy of excellence.

"ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU> wrote on 2005-08-23
11:00:39:

> I'm trying to query the summary table, but, I don't want any information
> for schedules with 0 bytes. I've tried <>, !=, and ^=. None of these
work.
> This is the error I receive:
>
> ANR2916E The SQL data types DECIMAL(18,0) and CHAR(1) are incompatible
for
> operator '<>'.
>
>                                            |
>          ..................................V.....
>          select * from summary where bytes <> '0'
>
>
> Does anyone know what operator I need to use? Also, any idea where can I
> find information on querying database tables?
>
> Thanks in advance,,,,
> Debbie

<Prev in Thread] Current Thread [Next in Thread>