Forum Replies Created

Viewing 15 posts - 22,711 through 22,725 (of 26,490 total)

  • RE: Effective Dating Query

    longobardia (1/30/2009)


    Hey There,

    Pretty nifty query. It actually works if you change the following:

    group by

    tT.employeeid,

    tT.TranDte

    having

    max(ah.updatedate) <= TranDte

    )

    If you run...

  • RE: Effective Dating Query

    Here is the code I was working with. Please see if any of it helps you out.

    Edit: For some reason, I can't cut and paste code from SSMS...

  • RE: Effective Dating Query

    Also, I don't have an employee table or sample data. We could use that as well to help you with your query.

    Be sure to include any indexes that are...

  • RE: Effective Dating Query

    I'm not adding any data to your sample data provided. I don't fully understand your business rules and would prefer you add the data and provide the expected results...

  • RE: Effective Dating Query

    longobardia (1/30/2009)


    Could you explain? Please.

    I don't follow.

    AL

    If you look at your code you will see inconsistancies between column names in different parts of the code. Without looking back...

  • RE: Effective Dating Query

    Never mind part of my comment above. I was looking at something else while writing it. Sorry, I'm a guy and have trouble multi-tasking sometimes. BUT more...

  • RE: Effective Dating Query

    longobardia (1/30/2009)


    The output returned is correct:

    select t.employeeid, t.TranDte,

    dbo.udf_getHistory(t.TranDte, t.employeeid, 1) as Address1,

    dbo.udf_getHistory(t.TranDte, t.employeeId, 2) as Address2,

    dbo.udf_getHistory(t.TranDte, t.employeeId, 3) as City,

    dbo.udf_getHistory(t.TranDte, t.employeeId, 4)...

  • RE: Effective Dating Query

    FYI, not everyone uses a case insensitive collation. It would be nice if your code was consistant in its use of case.

  • RE: Effective Dating Query

    Based on the sample data you provided, what is the expected output?

  • RE: Long running queries

    Then you won't need the transaction log backup in the code.

  • RE: Long running queries

    Mike Levan (1/30/2009)


    Thanks .

    when running this query does the transaction log will be free for every 100,000 recrods? I am just trying to get how this will improve performace when...

  • RE: Long running queries

    You could try the following (in a test environment first)

    declare @batchsize int;

    set @batchsize = 100000; -- 100,000

    while @batchsize <> 0

    begin

    update top (@batchsize) dbo.Rev set

    ...

  • RE: File Copy task fails with Illegal characters in path

    This topic has been reposted with additional information, please go here.

    Note, it would have made more sense to have added your additional info here instead of reposting.

  • RE: Full Backups and Truncating the Transaction Log

    If you are talking about adding backup log with truncate_only, please realize that option is being depreciated and may not be available in future versions of SQL Server. Again,...

  • RE: [error] arithmetic overflow error converting numeric to data type numeric

    The error in the title is cutoff. Could you please post the entire error message?

Viewing 15 posts - 22,711 through 22,725 (of 26,490 total)