Viewing 15 posts - 1,261 through 1,275 (of 2,462 total)
ITU_dk2012 (9/17/2015)
I have a column in a table which holds list of values. I would like to find the first value, the highest value(Peak Value), and the last value...
-- Itzik Ben-Gan 2001
September 17, 2015 at 8:02 pm
Here's what you are looking for:
WITH
dataSets AS
(
SELECT
DatasetName = xxx.value('(@Name)[1]','varchar(100)'),
ParameterDatasetReferenceTxt = xxx.value('(.//*:CommandText/text())[1]','varchar(1000)')
FROM (VALUES(@XML)) T(X)
CROSS APPLY X.nodes('//*:DataSet') xxx(xxx)
),
params...
-- Itzik Ben-Gan 2001
September 17, 2015 at 7:07 pm
First, welcome to SQLServerCentral. Please note the link in my signature line for the best way to get help here...
I don't know exactly what you are looking for but...
-- Itzik Ben-Gan 2001
September 17, 2015 at 6:33 pm
Can i get the approximate size by right clicking on database and by using the size property Under Database category to get the size idea?
if I understand your question correctly....
-- Itzik Ben-Gan 2001
September 17, 2015 at 1:34 pm
Spam reported.
-- Itzik Ben-Gan 2001
September 17, 2015 at 9:43 am
You need PERCENT_RANK which is not available In SQL 2012.
To get the Percent Rank Pre-2012:
If rk is the RANK for the specified partition
AND rc is the row count for...
-- Itzik Ben-Gan 2001
September 16, 2015 at 11:06 pm
Thank you for checking it out.
Kristen-173977 (9/16/2015)
Hopefully not a stupid question?!! but is there is reason why this is a table-valued function rather than...
-- Itzik Ben-Gan 2001
September 16, 2015 at 10:38 pm
Cool idea... I'd happily contribute.
-- Itzik Ben-Gan 2001
September 16, 2015 at 8:46 pm
I'm a little late to the party but let's not forget about PatExclude8K[/url].
Here's two Patexclude8K solutions:
SELECT Data = NewString
FROM #Tab
CROSS APPLY dbo.PatExclude8K(data,'[= 0-9]');
SELECT Data = NewString
FROM...
-- Itzik Ben-Gan 2001
September 16, 2015 at 8:25 pm
mister.magoo (9/15/2015)
I would always try and keep a...
-- Itzik Ben-Gan 2001
September 15, 2015 at 6:16 pm
You can simplify your query like this:
IF OBJECT_ID('tempdb..#Table') IS NOT NULL DROP TABLE #Table;
CREATE TABLE #Table ( MAIN INT,SUB1 INT,SUB2 INT,[STATUS] VARCHAR(10),MODIFIED VARCHAR(10))
INSERT INTO #Table(MAIN,SUB1,SUB2,[STATUS])
VALUES (1,2,4,'Valid'),(2,4,5,'Valid'),(3,6,4,'Valid'),(4,2,1,'Valid'),(5,3,4,'Valid'),(6,0,0,'Invalid');
DECLARE @count INT =...
-- Itzik Ben-Gan 2001
September 15, 2015 at 4:35 pm
I've seen this since 6.5 or 7.0 and it's still my favorite error.

-- Itzik Ben-Gan 2001
September 14, 2015 at 1:30 pm
What have you tried so far?
-- Itzik Ben-Gan 2001
September 14, 2015 at 11:31 am
I was a DBA from for a few years and have since moved on to Business Intelligence.
There seems to be some debate about this but, from what I've seen,...
-- Itzik Ben-Gan 2001
September 14, 2015 at 11:09 am
FYI regarding my post. I am using SSMS 2012 but got the error on a 2014 server (probably would have been more appropriate to post this under 2014).
brad.mason5 (9/11/2015)
-- Itzik Ben-Gan 2001
September 11, 2015 at 3:42 pm
Viewing 15 posts - 1,261 through 1,275 (of 2,462 total)