Viewing 15 posts - 2,926 through 2,940 (of 4,087 total)
This query can be greatly simplified if you look at it with a different perspective. Instead of the MAX row number within each group, you want a COUNT within...
September 15, 2015 at 12:27 pm
Since you're on SQL 2012, you should convert your ntext columns to nvarchar(max) columns, which you can sort on.
Drew
September 15, 2015 at 10:06 am
Dates do not have formats. Strings that represent dates have formats, but dates themselves do not have formats.
Drew
September 15, 2015 at 7:45 am
I'm not sure whether the parameters are displayed in the proc definition order or the call order. If it's the proc definition order, then you do not need to...
September 15, 2015 at 7:30 am
Luis Cazares (9/10/2015)
To compare NULL values, you need to use IS NULL...
September 10, 2015 at 2:53 pm
There is an option that I haven't seen anyone else suggest. It does depend on you being able to specify an order such that the row to exclude always...
September 10, 2015 at 1:25 pm
First, it looks like you are using closed ranges for you datetime data since the effective end date is usually one second less than the next effective start date. ...
September 10, 2015 at 1:03 pm
Eirikur Eiriksson (9/10/2015)
😎
IF NOT EXISTS (
SELECT SP.Name, SPM.permission_name from sys.server_principals SP
INNER JOIN sys.server_permissions SPM ON SP.principal_id = SPM.grantee_principal_id
WHERE
(SP.name = 'SomeRole' AND SPM.permission_name = 'VIEW ANY...
September 10, 2015 at 7:48 am
sp_executesql allows for an OUTPUT parameter. You can see an example at sp_executesql (Transact-SQL)
Drew
September 9, 2015 at 10:10 am
spaghettidba (9/4/2015)
Please note that my form of the query and J Livingston's are the same: the default for the ORDER BY clause in OVER is ROWS BETWEEN UNBOUNDED...
September 4, 2015 at 7:25 am
If you're really on SQL 2008, then a SQL 2014 specific forum is probably not the best place for you to get answers. There is a forum specifically for...
September 4, 2015 at 7:05 am
Try running the following code:
SELECT LTRIM(SUBSTRING (Col1, 1, 20)) AS 'DateTimeStamp',
LTRIM(SUBSTRING(Col1, 71, 6)) AS 'LSN',
LTRIM(SUBSTRING (Col1, 21, 18)) AS 'FileSize',
LTRIM(SUBSTRING (Col1, 40, 1000)) AS 'FileName1'
FROM #OriginalFileList
WHERE TRY_PARSE(LTRIM(SUBSTRING (Col1, 1,...
September 3, 2015 at 8:32 am
Part of the problem is that your query is needlessly complex. You reference CVS_Details three times and Transmittal_Planning_MarkNo twice and some of these are redundant. To understand this,...
September 2, 2015 at 9:15 am
You're probably going to need to use Dynamic Crosstabs[/url], unless each division has exactly the same player names. You'll probably also want to read Cross Tabs and Pivots--Part 1[/url].
Drew
September 1, 2015 at 2:31 pm
ScottPletcher (8/29/2015)
August 31, 2015 at 8:00 am
Viewing 15 posts - 2,926 through 2,940 (of 4,087 total)