Have a quick question. I have s table with 423 fields. Would like to find if there is null value for any of the fields. Some reason can’t make a query to do this. TIA.
It might be painful, but probably having 423 expressions (field1 IS NULL) in the WHERE clause combined with 422 ORs is the most direct way. It's painful to type, so I'll sometimes use something like SELECT name FROM sys.columns WHERE object_id = OBJECT_ID("tableName). Then build up my intended WHERE clause like this: SELECT name & ' IS NULL' FROM... Then copy/paste into a text editor to write the rest of the SELECT statement.
For some out there i might help u because this video helped me alot if u struggling a lot and cant find why this is not working be sure u writing good DISTINCT instead of DINSTINC ------ This happend to me. :)
Just wanted to express my gratitude for the SQL video. It's been a game-changer in my learning journey! 😄📹💻🔍
Thanks for your kind words! Very happy to know it helped!
You make this stuff easy to understand Doug. Thanks
Thanks for posting Doug! This helped very much and was very easy to understand and follow!
Good job dude, underrated video
Thanks for easy to understand and helpful video.
Have a quick question. I have s table with 423 fields. Would like to find if there is null value for any of the fields. Some reason can’t make a query to do this. TIA.
It might be painful, but probably having 423 expressions (field1 IS NULL) in the WHERE clause combined with 422 ORs is the most direct way. It's painful to type, so I'll sometimes use something like SELECT name FROM sys.columns WHERE object_id = OBJECT_ID("tableName). Then build up my intended WHERE clause like this:
SELECT name & ' IS NULL' FROM...
Then copy/paste into a text editor to write the rest of the SELECT statement.
revised last line:
SELECT 'OR ' & name & ' IS NULL'
Thank you! This is very helpful and easy to understand!
Sir,
Thank u so much
This helped me find my answers for my assignment at the very last second.......
Thanks alot
Wishing you all the best
For some out there i might help u because this video helped me alot
if u struggling a lot and cant find why this is not working be sure u writing good
DISTINCT instead of DINSTINC ------ This happend to me. :)
Where we get tables ??
what database program are you using here?
This is awesome. Thanks!
What is the distinct of batch_month tell me how to do
Very helpful. Thanks!
great video! thank you!
Thank you!