iS THE FOLLOWING POSSIBLE IN t-sql?
basically i want to check all the field in a database if they are not null and print the message.
DECLARE @MESSAGE AS varchar (100)
SELECT
@MESSAGE
CASE FIELD1
WHEN NULL OR NOT Like '%[0-9]%' THEN @MESSAGE = 'FIELD1 is not numeric or NULL',
CASE FIELD2
WHEN NULL OR NOT Like '%[0-9]%' THEN @MESSAGE = 'FIELD2 is not numeric or NULL',
CASE FIELD3
WHEN NULL THEN @MESSAGE = FIELD3 is NULL'
FROM table
PRINT MESSAGE
Thanks for your help!
Greetz! Salsa
basically i want to check all the field in a database if they are not null and print the message.
DECLARE @MESSAGE AS varchar (100)
SELECT
@MESSAGE
CASE FIELD1
WHEN NULL OR NOT Like '%[0-9]%' THEN @MESSAGE = 'FIELD1 is not numeric or NULL',
CASE FIELD2
WHEN NULL OR NOT Like '%[0-9]%' THEN @MESSAGE = 'FIELD2 is not numeric or NULL',
CASE FIELD3
WHEN NULL THEN @MESSAGE = FIELD3 is NULL'
FROM table
PRINT MESSAGE
Thanks for your help!
Greetz! Salsa