Viewing 15 posts - 601 through 615 (of 860 total)
vinu512 (4/12/2012)
dwain.c (4/11/2012)
DECLARE @t TABLE (id INT, test VARCHAR(10), status VARCHAR(10))
INSERT INTO @t (id, test, status)
SELECT 1, 'test1', 'Passed' UNION ALL
SELECT...
April 12, 2012 at 7:46 am
drew.allen (4/12/2012)
xenophilia (4/11/2012)
SELECT Distinct Outcome
, TestNo
, SUBSTRING(RIGHT('SuitePath',DATALENGTH('SuitePath') - 1),1,PATINDEX('%\%',RIGHT('SuitePath',DATALENGTH('SuitePath') - 1)) - 1)
from testsuite
i get this error
Msg 536, Level 16, State 1, Line 1
Invalid length parameter passed...
April 12, 2012 at 7:34 am
Mike01 (4/12/2012)
;WITH cte AS (
SELECT *,
ROW_NUMBER() OVER(PARTITION BY EventNumber, OBJECTID, ObjectSerial ORDER BY...
April 12, 2012 at 7:32 am
vinu512 (4/12/2012)
Tried it like this :
Create Table Ex
(item1 int,
item2 varchar(5),
item3 int)
Insert Into Ex
Select 1, 'pen', 34
Union All
Select 1, 'pen', null
Select *...
April 12, 2012 at 7:25 am
if those results are not what you need can you post your expected results from the sample data.
April 12, 2012 at 7:07 am
run the query that forms the common table expression and take a look at the row number. once you see that it will be clear why even with your...
April 12, 2012 at 7:04 am
mrashish_jaiswal (4/12/2012)
Can you pls elaborate other table structure 🙂
he is asking for DDL (create table statements) and sample data (hard coded inserts). please see the link in my signature...
April 12, 2012 at 6:49 am
xenophilia (4/11/2012)
Today was one of those days. Nothing worked and...
April 11, 2012 at 7:16 pm
Lynn Pettis (4/11/2012)
capn.hector (4/11/2012)
Lynn Pettis (4/11/2012)
xenophilia (4/11/2012)
I still only need the string between...
April 11, 2012 at 6:15 pm
Lynn Pettis (4/11/2012)
xenophilia (4/11/2012)
I still only need the string between the first set...
April 11, 2012 at 5:58 pm
I think this is what you are looking for:
with cte as (select ROW_NUMBER () OVER (PARTITION BY EVENTNUMBER ORDER BY TIMESTAMP ASC) as ROW, * FROM ExampleLog)
SELECT * from cte...
April 11, 2012 at 5:56 pm
the select 1 just returns 1 instead of the multiple values for your exist(). and for the cursor, we need the table deffinitions and sample data before we can...
April 11, 2012 at 5:29 pm
suhailtajraja (4/11/2012)
April 11, 2012 at 5:04 pm
xenophilia (4/11/2012)
like this\dfsadfdsfsadfdsafdsaf\popopsfdasfasdfds\erwrewaafadsfdsfsadfdsfsdfsadfdsafsdfsdfdsdfdfsadfdsafdsfwrerewrewrewrewrewre
once again that string works giving you dfsadfdsfsadfdsafdsaf when you run it through Lynn's parse
DECLARE @tststr VARCHAR(MAX);
SET @tststr = '\dfsadfdsfsadfdsafdsaf\popopsfdasfasdfds\erwrewaafadsfdsfsadfdsfsdfsadfdsafsdfsdfdsdfdfsadfdsafdsfwrerewrewrewrewrewre';
SELECT SUBSTRING(RIGHT(@tststr,DATALENGTH(@tststr) - 1),1,PATINDEX('%\%',RIGHT(@tststr,DATALENGTH(@tststr) - 1)) - 1);
April 11, 2012 at 4:58 pm
since it works on the data provided we can not go any further with out better data. please post some of the actual data you are running it on...
April 11, 2012 at 4:56 pm
Viewing 15 posts - 601 through 615 (of 860 total)