* Manjeet
> I am inserting user details from a file. The file has users seperated by
> commas(,)
>
> example of file
>
> manjeet,tom,tim,,john,alexander
>
>
> Using perl script i am reading the file and seperating user info at commas
> and inserting into database.
>
> Now my problem is that i don't want to insert the fourth user which is
> blank.

Then don't... ;)

> my table definitions are same as in previous mail.
>
> How should i avoid of not inserting data which is not defined in between
> commas. I can do that in script.

Yes, and you should.

> Is there anyway of doing it database level.

No, I don't think so. (Some trickery with triggers could have been done, if
only mysql supported triggers...)

> Also let me know how do you define NULL in strings.

Not sure if I understand what you mean... to put NULL in a string field:

  update table set stringfield=NULL;

--
Roger


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to