I already have this query, works fine.
Code:
select p.sname, c.cfirst, c.clast,c.cstreetaddy,c.ccity,c.cstate,c.czip, c.cemail from contact c join vseat v join pseat p where v.cid=c.cid and v.pid = p.pid and v.eid=237 and v.status=3;
Now I want to export as CSV. So I search for url sql.com and it has this example:
Code:
SELECT a,b,a+b INTO OUTFILE '/tmp/result.txt'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM test_table;
Oh Perfect. thats just what I want. So here is my jazzed up query:
Code:
select p.sname, c.cfirst, c.clast,c.cstreetaddy,c.ccity,c.cstate,c.czip, c.cemail into outfile
'/tmp/event237.csv' fields terminated by ',' optionally enclosed by '"' lines terminated by '\n' from contact c join vseat v join pseat p where v.cid=c.cid and v.pid = p.pid and v.eid=237 and v.status=3;
And what
-- This message may have been cut off and the rest will only be shown to members. To become a member, click here --