July 27, 2018 at 5:15 am
I created a table ORDER in which there is a column [OrderDate], type is Date.
One stored procedure to take parameter @orderdate varchar (30)
If parameter from winform vb.net pass blank string " " to @orderdate, how to code to insert NULL into the table ORDER?
July 27, 2018 at 6:08 am
adonetok - Friday, July 27, 2018 5:15 AMI created a table ORDER in which there is a column [OrderDate], type is Date.
One stored procedure to take parameter @orderdate varchar (30)
If parameter from winform vb.net pass blank string " " to @orderdate, how to code to insert NULL into the table ORDER?
INSERT INTO ORDER
(
Col1,
...
OrderDate
)
SELECT
@Col1,
...
IIF (@orderdate=' ',NULL,CONVERT(date,@orderdate))
July 27, 2018 at 7:43 am
Thank you for help.
It works great!
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy