List:General Discussion« Previous MessageNext Message »
From:John thegimper Date:November 3 2005 8:11am
Subject:Re: LOAD DATA IF?
View as plain text  
I dont want it to INSERT that row.

Sample.txt
name;category;price
samsung;dvd;60
siemens;mobile;40
none;none;0

Say i dont want to insert rows where category is mobile or price <= 0.
So in this case only the 'samsung;dvd;60' row would be inserted.

Is this possible?


Quoting Paul DuBois <paul@stripped>:

> At 1:16 +0100 11/3/05, John thegimper wrote:
> >Is it possible to specify and IF statement or IGNORE statement when 
> >useing LOAD
> >DATA?
> >Example
> >
> >SET price = IF PRICE(< 20) THEN IGNORE
> >SET price = IGNORE IF <20
> 
> What is the semantics of IGNORE?  What do you expect to happen?
> 
> -- 
> Paul DuBois, MySQL Documentation Team
> Madison, Wisconsin, USA
> MySQL AB, www.mysql.com
> 



 

-------------------------------------------------
FREE E-MAIL IN 1 MINUTE!
 - your.name@stripped - http://www.pc.nu
Thread
LOAD DATA IF?John thegimper3 Nov
  • Re: LOAD DATA IF?Paul DuBois3 Nov
    • Re: LOAD DATA IF?John thegimper3 Nov
      • Re: LOAD DATA IF?Scott Haneda3 Nov