- Sep 19, 2000
- 10,284
- 138
- 106
So I came in and wrote a program to interface with a MS SQL server for my company. The problem is, the guy that setup every table didn't tell the table to initialize unknown values to 0 (they are all NULL). So to do an insert into the table, you have to fill in EVERY VALUE...
Here's what I would like to do. After inserting data into the table, I would like to set every numeric value that is NULL to 0, and every string like value to a blank value. Without remaking the table (As all his programs will create a table that doesn't initialize values) is there any way to do this? I would rather not have to add 500 0's to an insert statement because the table isn't setup correctly.
So something like Select * from tablename where NULL would be nice.
Here's what I would like to do. After inserting data into the table, I would like to set every numeric value that is NULL to 0, and every string like value to a blank value. Without remaking the table (As all his programs will create a table that doesn't initialize values) is there any way to do this? I would rather not have to add 500 0's to an insert statement because the table isn't setup correctly.
So something like Select * from tablename where NULL would be nice.