Viewing 15 posts - 1,336 through 1,350 (of 6,036 total)
Run this query:
SELECT * from syscomments
where text like '%NOCOUNT OFF%'
Some people have a habit to add SET NOCOUNT OFF to the code of their procedures.
June 29, 2016 at 12:51 am
Phil Parkin (6/28/2016)
June 28, 2016 at 9:13 pm
Your problem is here:
' where RequestDate >= ''' + CAST(@RequestDate as nvarchar(23)) + ''''
1. Never use CAST is SQL, especially for date-time related data types.
The output of CAST depends...
June 28, 2016 at 7:02 pm
I've got a question about this piece of code:
AND [Date Time Beginning (est)] >= @startdate
AND [Date Time Beginning (est)] <= @enddate
AND datepart(hour, br.[Date Time Beginning (EST)]) >= @starthour...
June 28, 2016 at 6:39 pm
Here is the code I used:
CREATE FUNCTION dbo.TallyN (
@EndNumber bigint
)
RETURNS TABLE
AS RETURN
(-- Inline Tally table producing a number sequence from 1 to @SAMPLE_SIZE
WITH T(N)...
June 28, 2016 at 12:00 am
Xedni (6/27/2016)
June 27, 2016 at 11:42 pm
Don't create the table dynamically.
Create a table once, make it have all the columns ever used in all the integrations where it's used.
Make non-mandatory columns nullable.
Then drop the part of...
June 27, 2016 at 10:52 pm
That's how you do it:
CREATE FUNCTION dbo.TallyGenerator (
@EndNumber bigint
)
RETURNS TABLE
AS RETURN
(-- Inline Tally table producing a number sequence from 1 to @EndNumber
WITH T(N) AS...
June 27, 2016 at 8:16 pm
Xedni (6/27/2016)
June 27, 2016 at 8:04 pm
This would be much shorter version:
SELECT n.N ID, STUFF(
(SELECT ',' + CONVERT(VARCHAR(20), n3.RandomN)
FROM
--picking a random quantity of random numbers per ID
(SELECT TOP 1 N topn FROM dbo.TallyGenerator(1,3,1) WHERE...
June 27, 2016 at 7:13 pm
But what if we need to identify possibly new records added to the set?
Then we need to use a bit different form of the queries:
SET STATISTICS IO, TIME, PROFILE ON...
June 26, 2016 at 9:58 pm
Phil Parkin (6/24/2016)
June 26, 2016 at 9:41 pm
Why do you need MERGE?
update T
set Event_Name = S.Event_Name ,
Client_Name = S.Client_Name,
[EVENT] = S.[EVENT],
Client_Name = S.Client_Name,
Servicer_Code = S.Servicer_Code,
Servicer_Name = S.Servicer_Name
FROM MasterTable T
INNER JOIN @tempTable S...
June 23, 2016 at 9:52 pm
maruthipuligandla (6/23/2016)
How can i get null row values in the below format? When i tried, I'm not getting the NULL value rows in the XML, they are being sipped.. I...
June 23, 2016 at 5:35 pm
Or:
use master
go
DECLARE @filevalue varchar(50), @VarFileName varchar(50);
exec testdb2.dbo.Get_Current_filename @filevalue OUTPUT
select @VarFileName = selected_file from testdb2.dbo.FinalResult;
select @VarFileName...result is valid
June 22, 2016 at 9:02 pm
Viewing 15 posts - 1,336 through 1,350 (of 6,036 total)