Forum Replies Created

Viewing 15 posts - 1,231 through 1,245 (of 1,554 total)

  • RE: Creating a Database from a SP

    Could you explain a little more on why you want this packaged into a stored procedure? I don't quite see the point of it, if practically everything else is already...

  • RE: real newie on derived columns

    You can also place the CASE in the ON clause directly:

    select *

    from #t1 t1

    join #t2 t2

    on t1.col1 = case t2.col2

        when 187

         then 95

        when 197

        then 93

        else 1

       ...

  • RE: Using WMI objects from TSQL

    Well, ADO is just fine if you want to do it from a 'client-side'. If you wanted to do from within Transact SQL, then I'd probably use xp_cmdshell...

    Personally, I'd...

  • RE: Bizarre Result Set

    Here's a quick demo showing the 'flawed' logic.

    create table #t (id int not null, batch char(1) null, arch datetime null )

    insert #t select 1, null, null

    insert...

  • RE: Bizarre Result Set

    Hmmm.. well.. if you take a closer look at this formulation: (batch is not null or batch != '')

    What you ask for here is the count of all rows...

  • RE: Bizarre Result Set

    What is the count if you ask like this?

    select count(*) from Table_T where datearchived is null and ISNULL(batch, ' ') < > ' '

    (remember there is a difference between ' ' and '' - space...

  • RE: Get Previous Date

    Nah, I didn't tell you to not jump in, just not to answer the 'hand up' quiz to your own post. *grins*

    /Kenneth

  • RE: Complex Stored Procedure

    That's true - didn't think of that (tnx Frank )

    To expand on the 'trick' I described (and where quotename() won't help) - another...

  • RE: Using WMI objects from TSQL

    Why not just run the wmi script through xp_cmdshell, have it output to disk, and then stuff that output into a table..? (probably needs some clever parsing, but you don't...

  • RE: excluding fields in my SELECT from the GROUP BY clause

    Hi there.

    Well, I can't begin to try understanding what is going on, or the purpose of it all, however it seems like there's a lot of calculations, searched cases and...

  • RE: Complex Stored Procedure

    The problem that may arise when nesting in doublequotes and escaping quotes and whatnot, is that the code quickly becomes very hard to read (and therefore also to debug)

    A 'trick' you...

  • RE: Get Previous Date

    Then I might as well explain a litle further why I asked the question the way I did 

    As I said earlier in the thread, I...

  • RE: Alter Column - Not NNULL failed

    Thing is EM doesn't always 'get the job done' due to what EM does. In cases like Frank mentions, imo that's failng the job, if EM takes unnecessary time and...

  • RE: Update Top 1

    Of course I don't know your data as you do, but.... I must stress my point here.

    I just want to make sure that you do realize that by doing...

  • RE: Get Previous Date

    If you read closer, you'll notice that the conversion is on the parameter side, not the column itself - so indices will likely get used. It's the other way around...

Viewing 15 posts - 1,231 through 1,245 (of 1,554 total)