Viewing 15 posts - 1,486 through 1,500 (of 2,462 total)
This is a job for patexclude8K.
CREATE FUNCTION dbo.PatExclude8K
(
@String VARCHAR(8000),
@Pattern VARCHAR(50)
)
/*******************************************************************************
Purpose:
Given a string (@String) and a pattern (@Pattern) of characters to remove,
...
-- Itzik Ben-Gan 2001
May 16, 2015 at 10:58 am
As others said, more details: good, cursor for this: bad.
It sounds like you can accomplish what you are trying to do with two update statements.
-- Itzik Ben-Gan 2001
May 15, 2015 at 4:42 pm
For a great tutorial try the Stairway to SQL Server Reporting Services[/url] right here on SSC.
-- Itzik Ben-Gan 2001
May 15, 2015 at 4:27 pm
Using this DDL and sample data:
USE tempdb
GO
CREATE TABLE dbo.[ACTION]
(
actionid int not null,
actionvalue varchar(100) not null
);
CREATE TABLE dbo.ACTIONRESULT
(
resultid int primary key,
actionid int not...
-- Itzik Ben-Gan 2001
May 15, 2015 at 4:14 pm
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...
-- Itzik Ben-Gan 2001
May 15, 2015 at 12:55 pm
Thank you for the kind words Iwas
-- Itzik Ben-Gan 2001
May 14, 2015 at 7:40 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...
-- Itzik Ben-Gan 2001
May 14, 2015 at 2:43 pm
Please don't cross-post.
Original Post here: http://www.sqlservercentral.com/Forums/Topic1685618-3077-1.aspx
-- Itzik Ben-Gan 2001
May 14, 2015 at 12:47 pm
I'm curious - how is that script supposed to know what Report it's supposed to print?
-- Itzik Ben-Gan 2001
May 14, 2015 at 12:45 pm
ORDER BY <column name>
Add DESC at the end if you want to sort in descending order
-- Itzik Ben-Gan 2001
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)'),
...
-- Itzik Ben-Gan 2001
May 14, 2015 at 12:16 pm
I just finished this article and learned a few things. Well done.
-- Itzik Ben-Gan 2001
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.
-- Itzik Ben-Gan 2001
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...
-- Itzik Ben-Gan 2001
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...
-- Itzik Ben-Gan 2001
May 14, 2015 at 9:31 am
Viewing 15 posts - 1,486 through 1,500 (of 2,462 total)