Re: CSVWRITE - How do you sort the order of the columns?

25 views
Skip to first unread message

Brian

unread,
Sep 27, 2012, 11:03:02 AM9/27/12
to h2-da...@googlegroups.com
You'll need to explicitly name and order them in your select statement.
select date,name,location,phone from data_push

On Thursday, September 27, 2012 6:28:54 AM UTC-7, sc8132 wrote:
Hi,

I have a call csvwrite script for my database. How can I change script so that it allows me to "control" the sort order of the columns?
I want specific columns of my table to be in specific order (ie: Date, Name, Location, Phone, etc).

CALL CSVWRITE('C:\TEMP\exportdata.csv','SELECT "DATA_PUSH".* FROM "PUBLIC"."DATA_PUSH" "DATA_PUSH"','fieldDelimiter= writeColumnHeader=false');

Thanks!
Sherry

sc8132

unread,
Sep 28, 2012, 1:42:30 PM9/28/12
to h2-da...@googlegroups.com
Thanks Brian.. it took me a few hours, but I figured that out this morning.  I'm new to this whole coding thing and I find it all so exciting.
thanks again!
Reply all
Reply to author
Forward
0 new messages