Re: Query for Summary Table

2005-08-23 Thread Debbie Bassler
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 <[EMAIL PROTECTED]>
Sent by: "ADSM: Dist Stor Manager" 
08/23/2005 02:11 PM
Please respond to "ADSM: Dist Stor Manager"


To: ADSM-L@VM.MARIST.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/[EMAIL PROTECTED]
Internet e-mail: [EMAIL PROTECTED]

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"  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


Re: Query for Summary Table

2005-08-23 Thread Andrew Raibeck
>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

Before someone catches me out... yes, the last example is an inadvertent
duplicate of the second example.   :-)

Andy Raibeck
IBM Software Group
Tivoli Storage Manager Client Development
Internal Notes e-mail: Andrew Raibeck/Tucson/[EMAIL PROTECTED]
Internet e-mail: [EMAIL PROTECTED]

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"  wrote on 2005-08-23
11:11:49:

> 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/[EMAIL PROTECTED]
> Internet e-mail: [EMAIL PROTECTED]
>
> 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"  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


Re: Query for Summary Table

2005-08-23 Thread Prather, Wanda
It's not the operator -
what the message is telling you is that "bytes" is a decimal number, not
a character field.
So you need to write the zero as a number, not a 'char' 

  select * from summary where bytes <> 0

The best ref  I found is the TSM Version 5.1 Technical Guide Redbook,
Appendix A.
Go to www.redbooks.ibm.com, search on SG24-6554, download the PDF.

VERY helpful.

Wanda Prather
"I/O, I/O, It's all about I/O"  -(me)



-Original Message-
From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On Behalf Of
Debbie Bassler
Sent: Tuesday, August 23, 2005 2:01 PM
To: ADSM-L@VM.MARIST.EDU
Subject: Query for Summary Table


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


Re: Query for Summary Table

2005-08-23 Thread Andrew Raibeck
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/[EMAIL PROTECTED]
Internet e-mail: [EMAIL PROTECTED]

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"  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


Query for Summary Table

2005-08-23 Thread Debbie Bassler
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