February 11, 2015 at 5:59 am
Hi,
I've sql 2012 and I need to implement this solution.
when a user make any select statement that in this query it refer to a specific column in the query the results from the column should be replaced to 'NODATA'
can it be done by trigger or any other method that SQL server have?
THX
February 11, 2015 at 9:22 am
If you want to replace NULLs or empty strings with the string 'NODATA', one option would be to create views that use ISNULL() for nulls and NULLIF() for empty strings on nullable columns.
The other option is to write those options in the query.
February 11, 2015 at 11:41 am
i can't interpolate the query at all it is closed box.
can it be done via trigger or something else?
February 11, 2015 at 1:52 pm
SELECT statements don't fire triggers.
You can use insert and update triggers to avoid empty values but that would only complicate validations.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply