Viewing 15 posts - 2,341 through 2,355 (of 4,087 total)
Luis Cazares (9/26/2016)
drew.allen (9/26/2016)
xr280xr (9/26/2016)
September 26, 2016 at 2:56 pm
xr280xr (9/26/2016)
September 26, 2016 at 1:13 pm
I was also wondering if instead of mutually exclusive you meant disjoint. Mutually exclusive means that you want to exclude the intersection of two sets, whereas disjoint means that...
September 26, 2016 at 12:55 pm
xr280xr (9/26/2016)
a || b || c
The important...
September 26, 2016 at 12:18 pm
dimpythewimpy (9/23/2016)
delete from FY_ST_ANSWER_DETAIL adwhere ad.fy_st_question_dtl_table_id = @nFY_ST_QUESTION_DTL_TABLE_ID
The DELETE statement has two FROM clauses: one mandatory and one optional. The FROM keyword is optional in the mandatory FROM clause...
September 23, 2016 at 11:59 am
You haven't given us the definition of your function, you haven't given us sample data, you haven't given us expected results, and the code you've given us won't even parse,...
September 22, 2016 at 4:08 pm
The Dixie Flatline (9/22/2016)
Withdrawn. I'm being critical. Is it Friday yet?
YES!! It is Friday!! Unfortunately, it's not Friday here, yet. :Whistling:
Drew
September 22, 2016 at 3:24 pm
Do you want to store that expression or the results of evaluating that expression? If the first, then you're missing some single quotes. If the latter, then you...
September 22, 2016 at 3:21 pm
The best option here may be the EXCEPT operator.
INSERT INTO [dbo].[ErrorLog_last48]
([EventDate]
,[ApplicationID]
,[SessionID]
,[ServerName]
,[Level]
,[Message]
,[StackTrace]
,[MetaData]
,[DateIn])
SELECT TOP 10000
[EventDate]
,[ApplicationID]
,[SessionID]
,[ServerName]
,[Level]
,[Message]
,[StackTrace]
,[MetaData]
,[DateIn]
FROM [dbo].[ErrorLogExport]
EXCEPT
SELECT
[EventDate]
,[ApplicationID]
,[SessionID]
,[ServerName]
,[Level]
,[Message]
,[StackTrace]
,[MetaData]
,[DateIn]
FROM [dbo].[ErrorLog_last48]
It's not clear which of your columns can be NULL, but EXCEPT will treat NULLs as...
September 22, 2016 at 2:34 pm
This looks like generated code.
1. Extreme overuse of parens. NOBODY writes SUBSTRING([ID_NUM], (3), (20)) when SUBSTRING([ID_NUM], 3, 20) means the same thing, is easier to read, and takes...
September 22, 2016 at 2:25 pm
Sue_H (9/22/2016)
Luis Cazares (9/22/2016)
Interview question?My thoughts as well. The follow up to that specific question could be interesting if someone doesn't know what would be different between the two.
The answer...
September 22, 2016 at 11:34 am
SQL Server add XML functionality to SQL 2005. This allows you to read/create XML fragments. The FOR XML tells SQL Server that you want to create an XML...
September 22, 2016 at 10:27 am
Part of the problem is that you are reading the same table twice when you only need to read it once. I've rewritten this to use a CROSS APPLY...
September 21, 2016 at 4:02 pm
Also, the ELSE clause within your CASE statement is missing an expression, and your CASE statement is missing an END.
Drew
September 21, 2016 at 1:19 pm
There are several issues here.
1) By default, SQL Server is case insensitive. Unless you've overridden these defaults, the two subqueries are going to return the same results.
2) You say that...
September 21, 2016 at 1:16 pm
Viewing 15 posts - 2,341 through 2,355 (of 4,087 total)