Forum Replies Created

Viewing 15 posts - 451 through 465 (of 1,468 total)

  • Reply To: count number of days between two dates excluding weekends for a particular month

    A calendar table is definitely the better option.

    But, just for fun, I have come up with 2 options that *SHOULD* work with SQL2000.  Unfortunately I do not have SQL2000 to...

  • Reply To: count number of days between two dates excluding weekends for a particular month

    chenks wrote:

    the only days i would be exluding are weekend days (so no other holidays to be excluded).

    so would a calendar still be the most appropriate way to do this?

    I...

  • Reply To: Table Function becomes slow

    Historically, I have found that Stored Procs out-perform functions such as these.

    • Try converting the function to a proc
    • Try updating stats on the tables being referenced by the function.
  • Reply To: XML get result

    Due to the clash of you div names with the web page, I am not recreating the actual xml here.

    This should also get what you are looking for.


    How to post data/code on a forum to get the best help.

  • Reply To: XML get result

    It is not possible, as the value "Avis" does not exist in the sample data

  • Reply To: Getting Min and Max dates by segment for continuous enrollment

    --=== Logic breakdown ================================================
    --=== -- Group the consecutive enrollments for each waiver
    --=== SELECT *, Grouper = DATEADD(DAY,0-DurationRuningTotal,TERMDATE)
    --=== FROM (
    --=== -- Get the enrollment...
  • Reply To: Guaranteed Varchar to Date conversion

    Ells wrote:

    Thanks all,

    that's going to take me some time to analyse. The source data is just terrible. They have been swapping the format of the dates on almost a daily...

  • Reply To: Help on excluding dates

    woody_rd wrote:

    Thanks for that, guys!  That does work for getting the results I need from that part of my query.  I'm joining these results into a larger data set via...

  • Reply To: Guaranteed Varchar to Date conversion

    So, I spent some time creating a function that will successfully convert *MOST* string formats to DATETIME.  This has only been tested in a us-en environment.

    CREATE FUNCTION...
  • Reply To: Guaranteed Varchar to Date conversion

    Take a look at this post where a present a solution for a similar issue.

    You can take this a step further, and create a iTVF for future use

  • Reply To: Sql script Transpose Multiple Column into Rows

    That SQL does not make sense.

    Kindly provide DDL scripts and sample data so that we can understand what you are seeing.

  • Reply To: Sql script Transpose Multiple Column into Rows

    This looks like you are simply repeating the same query over and over

    SELECT top(1) PM_DataContabileBKI
    FROM [xxx].[xxx].[xxx]
    order by 1 desc

    and subtracting a number of months from the single...

  • Viewing 15 posts - 451 through 465 (of 1,468 total)