RE: what is wrong woth this statement?

2004-10-27 Thread Josh Howe
exists]) then Do some sql End If How can I do this? Thanks. -Original Message- From: Leo [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 11:38 PM To: Josh Howe Cc: [EMAIL PROTECTED] Subject: Re: what is wrong woth this statement? i didnt fully catch you

RE: what is wrong woth this statement?

2004-10-27 Thread Josh Howe
, 2004 3:25 PM To: Josh Howe Subject: Re: what is wrong woth this statement? How can I do this? By using the CASE staement? On Wed, 27 Oct 2004 15:15:11 -0400, Josh Howe [EMAIL PROTECTED] wrote: Sorry, I don't think I was very clear. I'm asking a more generic question about control flow

RE: what is wrong woth this statement?

2004-10-27 Thread SGreen
mysql statement, like so: If ([record exists]) then Do some sql End If How can I do this? Thanks. -Original Message- From: Leo [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 11:38 PM To: Josh Howe Cc: [EMAIL PROTECTED] Subject: Re: what is wrong woth

Re: what is wrong woth this statement?

2004-10-27 Thread Michael Stassen
. -Original Message- From: Leo [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 11:38 PM To: Josh Howe Cc: [EMAIL PROTECTED] Subject: Re: what is wrong woth this statement? i didnt fully catch you... is this the kind of query statement you want? INSERT INTO some_other_table SELECT

RE: what is wrong woth this statement?

2004-10-27 Thread Josh Howe
. That's more complex though. Any ideas would be greatly appreciated. Thanks! From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 27, 2004 3:30 PM To: Josh Howe Cc: Leo; [EMAIL PROTECTED] Subject: RE: what is wrong woth

RE: what is wrong woth this statement?

2004-10-27 Thread SGreen
. Thanks! From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 27, 2004 3:30 PM To: Josh Howe Cc: Leo; [EMAIL PROTECTED] Subject: RE: what is wrong woth this statement? Nearly all of the T-SQL style procedural statements (IF... BEGIN... END, WHILE

Re: what is wrong woth this statement?

2004-10-27 Thread Rhino
: what is wrong woth this statement? Nearly all of the T-SQL style procedural statements (IF... BEGIN... END, WHILE...WEND, cursors, etc.) are not currently available in MySQL. Procedural scripts , like the one you propose, will be available in Stored Procedures (new to MySQL 5.0+). I haven't

RE: what is wrong woth this statement?

2004-10-27 Thread Josh Howe
, October 27, 2004 4:51 PM To: Josh Howe; [EMAIL PROTECTED] Cc: Leo; [EMAIL PROTECTED] Subject: Re: what is wrong woth this statement? Have you considered doing what you want to do in Ant? I haven't done exactly what you want to do but Ant supports properties and conditions. I could imagine an Ant task

what is wrong woth this statement?

2004-10-19 Thread Josh Howe
if (select count(*) from z_mail_systems 0) then [insert statement] endif; How do I do this kind of conditional insert? Thanks.

Re: what is wrong woth this statement?

2004-10-19 Thread SGreen
First, assume you want to insert records, then only insert the records you want to add to the destination table. INSERT destinationtablename (destination field list) SELECT matching field list FROM sourcetablename WHERE Basically if you can build a query to return the records you want to

Re: what is wrong woth this statement?

2004-10-19 Thread Leo
i didnt fully catch you... is this the kind of query statement you want? INSERT INTO some_other_table SELECT some_field_list FROM z_mail_systems HAVING COUNT(any_field)0 On Tue, 19 Oct 2004 12:45:30 -0400, Josh Howe [EMAIL PROTECTED] wrote: if (select count(*) from z_mail_systems 0) then