in reply to Re: save the result of sql query in csv file
in thread save the result of sql query in csv file

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Re: Re: save the result of sql query in csv file

Replies are listed 'Best First'.
Re: Re: Re: save the result of sql query in csv file
by astroboy (Chaplain) on Mar 24, 2004 at 12:07 UTC
    Well, there are a number of ways. You could just print it prior to your loop:
    print FH "deptno, dname, loc\n";

    But you could also derive the column names at run time from your statement handle (using $sth->{NAME}). Unless you don't know your column names in advance, I'd go for the simple print option