Last post Aug 30, 2012 10:38 AM by Grzegorz S.
Aug 30, 2012 10:10 AM|Grzegorz S.|LINK
I have a problem with my app, i created a app which manage MySql data base i put DataGrid to edit my records, i want now make smth like this:
if user update table and set one of fields null - add to database field with "-" this is my statement
UPDATE table SET deal= @deal, other=( CASE WHEN (@other IS NOT NULL) THEN @inna ELSE '-' END`) WHERE user_id = @user_id
Aug 30, 2012 10:35 AM|Dan Bracuk|LINK
Is there a problem with what you have already?
Aug 30, 2012 10:38 AM|Grzegorz S.|LINK
i am stupid and i noticed that i had wrong statement..
i will post it here if anyone would ever have similiar problem
UPDATE table SET deal= @deal, other=CASE WHEN @other IS NULL THEN '-' ELSE @other END WHERE user_id = @user_id