Return Empty String as NULL

Posted by Daniel on Stack Overflow See other posts from Stack Overflow or by Daniel
Published on 2010-06-10T19:55:25Z Indexed on 2010/06/10 20:03 UTC
Read the original article Hit count: 142

Filed under:
|
|
|

I have a listbox select and I want when the user selects null for the empty string it produces to pull the nulls from the SQL table.

Here's what I have now. Blank strings return nothing because there are no empty fields in the table.

SELECT * FROM dbo.Table WHERE ID = " & TextBox2.Text & " and And Field1 IN (" & Msg1 & ")

How do I code that?

© Stack Overflow or respective owner

Related posts about sql

Related posts about vba