Forum Replies Created

Viewing 15 posts - 5,611 through 5,625 (of 7,614 total)

  • RE: Find Values Like Field Values

    In theory, the code below would do what you've described.

    select t2.*

    from Table2 t2

    where

    exists(select 1 from table1 t1 where t2.detail like '%' + t1.ID +...

  • RE: tsql with out using cursors

    ZZartin (11/21/2014)


    g.britton (11/21/2014)


    ScottPletcher (11/21/2014)


    You don't "have" to do the FETCH twice. In fact, I never do that, because it's too error prone when the code is changed.

    good point, though...

  • RE: tsql with out using cursors

    g.britton (11/21/2014)


    ScottPletcher (11/21/2014)


    You don't "have" to do the FETCH twice. In fact, I never do that, because it's too error prone when the code is changed.

    good point, though the...

  • RE: Holidays and Business Days

    I use a different approach.

    I have a nonbusiness dates control table where one first defines the general and specific nonbusiness dates wanted. Then you call a stored proc with...

  • RE: tsql with out using cursors

    You don't "have" to do the FETCH twice. In fact, I never do that, because it's too error prone when the code is changed.

  • RE: Accidental DB Designer ;)

    He already has a partial design in place, I suspect his previous Developer left him with a few ideas, now he's asking if I can help him through.

    First, start over...

  • RE: SQL DBA knowing user passwords

    Jeff Moden (11/20/2014)


    ZZartin (11/20/2014)


    There's a difference between a service account login used by an application to connect, which a dba should know as the dba is likely the one who...

  • RE: SQL DBA knowing user passwords

    No, DBAs should not know and definitely not store end user passwords, period.

    App passwords are a different matter, and it can depend on the app. But stored passwords should...

  • RE: calculating working hours per day for week/month for each employee

    You can't calculate "work hours" without "in" and "out" markers. The work time calc is very easy if you a matching "out" for every "in".

  • RE: Moving Data to new Filegroup DOESN'T WORK

    In other words, you need to create a new table that explicitly specifies the clause:

    CREATE TABLE ... (

    ...

    TEXTIMAGE_ON [new_filegroup_name]

    ...

  • RE: Moving Data to new Filegroup DOESN'T WORK

    It's almost certainly the NTEXT that is the bulk of the data, and you can't move it without recreating the table entirely. Btw, you should change the ntext to...

  • RE: Get total from table Item: computed column or group by?

    No, that's true, but you could use it in a view.

  • RE: advancing dates

    I wasn't not sure what '20140601' was relative to the run date. Is it the current month, the next month, 6 months ago?

    Therefore, I used @month_1 to hold the...

  • RE: Improve Performance for a View

    swhetsell (11/20/2014)


    ScottPletcher (11/19/2014)


    Probably the big thing is to reduce all the gyrations around UnitLog. Please try the query below. If you tend to restrict UnitLog rows using fldDateTime...

  • RE: add string WHERE filter that will match everything

    NULL will never be "LIKE" or "=" anything. To allow NULL values, you'd have to add:

    WHERE (column_name LIKE '%' OR column_name IS NULL)

Viewing 15 posts - 5,611 through 5,625 (of 7,614 total)