This is a migrated thread and some comments may be shown as answers.

conditional update

1 Answer 37 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Najid Hanif
Top achievements
Rank 2
Najid Hanif asked on 07 Nov 2011, 08:41 PM
I have a grid with a popup edit form and a dropdown in that form. What I would like to do is if the selected value of the drop down = 'closed', Set the SQL UpdateCommand [DateClosed] = @DateClosed

So @DateClosed = Getdate()  if drop down = 'closed'
Else  @DateClosed = NULL

Thanks


1 Answer, 1 is accepted

Sort by
0
Najid Hanif
Top achievements
Rank 2
answered on 07 Nov 2011, 09:43 PM
I have figured out a way to do this. I am using a CASE statement in my SQL UPDATE command
Tags
Grid
Asked by
Najid Hanif
Top achievements
Rank 2
Answers by
Najid Hanif
Top achievements
Rank 2
Share this question
or