Re: [U2] I've run out of quotes

2010-06-18 Thread Rex Gozar
I haven't seen this one, so I thought I'd throw it in: * use ~ within the VAR instead of \ to code everything inline VAR = \mysql --user username -e LOAD DATA infile '/mnt/mount/FILE.TXT' REPLACE INTO TABLE database.updates FIELDS TERMINATED BY ',' LINES TERMINATED BY '~n' (Emailaddress,

[U2] I've run out of quotes

2010-06-17 Thread George Gallen
OKHow do I setup a sh -c when what I want to pass has in it, single quotes, double quotes and backslashes? George Gallen Senior Programmer/Analyst Accounting/Data Division, EDI Administrator ggal...@wyanokegroup.com ph:856.848.9005 Ext 220 The Wyanoke Group

Re: [U2] I've run out of quotes

2010-06-17 Thread Larry Hiscock
...@listserver.u2ug.org] On Behalf Of George Gallen Sent: Thursday, June 17, 2010 10:15 AM To: U2 Users List Subject: [U2] I've run out of quotes OKHow do I setup a sh -c when what I want to pass has in it, single quotes, double quotes and backslashes? George Gallen Senior Programmer

Re: [U2] I've run out of quotes

2010-06-17 Thread Jeff Schasny
Write a shell script to your current directory and execute it and delete it George Gallen wrote: OKHow do I setup a sh -c when what I want to pass has in it, single quotes, double quotes and backslashes? George Gallen Senior Programmer/Analyst Accounting/Data Division, EDI

Re: [U2] I've run out of quotes

2010-06-17 Thread George Gallen
- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users- boun...@listserver.u2ug.org] On Behalf Of Larry Hiscock Sent: Thursday, June 17, 2010 1:22 PM To: 'U2 Users List' Subject: Re: [U2] I've run out of quotes You can usually escape any given character passed to the shell

Re: [U2] I've run out of quotes

2010-06-17 Thread George Gallen
I wanted to avoid that route...but I don't think I can. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users- boun...@listserver.u2ug.org] On Behalf Of Jeff Schasny Sent: Thursday, June 17, 2010 1:28 PM To: U2 Users List Subject: Re: [U2] I've run out

Re: [U2] I've run out of quotes

2010-06-17 Thread Larry Hiscock
...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen Sent: Thursday, June 17, 2010 10:30 AM To: U2 Users List Subject: Re: [U2] I've run out of quotes that doesn't help. I'm passing is: mysql --user username -e LOAD DATA infile '/mnt/mount/FILE.TXT' REPLACE

Re: [U2] I've run out of quotes

2010-06-17 Thread Larry Hiscock
] Sent: Thursday, June 17, 2010 10:43 AM To: 'U2 Users List' Subject: RE: [U2] I've run out of quotes Use the QUOTE() function, thusly: sh -c mysql --user username -e :QUOTE(LOAD DATA infile '/mnt/mount/FILE.TXT' REPLACE INTO TABLE database.updates FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n

Re: [U2] I've run out of quotes

2010-06-17 Thread aelwood
: [U2] I've run out of quotes Use the QUOTE() function, thusly: sh -c mysql --user username -e :QUOTE(LOAD DATA infile '/mnt/mount/FILE.TXT' REPLACE INTO TABLE database.updates FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (Emailaddress, Reference) SET UpdateType = 'D', DateAdded

Re: [U2] I've run out of quotes

2010-06-17 Thread Tony Gravagno
As an aside, most people here know that I prefer to do things outside of the DBMS, but driven by the DBMS. So I do what you're talking about all the time with mySQL, cURL, and many other command-line tools. Combine the great advice you've received so far to create the best solution: - Use

Re: [U2] I've run out of quotes

2010-06-17 Thread Boydell, Stuart
My experience is similar - I usually try to write out a shell script - hopefully reusable. ... Within basic code, I would preference equates over variables for quotes other immutable delimiters. Not only more readable (like a variable) but also more protection against fatfingeritus! equ SQ to

Re: [U2] I've run out of quotes

2010-06-17 Thread Steve Romanow
On 6/17/2010 9:33 PM, Boydell, Stuart wrote: My experience is similar - I usually try to write out a shell script - hopefully reusable. ... Within basic code, I would preference equates over variables for quotes other immutable delimiters. Not only more readable (like a variable) but also