Tagged Questions
0
votes
0answers
57 views
Database associative table
I have a coworker who's insisting on using associative tables to create nullable associations. For example, we have this table :
cm.accounts
----------
id:int (PK, identity)
...
sm.services
...
0
votes
3answers
166 views
Easier way to handle so many isnull() situation
Is there any good way to avoid writing so many times isnull() function inside sproc ?
I have stored procedure that use almost 30 times isnull() function, I think that I am miss a concept , but until I ...
2
votes
1answer
101 views
Update “NULL” string to Actual NULL value
I have a table that contains NULL values but the problem is that some of the values are actually string "NULL" and not actual NULLS so when you trying something like
where date is null
it will not ...
1
vote
2answers
131 views
Only one NULL for one part of primary key
I have two date columns : "start date" and "finish date".
I want to make sure that there can be only one null value in the "finish date" column (which should be current state if it's NULL) for one ...
1
vote
1answer
386 views
Query performance of a NULL vs an empty ('') varchar in SQL Server 2012
I have 3 indexed fields in a query: int, int, and varchar(250).
The query performs well when all 3 conditions are specified with real values. The int columns always have values, but there are plenty ...
2
votes
3answers
2k views
Questions about handling NULLs and empty strings in nvarchar and numeric fields
I understand that questions similar to these pop up often around here. I have searched before posting these but I didn't find any QA threads that completely answer my questions. In a table, I ...
4
votes
2answers
70 views
Deleting NULL results
Currently I'm just trying to delete objects with the Name column being Null from a temp table with the following...
delete from #PulledData
where #PulledData.Name0 = NULL
I've also tried = 'NULL', ...
4
votes
2answers
135 views
Checking a wide table for nulls [duplicate]
Possible Duplicate:
Test if any fields are NULL
I am new here. I have a table with 70-odd columns. Is there a way I can check the number of rows with at least one null value in any column ...
5
votes
2answers
490 views
Comparing Columns that can contain NULLS - is there a more elegant way?
I know that you can't compare a value to NULL and expect a result without adding something like in the following code...
SELECT
*
FROM
A INNER JOIN
B ON A.ID = B.ID
WHERE
A.STRING ...
4
votes
1answer
183 views
Is there some drawback to define SPARSE columns?
I have a table which has a lot of NULL values in columns. But some columns don't contain NULLs at all (although nullable). Is there some drawback to declare all of these columns as SPARSE?
0
votes
2answers
476 views
Is where x = 0 or x is null to be replaced by where isnull(x, 0) = 0 resp. where NVL(x, 0) = 0
Think of x as a column containing null, 0, 1.
Only less than 1 % of the rows contain 1.
There is no logical difference between 0 and Null.
Is it a good idea to insist, that isnull rather than NVL is ...