Forum Replies Created

Viewing 15 posts - 3,421 through 3,435 (of 6,037 total)

  • RE: Adding workdays

    Greg Snidow (10/19/2007)


    I gues that makes sense. I have a very small database, so I have not really ever considered overhead costs of doing things. Got any suggestions...

    _____________
    Code for TallyGenerator

  • RE: how to remove numbers from strings?

    Matt Miller (10/19/2007)


    I figured that was the general direction you were heading in. A lot of that's improved with the newer updates to the framework. Certainly after them...

    _____________
    Code for TallyGenerator

  • RE: Adding workdays

    Greg Snidow (10/19/2007)

    Sergiy, wouldn't it be possible to have a small table of only hollidays, and if @DateEnd falls on one of those days just add 1?

    Bloody site!

    Wiped out...

    _____________
    Code for TallyGenerator

  • RE: Adding workdays

    Funny story guys is that your UDF's don't work.

    No matter how hard you try to perfect it.

    They don't work by definition.

    And nobody can do anything about it.

    At least they don't...

    _____________
    Code for TallyGenerator

  • RE: How to rewrite a LEFT OUTER JOIN query?

    Sorin,

    Your query returns columns only from table "s".

    Why you need those joins at all?

    _____________
    Code for TallyGenerator

  • RE: Adding workdays

    Jeff Moden (10/18/2007)


    Ah... sorry, it doesn't work as expected... it includes weekends which is what Greg is trying to exclude... in terms of your example, he wants to add 30...

    _____________
    Code for TallyGenerator

  • RE: How to use a constant value in select query in a view definition

    Another name for "View with parameters" is "Table function".

    _____________
    Code for TallyGenerator

  • RE: Adding workdays

    BTW, my Tally table holds 65k dates, it's the whole range of "smalldatetime" dates.

    So, "Working Days" table contains 65k - 14 rows.

    _____________
    Code for TallyGenerator

  • RE: Adding workdays

    Jeff Moden (10/18/2007)


    Heck of a good try... but still a bit of RBAR there... looks almost like a date table but limited to 365 days. No doubt it works...

    _____________
    Code for TallyGenerator

  • RE: sum(float) != sum(float)

    Jeff Gray (10/16/2007)


    I'm not pointing out anything other than the fact that the order in which the rows are added changes the result, thus suggesting that addition of floats is...

    _____________
    Code for TallyGenerator

  • RE: Apparent Error with BETWEEN operator

    [font="Courier New"]--Create 2 tables to hold normalized data

    IF Object_ID('dbo.PrefixCode', 'U') IS NOT NULL

    DROP TABLE dbo.PrefixCode

    CREATE TABLE dbo.PrefixCode (

    ID smallint IDENTITY(-32767, 1) NOT NULL PRIMARY KEY NONCLUSTERED,

    Code nvarchar(10) COLLATE SQL_Latin1_General_CP1_CI_AS...

    _____________
    Code for TallyGenerator

  • RE: Apparent Error with BETWEEN operator

    Jim Howell (10/18/2007)


    That could be the answer! In the real world, these numbers are barcoded on envelopes and we send and receive a couple hundred thousand a month. ...

    _____________
    Code for TallyGenerator

  • RE: How to rewrite a LEFT OUTER JOIN query?

    System functions are as bad here as UDFs.

    But it does not mean you cannot use functions in WHERE clause at all.

    You should not use it to modify values in table...

    _____________
    Code for TallyGenerator

  • RE: Auto Column Check

    Lowell (10/18/2007)


    i don't think you can use a calculated column in this case, because the penalty amount resides in a different table

    You can declare computed column using a function.

    And function...

    _____________
    Code for TallyGenerator

  • RE: Trying to understand SQL Server's handling of redeclared variables

    Kenneth Wilhelmsson (10/18/2007)No, there is no risk of memoryleaks or 'runaway' multiples of overwritten variables etc, since the declaration only happens once.

    There is only risk of fooling yourself.

    _____________
    Code for TallyGenerator

Viewing 15 posts - 3,421 through 3,435 (of 6,037 total)