Re: NOT EMPTY, like NOT NULL

2007-02-13 Thread js
Hello Nils and Jerry, Thanks you for your quick reply! IMO, using trigger looks cleaner and prettier than Excel-like if(char_length) hack so I will probably give triggers a try. Searching on the net, I found some articles on check constraints in MySQL. http://gilfster.blogspot.com/2005/11/check

Re: NOT EMPTY, like NOT NULL

2007-02-12 Thread Nils Meyer
Hi Js, js wrote: Is there any easy way to implement 'NOT EMPTY' constraint? There currently is no support for CHECK Constraints in MySQL, at least to my knowing. So you'd have to go with a trigger. regards Nils -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To

RE: NOT EMPTY, like NOT NULL

2007-02-12 Thread Jerry Schwartz
rds, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 > -Original Message- > From: js [mailto:[EMAIL PROTECTED] > Sent: Monday, February 12, 2007 11:09 AM > To: Rolando Edwards > Cc: mysql@lists.mysql.com

Re: NOT EMPTY, like NOT NULL

2007-02-12 Thread js
Thanks for reply and sorry for lack of information. What I want to know is not how to query, but how to prevent emtpy data from being inserted in tables. Let's say I'd like to have a table that doesn't contains any NULL value. I'd create the table like below. ##

Re: NOT EMPTY, like NOT NULL

2007-02-12 Thread C.R.Vegelin
Have a look at the HAVING clause ... - Original Message - From: "js " <[EMAIL PROTECTED]> To: Sent: Monday, February 12, 2007 2:48 PM Subject: NOT EMPTY, like NOT NULL Hi list, A silly question. Is it possible to prevent empty value('') from appearing in

Re: NOT EMPTY, like NOT NULL

2007-02-12 Thread Rolando Edwards
ldname='','Empty Value of Your Choice',fieldname)) FROM Give it a try, it's Worth a Shot !!! - Original Message - From: "js" <[EMAIL PROTECTED]> To: mysql@lists.mysql.com Sent: Monday, February 12, 2007 9:48:28 AM (GMT-0500) US/Eastern Subject: NOT EMPT

NOT EMPTY, like NOT NULL

2007-02-12 Thread js
Hi list, A silly question. Is it possible to prevent empty value('') from appearing in a field? I can solve this by using subquery or trigger, but it's a little bit painful. The simpler the better :) Thanks. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsub