Viewing 15 posts - 1 through 15 (of 105 total)
dwain.c, you're correct. I just tried it. Should be a 1, not 0, to return first 10 characters of the datetime field. Yep, thanks.
April 18, 2012 at 3:57 am
I can help you along with most of it:
---this will get the data out of the table for you
SELECT SUBSTRING(dteStartDate, 0, 10), txtCode
from TABLE
---add this to limit your results to...
April 18, 2012 at 3:42 am
1)
Would you also help me a bit with the definition of OVER transact sql clause. MSDN states
Determines the partitioning and ordering of a rowset before the associated...
April 16, 2012 at 11:41 pm
Lynn your SUM plus CASE solution works well too. Thanks.
It takes me a while to integrate a solution as CTEs are so hard on my brain for some reason. ...
April 14, 2012 at 9:55 am
Wow. Looks like while I was battling other fires you guys did some of my work for me. I will now look this over and see and get...
April 13, 2012 at 11:59 pm
i'm not a he and never have been "-)
So, I am leaving this one alone. Thanks for assistance.
April 13, 2012 at 11:53 pm
I am not catching the drift of that dialogue. Lynn is a man...I'm guessing. There was no offense meant. :sick:
Today was one of those days. Nothing worked and too...
April 11, 2012 at 7:13 pm
Yes, that's correct. I made that mistake. With the DDL I provided, it is working correctly. Ofcourse I should have run without quotes. My bad.
Anyway, without quotes, when I try...
April 11, 2012 at 4:52 pm
when i run this:
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 to the...
April 11, 2012 at 4:30 pm
DDL I meant to post
create table TestSuite
(
ID int
, TestNo varchar(10)
, SuitePath varchar (50)
, Outcome varchar (10)
)
insert into TestSuite
values
(1, 'test1', '\Beverages\Soda\Mountain Dew', 'Passed'),
(2, 'test2', '\Bulk\Grains\Oats', 'Failed'),
(3, 'test3', '\Dairy\Milk\Skim','NotExec'),
(4, 'test4', '\Bakery\Bread\Whole Wheat','Blocked'),
(5,...
April 11, 2012 at 4:29 pm
No, for the original DDL that I posted, her trimming functions worked. They returned Beverages.
I still only need the string between the first set of backslashes
April 11, 2012 at 4:27 pm
Oh for the love of mankind it is still happening with the simple DDL I created. Apparently I'm not adopting Lynn's solution properly as it is happening here when I...
April 11, 2012 at 4:11 pm
Here's the query. I am using the column name in place of the parameter. It is a working query before I add the trimming functions (line 2). I...
April 11, 2012 at 3:46 pm
ok capn. hector I did that. That is also my post.
April 11, 2012 at 3:33 pm
Viewing 15 posts - 1 through 15 (of 105 total)