Viewing 15 posts - 8,716 through 8,730 (of 26,490 total)
Ed Wagner (2/27/2013)
I like Lynne's approach of splitting it inline and keeping it to a single query instead of using temp tables. Also, her function will be usable elsewhere.
Two...
February 27, 2013 at 9:36 am
Raul Undreiner (2/27/2013)
Why would this work
SELECT *
FROM #MainQuery
WHERE column1 IN ('Value1','Value2')
and this not?
declare @var varchar(100)
set @TOB = '''Value1'',''Value2'''
SELECT *...
February 27, 2013 at 8:44 am
This would work as well:
SELECT CONVERT(datetime, '25/02/12 11:39:34', 3)
February 27, 2013 at 8:30 am
I am confusing myself now, must be getting tired. I will have to look at this again in the morning after getting some sleep.
February 26, 2013 at 11:11 pm
But then again, hold on a bit, not working with a single digit day. Let me figure that piece out.
February 26, 2013 at 10:44 pm
Not sure how to do this with SSIS, but if you load that date into a staging table and use SQL to convert the string to date, I know how...
February 26, 2013 at 10:41 pm
Is this format consistent: Wednesday 27th March 2013? Always the day name followed by the the day as 1st, 2nd, 3rd, etc., then the full month name, then the...
February 26, 2013 at 10:15 pm
Abu Dina (2/26/2013)
DELETE FROM incident WHERE DATEDIFF(YEAR,CAST(getdate AS DATE), created) > 2
Maybe...
February 26, 2013 at 8:46 pm
One change to your code would be this in the CTE:
SELECT TOP (100) ID
FROM dbo.TableA
WHERE TableAStatusTypeID IN (1, 5, 9) AND LastUpdateTime <= dateadd(ss, -300, @CurUtcDate)
ORDER BY LastUpdateTime ASC
February 26, 2013 at 11:13 am
Also, if you are attempting to populate columns of existing rows of data, INSERT is not what you want, you want UPDATE.
Looking at your dynamic code, you are trying to...
February 26, 2013 at 9:30 am
Post the DDL for the table(s) involved.
February 26, 2013 at 9:28 am
This will work:
DECLARE @ThisYear INT,
@ThisMonth INT;
SET @ThisYear = 2013;
SET @ThisMonth = 2;
SELECT
DATEADD(MONTH, @ThisMonth - 1, DATEADD(YEAR, @ThisYear -...
February 25, 2013 at 3:45 pm
Is this a native backup or are you using third party software to compress the backup?
February 25, 2013 at 3:40 pm
Really not enough information.
Partitioning really isn't used for performancing tuning queries. You need to look at the code and the indexes. Using the actual execution plans for the...
February 25, 2013 at 3:34 pm
Ed Wagner (2/25/2013)
One other noteworthy point is that is you are set up for case insensitivity, the SQL approach won't work. The regular expression approach works either way.
Really, isn't...
February 25, 2013 at 12:26 pm
Viewing 15 posts - 8,716 through 8,730 (of 26,490 total)