File_name, Size_Byte, Date Mydoc.doc, 1234, 11/12/2005 My.xls,2753,11/05/2004 fgf.pdf,90765,01/07/2001 the sheep and cucumber.mdb,4567356,01/01/2003 jojo-elliot.ppt,45675465,08/12/1995 hello_doly,8672341,12/9/1966 #### #! c:/perl/bin/perl.exe -slw use strict; use Win32::ODBC; my $DSN = 'DD1'; my $DB = new Win32::ODBC($DSN) || die "Error => $DSN $!\n"; my $total = $DB->sql("SELECT SUM(Size_Byte) FROM Files_U WHERE Type ='doc'"); #print "$total"; this is not correct $DB->Close;