Viewing 15 posts - 4,441 through 4,455 (of 7,597 total)
Jeff Moden (1/26/2016)
Manic Star (1/26/2016)
January 27, 2016 at 7:47 am
Luis Cazares (1/26/2016)
Manic Star (1/26/2016)
January 26, 2016 at 3:29 pm
I'd strongly urge you to avoid the INFORMATION_SCHEMA views. Instead, stick to the sys. views.
Not only are I_S views deficient in newer columns vs. the system tables, they are...
January 26, 2016 at 3:24 pm
Here's the clear version of the code:
IF (@phrase_type IS NULL OR @phrase_type = ' ')
Instead, the original code uses:
IF (ISNULL(@phrase_type, ' ') = ' ')
The ISNULL(<value1>, <value2>) will replace a...
January 26, 2016 at 2:46 pm
The consultant indicated they usually advice to take a full backup at night and an incremental backup during lunch time (kicking everybody out of the system).
I guess this...
January 26, 2016 at 2:20 pm
If all you need is a count, don't insert rows into a table variable, just get the count directly:
SELECT@QCount = COUNT(*)
FROMtbl_Q_Tags_Map M
JOINtbl_Q Q ON M.QID=Q.QID
WHERETagID IN (SELECT Token FROM @TokenTable)...
January 26, 2016 at 2:06 pm
Sergiy (1/25/2016)
ScottPletcher (1/25/2016)
Sergiy (1/25/2016)
MMartin1 (1/25/2016)
January 25, 2016 at 4:23 pm
Sergiy (1/25/2016)
MMartin1 (1/25/2016)
January 25, 2016 at 12:22 pm
GilaMonster (1/22/2016)
SQL Guy 1 (1/22/2016)
They agreed with second option, but with condition that the "dirty" records will be marked somehow in the report. So they conditionally accept it.
Nice idea,...
January 22, 2016 at 10:35 am
My best guess at the code, known as a "cross tab" query, is below. You're not using anything from table B in the code. Are these really the...
January 21, 2016 at 7:00 pm
Is the ETL process working in such a way that it gets a table lock? If so, you may be able to remove the table lock and accept that...
January 21, 2016 at 6:54 pm
SumonB (1/20/2016)
What if today's date is 5th January' 2016.Will it show the start date as 21st December'2015 and End date as 5th January'2016
Yes ... and here's the proof:
Declare @StartDate Datetime,
...
January 20, 2016 at 11:00 am
If you always need exactly 15 days, just do this:
Declare @StartDate Datetime,
@EndDate Datetime
set @EndDate=DATEADD(DAY, DATEDIFF(DAY, 0, GETDATE()), 0) --strip time from date
set @StartDate = DATEADD(DAY, -15,...
January 20, 2016 at 10:21 am
Orlando Colamatteo (1/20/2016)
ScottPletcher (1/20/2016)
Orlando Colamatteo (1/19/2016)
ScottPletcher (1/19/2016)
January 20, 2016 at 8:31 am
Sergiy (1/19/2016)
SumonB (1/19/2016)
I executed the code today..
Declare @StartDate Datetime,
@EndDate Datetime
if DAY(@StartDate) >= 7
set @StartDate = DATEADD(day, -15, DATEADD(DAY, DATEDIFF(DAY, 0, GETDATE()), 0))
else
set @StartDate = DATEADD(DAY, -1, DATEADD(MONTH, DATEDIFF(MONTH,...
January 20, 2016 at 7:41 am
Viewing 15 posts - 4,441 through 4,455 (of 7,597 total)