Forum Replies Created

Viewing 15 posts - 58,501 through 58,515 (of 59,053 total)

  • RE: New SQL Queries Are Coming To Town

    An interesting mix of delight and pain... sort of like sweet-and-sour sauce with a generous dose of horse-radish... and I love horse-radish!

    And thanks for all you do behind the scenes,...

  • RE: Banker''''s rounding in T-SQL (like Math.Round in .NET)

    Andrew... This also works... and, it's set based.... just substitute a column name for @Number in the formula...

    -- Math.Round(3.454,2) -> 3.45

    -- Math.Round(3.455,2) -> 3.46

    -- Math.Round(3.445,2) -> 3.44

    -- Math.Round(3.456,2)...

  • RE: Banker''''s rounding in T-SQL (like Math.Round in .NET)

    If you mean round to the nearest whole number, then simply converting to INT will do...

    DECLARE @Amount1 MONEY

        SET @Amount1 = 7.49

    DECLARE @Amount2 MONEY

        SET @Amount2 = 7.50

    DECLARE...

  • RE: Split a column into multiple columns and insert results into table

    You bet... Merry Christmas.

  • RE: Split a column into multiple columns and insert results into table

    You are new at this...

    Try this, Josh...

       UPDATE yourtable

          SET Name = RTRIM(SUBSTRING(Subject,1,CHARINDEX('#',Subject,1)-1)),

              Paid = RTRIM(SUBSTRING(Subject,CHARINDEX('#',Subject,1),

                                             CHARINDEX('$',Subject,1)-CHARINDEX('#',Subject,1))),

            Amount = RTRIM(SUBSTRING(Subject,CHARINDEX('$',Subject,1),

                                             CHARINDEX('/',Subject,1)-CHARINDEX('$',Subject,1))),

           CheckNo = RTRIM(SUBSTRING(Subject,CHARINDEX('/',Subject,1)+1,999))

         FROM yourtable

    And, let's hope...

  • RE: MSDE Question

    I'm thinking... REFRESH, REFRESH, REFRESH again.

  • RE: Split a column into multiple columns and insert results into table

    Assuming that the column you are parsing is called "ParseThis" and your table name is called "yourtable", this will work PROVIDED that you always have all 4 parts...

     SELECT...

  • RE: option (KEEPFIXED PLAN) working in 2005??

    No, but I'm thinking that this is "Death by SQL" of the same magnitude as disabling the automatic recalculation of statistics.

  • RE: Float or decimal

    "Books Online" describes both FLOAT and REAL as follows:

    "Approximate number data types for use with floating point numeric data. Floating point data is approximate; not all values in the data...

  • RE: Best way to identify the first SAT of a month

    If your job only runs on Saturday, then you've done it the most efficient way.

  • RE: Copying files using T-SQL

    Carl, sometimes there's just no application to be had... SQL is it.

    Mark, the reason you are getting the error is that you must either have SA permissions or your DBA...

  • RE: Find missing numbers in sequential column

    Very cool, jratwork... I have a similar un-natural aversion to correlated subqueries and I had my doubts when I saw the "<" in the correlated subquery... but I just ran...

  • RE: Reg Help with DB2 query

    First, this isn't a DB2 forum and not all SQL's are created equal.  That, notwithstanding, you say "it didn't work"... if you got an error message, is sure would be...

  • RE: dynamic stored procedure question

    "Online AnonProfile" seems a bit paranoid as a "handle" to me ... whatever...

    This little ditty should help you in your quest for primary...

  • RE: check constraint???????

    You can't do this with a constraint... you'll need to use a trigger or, maybe, you can also try a "calculated column".

Viewing 15 posts - 58,501 through 58,515 (of 59,053 total)