"date" is a reserved SQL word. And you have to remove the quotation marks.
select filespace_name,hl_name,ll_name,date(archive_date) as Adate,
class_name from archives where node_name='CS-NICE-STORAGE' and
archive_date>'06/30/2005' order by Adate
should do the trick.
HTH
Thomas Rupp
-----Ursprüngliche Nachricht-----
Von: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] Im Auftrag
von Joni Moyer
Gesendet: Donnerstag, 15. September 2005 15:53
An: ADSM-L AT VM.MARIST DOT EDU
Betreff: [ADSM-L] SQL statement
Hi Everyone!
Does anyone know what I am doing wrong with this sql statement? I am
trying to get the file info. but it all comes down to the date. I just
want to report on the date that the data was archived before 6/3/2005, but
I can't figure out what I am doing wrong. Any suggestions? Thanks!
tsm: TSMPROD>select filespace_name,hl_name,ll_name,date(archive_date) as
"date",
class_name from archives where node_name='CS-NICE-STORAGE' and
arch
ive_date>'06/30/2005' order by date > /tmp/nice2
Output of command redirected to file '/tmp/nice2'
ANS8001I Return code 3.
ANR2904E Unexpected SQL key word token - 'DATE'.
|
...........................................................V...
='CS-NICE-STORAGE' and archive_date> '06/30/2005' order by date
********************************
Joni Moyer
Highmark
Storage Systems
Work:(717)302-6603
Fax:(717)302-5974
joni.moyer AT highmark DOT com
********************************
|