Viewing 15 posts - 1,246 through 1,260 (of 1,468 total)
Yes, there s a single open tran for the full duration of the looping and deleting.
Since there is no where clause ... why would he not simply do a...
March 15, 2017 at 11:42 am
The following code will work, so long as you only have 5 days per VM.
WITH cteDayNum AS (
SELECT *
, [DayNum] =...
March 13, 2017 at 1:54 pm
SELECT
ID
, DateDifference = SUM(DATEDIFF(DAY, ReportedDate, CompletedDate))
FROM #ReportTable
GROUP BY ID;
March 12, 2017 at 11:38 pm
SELECT DISTINCT
t.EmpId AS Id,
t.STDID
INTO #Temp
FROM dbo.Employee t
SELECT DISTINCT
t.EmpAuditId AS Id,
t.STDID
INTO #Temp2
FROM...
March 10, 2017 at 7:10 am
WITH ctePerson AS (
SELECT *
, nextVisitDate = LEAD(p.VisitDate, 1, '2199-12-31') OVER (PARTITION BY PID ORDER BY p.VisitDate)
FROM #person AS p
March 9, 2017 at 8:14 am
Is there a reason why the CLUSTERED key is on the IDENTITY field?
Based purely on this query, you could look at changing the PRIMARY KEY to a NON-CLUSTERED...
March 9, 2017 at 3:48 am
You can try something like this. NOTE: The lack of data or expected results means that this code is untested.WITH cteDateCalc AS (
SELECT
trackid
March 7, 2017 at 11:17 pm
Since this is a SQL 2008 Forum, I assume that you are using SQL 2008. In this case a SEQUENCE object will not work.
You could use a watermark...
March 6, 2017 at 11:24 pm
Your first problem is that you have tag names that include mathematical operators. How do you know whether SC-1 is "SC" minus 1, or just the tag "SC-1".
Once...
March 2, 2017 at 5:53 am
March 2, 2017 at 1:20 am
I used the following code, and get 4 results from the sample XML that you posted.
DECLARE @CAQH_Return_XML TABLE (FileInfo XML);
INSERT INTO @CAQH_Return_XML(FileInfo)
VALUES...
March 1, 2017 at 12:46 am
Your solution works brilliantly, thank you so much! Sorry...
February 24, 2017 at 5:10 pm
Please post readily usable code. A picture of the xml doesn't help. I have added the Provider root, as well as the NPI and LastName nodes to your sample data.
February 23, 2017 at 3:09 pm
February 17, 2017 at 1:45 am
2 Possible options ...
DECLARE @SeedVal INT = ISNULL((SELECT LID_ID_NB from LastIDNumber WHERE LID_KET_NM = 'TableName'), 0) +1;
DBCC CHECKIDENT ( TableName, RESEED, @SeedVal ) WITH...
February 14, 2017 at 10:55 am
Viewing 15 posts - 1,246 through 1,260 (of 1,468 total)