Viewing 15 posts - 1,696 through 1,710 (of 10,144 total)
;WITH sample_data (resultA, resultB, resultC, resultD) AS (
SELECT 'chicago', 'ID123', '20pax', 'ID123' UNION ALL
SELECT 'austria', 'ID999', '90pax', 'ID999' UNION ALL
SELECT 'Spain', 'ID777', '10pax', 'ID777')
SELECT x.newcol1, x.newcol2
FROM sample_data
CROSS APPLY (
VALUES...
March 14, 2016 at 6:53 am
If all of the objects referenced in the query are remote and on the same server, then run the query on the remote server. The two obvious ways to do...
March 11, 2016 at 2:08 am
Frank Cazabon (3/10/2016)
Thanks, it's giving me an error when I include theOPTION (MAXRECURSION 0)
I have left it out, I hope it's not important 🙂
Correct syntax is to use the...
March 10, 2016 at 7:49 am
Frank Cazabon (3/10/2016)
Is it possible to use CTE in a view definition? All this code relies on this view so it would be...
March 10, 2016 at 7:30 am
Those plans suggest that the number of rows returned is only a small fraction of the total, in which case Paul White's super-quick rCTE-based DISTINCT equivalent might be worth a...
March 10, 2016 at 6:55 am
Junglee_George (3/10/2016)
If you can help me in rewriting the stoed proc usp_StatusHistory , it will be...
March 10, 2016 at 6:23 am
Junglee_George (3/10/2016)
ALTER FUNCTION [dbo].[eufn_e5_eLIMS_SE_Parse_Delimited_List](
@listString nvarchar(4000),
@delimiter nvarchar(1)
)
RETURNS @listTable Table( listItem nvarchar(50) )
AS
BEGIN
DECLARE @pos int
DECLARE @itemString nvarchar(50)
SET @listString = LTRIM(RTRIM(@listString))+ @delimiter-- add trailing comma
SET @Pos...
March 10, 2016 at 3:47 am
Junglee_George (3/10/2016)
I need a alternate way that code which cause the error can be avoided.
I have not developed this code...
March 10, 2016 at 2:05 am
souLTower (3/9/2016)
Select Items, Qty From Table1
Where
QTY >
-- This can be...
March 9, 2016 at 9:38 am
Phil Parkin (3/9/2016)
ganapathy.arvindan (3/9/2016)
March 9, 2016 at 6:24 am
mw112009 (3/8/2016)
This will not work..( below )
Create INDEX IDX_334455 on LAB_IN ( CONVERT(...
March 9, 2016 at 2:22 am
ganapathy.arvindan (3/9/2016)
when AR=2 then 'Closed'
when AR=3 then 'Completed'
when AR=5 then 'Resend to A'
when AR=6 then 'Resend to C'
when AR=7 then...
March 9, 2016 at 2:14 am
DennisPost (3/8/2016)
Annoyingly enough, this resolved itself after a couple of hours. :alien:I went back to it to try adding synonyms into the mix, but it was no longer needed.
There might...
March 8, 2016 at 9:05 am
terry999 (3/8/2016)
Inserts happen in random order with respect to PK values. So it would become fragmented quickly....
March 8, 2016 at 8:30 am
dlchase (3/7/2016)
PaymentID
Try this:
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
SELECT
TableName = SCHEMA_NAME(t.[schema_id]) +'.'+t.Name,
IndexName = i.name,
s.last_user_seek,
s.last_user_scan,
s.last_user_lookup,
s.last_user_update
FROM sys.tables t
LEFT JOIN sys.dm_db_index_usage_stats s
ON s.[object_id] = t.[object_id]
AND s.database_id = DB_ID()
LEFT JOIN...
March 8, 2016 at 5:44 am
Viewing 15 posts - 1,696 through 1,710 (of 10,144 total)