ADSM-L

Re: [ADSM-L] Antwort: [ADSM-L] SQL error

2013-03-12 07:24:31
Subject: Re: [ADSM-L] Antwort: [ADSM-L] SQL error
From: Andrew Raibeck <storman AT US.IBM DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Tue, 12 Mar 2013 07:20:28 -0400
I actually like this solution even more than the one I gave a moment ago!
One comment: I suggest "cast(type as char(50))" instead of just "cast(type
as char)", do avoid a truncation warning.

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

IBM Tivoli Storage Manager support pages:
http://www.ibm.com/support/entry/portal/Overview/Software/Tivoli/Tivoli_Storage_Manager

http://www.ibm.com/developerworks/wikis/display/tivolidoccentral/Tivoli
+Storage+Manager
https://www.ibm.com/developerworks/mydeveloperworks/wikis/home/wiki/Tivoli
+Storage+Manager/page/Home

"ADSM: Dist Stor Manager" <ADSM-L AT vm.marist DOT edu> wrote on 2013-03-12
07:12:43:

> From: Rick Harderwijk <rick.harderwijk AT GMAIL DOT COM>
> To: ADSM-L AT vm.marist DOT edu,
> Date: 2013-03-12 07:13
> Subject: Re: Antwort: [ADSM-L] SQL error
> Sent by: "ADSM: Dist Stor Manager" <ADSM-L AT vm.marist DOT edu>
>
> Eric,
>
> How about
>
> select * from backups where node_name='KL127EAC' and cast(type as char)
> like 'IMAGE%'
>
> Cheers,
>
> Rick
>
> On Tue, Mar 12, 2013 at 11:57 AM, Loon, EJ van - SPLXM <
> Eric-van.Loon AT klm DOT com> wrote:
>
> > Hi Ulli!
> > Unfortunately the same error:
> >
> > ANR2921E The SQL data type of expression 'BACKUPS.TYPE' is
> > ENUMERATED(OBJECT_TYPE); expecting a character string expression.
> >
> > Kind regards,
> > Eric van Loon
> > AF/KLM Storage Engineering
> >
> >
> > -----Original Message-----
> > From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf
Of
> > Ullrich Mänz
> > Sent: dinsdag 12 maart 2013 11:11
> > To: ADSM-L AT VM.MARIST DOT EDU
> > Subject: Antwort: [ADSM-L] SQL error
> >
> > Hi  Eric,
> >
> > try to add the table name as follows:
> >
> > select * from backups where backups.node_name='KL127EAC' and
backups.type
> > like 'IMAGE%'
> >
> > good luck
> >
> > regards
> > Ulli
> >
> >
> >
> > Ullrich Mänz
> > Data Center Services
> >
> > FRITZ & MACZIOL Software und Computervertrieb GmbH Ludwig Str. 180D,
63067
> > Offenbach, Germany
> >
> > Mobil   +49 170 7678 434
> > Fax:   +49 69 3801 3500 10
> > Web:   http://www.fum.de
> >
> > Amtsgericht Ulm, Handelsregister-Nummer: HRB 1936
> > Geschäftsführer: Heribert Fritz
> > Inhaber: Imtech N.V., Gouda, Niederlande
> >
> >
> >
> >
> > Von:    "Loon, EJ van - SPLXM" <Eric-van.Loon AT KLM DOT COM>
> > An:     ADSM-L AT VM.MARIST DOT EDU,
> > Datum:  12.03.2013 10:50
> > Betreff:        [ADSM-L] SQL error
> > Gesendet von:   "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
> >
> >
> >
> > Hi TSM-ers!
> >
> > I'm trying to retrieve all image backups for a specific node. I'm
issuing
> > the following query:
> >
> >
> >
> > select * from backups where node_name='KL127EAC' and type like 'IMAGE%'
> >
> >
> >
> > This returns the following error:
> >
> >
> >
> > ANR2921E The SQL data type of expression 'TYPE' is
> > ENUMERATED(OBJECT_TYPE); expecting a character string expression.
> >
> >
> >
> > This query works fine:
> >
> >
> >
> > select * from backups where node_name='KL127EAC'and type='IMAGE' works
> > fine...
> >
> >
> >
> > That's where where my limited SQL knowledge stops.
> >
> > Thank you very much for any help!
> >
> > Kind regards,
> >
> > Eric van Loon
> >
> > AF/KLM Storage Engineering
> >
> > ********************************************************
> > For information, services and offers, please visit our web site:
> > http://www.klm.com. This e-mail and any attachment may contain
> > confidential and privileged material intended for the addressee only.
If
> > you are not the addressee, you are notified that no part of the e-mail
or
> > any attachment may be disclosed, copied or distributed, and that any
other
> > action related to this e-mail or attachment is strictly prohibited, and
may
> > be unlawful. If you have received this e-mail by error, please notify
the
> > sender immediately by return e-mail, and delete this message.
> >
> > Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or
its
> > employees shall not be liable for the incorrect or incomplete
transmission
> > of this e-mail or any attachments, nor responsible for any delay in
receipt.
> > Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal Dutch
> > Airlines) is registered in Amstelveen, The Netherlands, with registered
> > number 33014286
> > ********************************************************
> > ********************************************************
> > For information, services and offers, please visit our web site:
> > http://www.klm.com. This e-mail and any attachment may contain
> > confidential and privileged material intended for the addressee only.
If
> > you are not the addressee, you are notified that no part of the e-mail
or
> > any attachment may be disclosed, copied or distributed, and that any
other
> > action related to this e-mail or attachment is strictly prohibited, and
may
> > be unlawful. If you have received this e-mail by error, please notify
the
> > sender immediately by return e-mail, and delete this message.
> >
> > Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or
its
> > employees shall not be liable for the incorrect or incomplete
transmission
> > of this e-mail or any attachments, nor responsible for any delay in
receipt.
> > Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal Dutch
> > Airlines) is registered in Amstelveen, The Netherlands, with registered
> > number 33014286
> > ********************************************************
> >
> >
>
<Prev in Thread] Current Thread [Next in Thread>