Viewing 15 posts - 1,336 through 1,350 (of 1,435 total)
ptownbro (10/27/2016)
October 27, 2016 at 12:21 pm
Deries (10/26/2016)
October 26, 2016 at 7:49 am
This should do what you are looking for
DECLARE @datetest TABLE (CaseID INT, MTDThresholdDate date, YTDThresholdDate date);
INSERT INTO @datetest (CaseID, MTDThresholdDate, YTDThresholdDate)
VALUES (1, NULL, NULL)
, ...
October 26, 2016 at 12:43 am
Luis Cazares (10/25/2016)
The reason for the CTE was to include the ORDER BY which isn't available in the simple UPDATE.
The correct covering index also takes care of the order by
CREATE...
October 25, 2016 at 1:14 pm
Phil Parkin (10/25/2016)
Luis Cazares (10/25/2016)
The reason for the CTE was to include the ORDER BY which isn't available in the simple UPDATE.And I missed that. Definitely need the ORDER BY.
I...
October 25, 2016 at 12:46 pm
drew.allen (10/24/2016)
October 25, 2016 at 12:35 pm
It can also be done without the CTE or the need for a @results table.
And since it's a single statement, there is no need for the explicit transaction.
CREATE PROCEDURE dbo.GetNextId
...
October 25, 2016 at 12:23 pm
Modify tblMonths to be more like a proper calendar table
CREATE TABLE dbo.tblMonths (
MonthKey int,
Month_Name varchar(40),
Quarter_Name varchar(40),...
October 25, 2016 at 8:57 am
NBSteve (10/24/2016)
DesNorton (3/6/2016)
See this post ... http://www.mssqltips.com/sqlservertip/1476/reading-the-sql-server-log-files-using-tsql/%5B/quote%5D
While generally a good idea, that would defeat the point of this script. ...
October 24, 2016 at 1:13 pm
Please do not cross post.
This question was posted on SQL 2008 and SQL 2012 boards.
What version of SQL are you using, as it may affect the solutions that are proposed.
October 24, 2016 at 4:55 am
You can use Alan Burstein's PatExclude8K[/url]
WITH cteData AS (
SELECT x.String
FROM (VALUES('XDX114A77400'),
...
October 21, 2016 at 2:53 am
TheSQLGuru (10/20/2016)
I really didn't follow what said about a view and then sproc. But I have these issues:
1) first and foremost, you have a function around a pair of columns...
October 21, 2016 at 1:28 am
Firstly, it would help if you provided data in a readily usable format.
That said, this should do the trick.
-- Create a table to house the demo data
CREATE TABLE #Data (
...
October 21, 2016 at 1:16 am
select
TABLE_QUALIFIER = DB_NAME()
, TABLE_OWNER = OBJECT_SCHEMA_NAME(object_id)
, TABLE_NAME = OBJECT_NAME(object_id)
, *
from sys.columns
where object_id = OBJECT_ID('dbo.WHATEVER_THE_TABLE_IS', 'U')
October 20, 2016 at 2:39 pm
Does this query return the the same value in both columns?
And is it '2016-10-19 09:59:59.997' or '2016-10-19 10:00:00.997'?
declare @StartdateTime datetime;
SELECT TOP 1 @PortsLastEndDate = EndDate
FROM dbo.BandwidthLogCalculatedTest6
WHERE PortIndex = 8
ORDER BY...
October 20, 2016 at 2:16 pm
Viewing 15 posts - 1,336 through 1,350 (of 1,435 total)