Viewing 15 posts - 1,486 through 1,500 (of 2,458 total)
Thomas Schutte (5/15/2015)
DECLARE @source TABLE (SegNo int, Date_Field smalldatetime, Month_Count int, Payment decimal(10,2))
DECLARE @tally TABLE (N int)
INSERT INTO @tally(N)
SELECT ROW_NUMBER() OVER...
May 15, 2015 at 12:55 pm
GilaMonster (5/14/2015)
Over the years I've been very careful to keep my blog completely non-commercial, no adverts, no plugs for my company, nothing. Partially because when I...
May 14, 2015 at 2:43 pm
Please don't cross-post.
Original Post here: http://www.sqlservercentral.com/Forums/Topic1685618-3077-1.aspx
May 14, 2015 at 12:47 pm
I'm curious - how is that script supposed to know what Report it's supposed to print?
May 14, 2015 at 12:45 pm
ORDER BY <column name>
Add DESC at the end if you want to sort in descending order
May 14, 2015 at 12:39 pm
That's correct, XML is case sensitive.
It's worth noting that you can improve you performance by adding a reference to the text node like so:
SELECT CBAADO = x.data.value('(cbaado/text())[1]','varchar(3)'),
...
May 14, 2015 at 12:16 pm
I just finished this article and learned a few things. Well done.
May 14, 2015 at 11:55 am
See the link in my signature line for best practices on getting help then post DDL and sample data.
May 14, 2015 at 11:32 am
Prem-321257 (5/13/2015)
I changed the outer join to inner join and then using >= and <= operator instead of between. The execution time is now less then...
May 14, 2015 at 9:42 am
I don't know which column is your datecol but something like this:
WHERE <datecolumn> <= DATEADD(YEAR,-3,getdate())
We would also have to determine exactly what you mean by "three years old" e.g. leap...
May 14, 2015 at 9:31 am
GilaMonster (5/14/2015)
Alan.B (5/14/2015)
May 14, 2015 at 9:21 am
Why no PK and/or clustered index?
Add a primary key to ID and you get a clustered index scan:
CREATE TABLE dbo.tbl_Login_Details(ID INT IDENTITY, Session_SRNO INT, CONSTRAINT PK_Login PRIMARY KEY(ID));
INSERT dbo.tbl_Login_Details
SELECT...
May 14, 2015 at 9:14 am
You are saying that you have a stored procedure with this code in it:
EXEC PROC udp_TableUpdateALL (This calls 12 separate table updates)
SELECT * FROM UpdatedTable?
There is no reason that should...
May 14, 2015 at 8:13 am
Have you checked the data types? Some datatypes can't have statistics...
From BOL:
column [ ,…n]
Specifies the key column or list of key columns to create the statistics on. You can...
May 13, 2015 at 10:14 pm
Viewing 15 posts - 1,486 through 1,500 (of 2,458 total)