Viewing 15 posts - 406 through 420 (of 533 total)
declare @fullName varchar(50)
set @fullName = 'Smith, Bob'
select LEFT(@fullName, CHARINDEX(',', @fullName) - 1) as NameLast,
STUFF(@fullName, 1, CHARINDEX(',', @fullName), '') as NameFirst
You would need to add extra logic to handle any cases...
May 19, 2010 at 4:47 pm
RobD1 (5/18/2010)
I will also need to run this query on a SQL 2000 server. So it would be good if I didn't have to use SQL features that require 2005.
Didn't...
May 18, 2010 at 5:44 pm
Lutz,
You already know what you're doing. I'm hoping to throw stuff out that will hopefully help people and potentially provide me with feedback at the same time.
Until very recently...
May 18, 2010 at 5:40 pm
Well, if you really don't want to count 'Re-open's that don't have a 'Ready for build' in between:
WITH cteTemp (RowID, ITEMID, StateChgDt, [State])
AS
(
SELECT ROW_NUMBER() OVER (ORDER BY ITEMID, StateChgDt),
ITEMID,
StateChgDt,
[State]
FROM @t_temp
WHERE...
May 18, 2010 at 5:19 pm
That wouldn't be hard to check for if that's part of the requirements. What he said was
if a "re-open" occurs followed at some point by a "ready for...
May 18, 2010 at 4:40 pm
Good article, but I think that may add confusion and unnecessary complexity to a fairly simple query.
I did simplify the table somewhat ... if you already have an IDENTITY set...
May 18, 2010 at 4:06 pm
I think your best bet would be to contact Omegatron about this. Even if the database connection string is configurable, I would guess that the data access components compiled...
May 18, 2010 at 3:27 pm
To get help, you're best off giving table definitions for the tables in question *and* a simple script to do data insertions into those tables to allow people trying to...
May 14, 2010 at 3:46 pm
I don't get an error running this on 2K8. I don't have a 2K box to test it on anymore.
May 14, 2010 at 10:32 am
If you provide table definitions you're much more likely to get productive assistance.
May 13, 2010 at 4:07 pm
It really depends on a lot of things:
1) What disc hardware you have
2) What kinds of bandwidth you have between the two servers
3) How much processing is involved to WH...
May 13, 2010 at 3:48 pm
Sample data:
declare @t_table table
(
UserID VARCHAR(10),
PackageID INT,
DateCreated DATETIME
);
insert into @t_table (UserID, PackageID, DateCreated)
select 'ABC', 1111, '2010-05-01' union
select 'ABC', 1112, '2010-05-02' union
select 'ABC', 1116, '2010-05-06' union
select 'DEF', 1254, '2009-04-01' union
select 'DEF', 1456,...
May 13, 2010 at 11:57 am
What you are describing is usually a bad idea. You're almost always better off doing separate returns and handling the formatting on the application side. However, if you...
May 13, 2010 at 11:34 am
It depends.
May 13, 2010 at 10:59 am
Try changing the where clause:
WHERE
(@location is null or site in (SELECT Item FROM dbo.Split (@location, ','))) and
(@year is null or year(created_date) in (SELECT Item FROM dbo.Split (@year, ','))) and
(@auditee...
May 13, 2010 at 10:56 am
Viewing 15 posts - 406 through 420 (of 533 total)