Viewing 15 posts - 136 through 150 (of 499 total)
SQL uses three-value logic. So anything = NULL evaluates to False and anything <> NULL also evaluates to FALSE. Also, NULL = NULL is FALSE as is NULL...
October 29, 2015 at 9:59 am
October 29, 2015 at 9:43 am
You just made me wish all over again that MS had gone with Python. The code is so much more readable:
import pyodbc
def Test_SQLConnection(Instances):
ret = []
...
October 28, 2015 at 11:45 am
I can see that you are inserting a value for the id field as a character string. At the very least, that forces an unnecessary conversion. Try unquoting...
October 26, 2015 at 12:27 pm
Can you narrow down the problem to which column? E.g. do them one at a time until the error triggers?
October 26, 2015 at 9:56 am
Poorly worded. The expression does not "converts to NULL and removes beginning and trailing spaces", which implies that it first converts to NULL then removes the spaces --...
October 23, 2015 at 7:27 am
Don't forget ANY and ALL. Written correctly, they can do what EXISTS does in many cases, and often read better.
e.g.
select a,b,c
from foo
where c = any(select d from bar)
instead...
October 22, 2015 at 9:39 am
Does this work:
;with LastSevenDays as (
SELECT [GCM_CLIENT_CD],
HP_CD,
sfh.date_time_Started
From [dbo].[G_MASTER_CODING_RESULTS] (NOLOCK) mcr
inner join [dbo].[G_SUBMISSION_FILES_HEADERS] (NOLOCK) sfh
on mcr.NPI_SENT = sfh.[SUBMISSION_FILES_HEADER_ID]
inner join [dbo].[temp_GammaWorkItem_Batch_EDPS_RESULTS] (NOLOCK) g
on g.[REFERENCE_ID] = mcr.MASTER_CODING_RESULTS_ID
inner...
October 21, 2015 at 10:32 am
In the WHERE clause you have:
(sobj.name = @i_Table_Name or @i_Table_Name = '')
Since @i_Table_Name is defined as sysname, you might want to use N'' instead of just ''.
BTW did you consider...
October 21, 2015 at 8:38 am
The supposedly correct answer "The TOP 3 selling products for all customers who have made a purchase." is ambiguous. As I read it, I would expect only three rows...
October 15, 2015 at 7:02 am
Did you read the whole article? You don't need to trace flag in sqll server 2012
October 13, 2015 at 4:02 pm
Why did the developer have security permissions in the first place?
October 13, 2015 at 2:42 pm
Shouldn't your example output be:
1 0 Apple
4 2 Apple
8 3 Apple
October 13, 2015 at 1:44 pm
Viewing 15 posts - 136 through 150 (of 499 total)