Forum Replies Created

Viewing 15 posts - 406 through 420 (of 533 total)

  • RE: Only pull certain characters

    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...

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: How do I count the occurrences of a sequence of records

    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...

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: How do I count the occurrences of a sequence of records

    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...

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: How do I count the occurrences of a sequence of records

    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...

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: How do I count the occurrences of a sequence of records

    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...

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: How do I count the occurrences of a sequence of records

    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...

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: Using SQL2008 with software/databases written for SQL2000?

    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...

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: Bulk move notes from one customer record to another

    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...

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: Arithmetic overflow : Fit 100 into numeric (15,-2)

    I don't get an error running this on 2K8. I don't have a 2K box to test it on anymore.

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: Bulk move notes from one customer record to another

    If you provide table definitions you're much more likely to get productive assistance.

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: How to Build a robust DWH ? need some advice

    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...

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: Retrieve rows only if the difference in two rows is less than 2

    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,...

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: Adding Header and Trailer

    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...

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: how much time it will take to get the records from a large table

    It depends.

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: write a store procedure to generate report using SSRS2005

    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...

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

Viewing 15 posts - 406 through 420 (of 533 total)