Forum Replies Created

Viewing 15 posts - 2,686 through 2,700 (of 6,036 total)

  • RE: cursor within a cursor - second cursor needs a loop

    Simple query will do it.

    Something like this:

    SELECT *

    FROM Details D

    INNER JOIN Eligibility E ON D.[Service Date] BETWEEN E.[From Date] AND E.[To Date]

    No cursors needed.

  • RE: Calculate pmt in t-sql (like excel)

    Jeff Moden (1/17/2009)


    If I were doing mortgage calculations, and let's assume that the max limit on the mortgage were, say, ummm... a penny less than a billion dollars... which would...

  • RE: Calculate pmt in t-sql (like excel)

    Scott T (1/16/2009)


    As you can see the results it's not matching. 😉 Well it's up to you know to make a decision.

    -------------------------------------------------------------------

    In science there is no space for someone's decisions.

    You...

  • RE: Calculate pmt in t-sql (like excel)

    Scott T (12/30/2008)


    For any math calculation avoid FLOAT use Decimal you will get Write result.:D

    DECLARE @One decimal, @Three decimal

    SET @One = 1

    SET @Three = 3

    SELECT @One/@Three + @One/@Three + @One/@Three

    Is...

  • RE: Date Range of Week

    SELECT MIN(Date), -- use some formatting here if you need it

    MAX((Date), -- again, format the string to the requirements

    ...

  • RE: duplicate data

    You should replace "{Unique Key}" with column(s) which intend to hold unique values.

    In your case it's probably TowID, but you should know better.

  • RE: duplicate data

    ps, your solution will delete only part of candidates.

    If there are 3 identical rows it will leave 3rd row in the table.

    Try this:

    DELETE R

    FROM [tower].[NBDocUpdatedRecords] R

    LEFT JOIN ( select MIN(ReplicationID),...

  • RE: how to Split DateTime value in seprate date and time column

    Jason, what you describe in your lost post is presenting datetime values in different string formats.

    It has nothing to do with splitting date and time parts.

    And solution in SQL2k is...

  • RE: Order by numbers in proper sequence

    Janette,

    Problem is: my solution

    ORDER BY AlphanumericValue

    works perfectly for the dataset you provided:

    100

    101

    102

    etc...

    Wanna better answer - take some care about asking better question.

  • RE: Order by numbers in proper sequence

    dejanette.gordon (12/17/2008)


    How do you sort alphanumeric data in sequential order? I need the data to go from:

    100

    101

    102

    etc...

    The answer is:

    ORDER BY AlphanumericValue

  • RE: Order by numbers in proper sequence

    dejanette.gordon (12/17/2008)


    I have a query where the datatype I'm ordering by is varchar(10) but when I use the ORDER BY the values come out like this: How do I work...

  • RE: how to Split DateTime value in seprate date and time column

    Jason White (12/17/2008)


    I simply choose to tweak the views. Thus I need to split the date and time and make them separate fields.

    So, you change the views.

    Absolutely fine.

    But where...

  • RE: Referencing and sorting by calculations

    Even less calculations:

    select

    OrderID,

    OrderDate,

    ShippedDate,

    RequiredDate,

    ShippingWindowDays,

    OrderWindowDays

    ...

  • RE: triggers

    Just don't update what does not need to be updated:

    update [my_table]

    set [row_uid] = newid()

    ...

  • RE: Nesting level increases by 3 and causes error

    PeterTL (12/16/2008)


    Recursive problems require recursive actions. So...

    If you don't know other way it does not mean there is no other way.

Viewing 15 posts - 2,686 through 2,700 (of 6,036 total)