Forum Replies Created

Viewing 15 posts - 1,171 through 1,185 (of 1,216 total)

  • RE: Can I stop this from Table scanning ?

    Hi Wayne,

    BETWEEN in itself does not force a table scan. You can check that in Query Analyzer - if the column is indexed, and enough values lie outside the specified range,...

  • RE: Question of the Day for 26 Jan 2004

    Well, it maybe wasn't the best way to ask, but in fact the question says precisely what "expected" means :

    The expected outcome of this should be to lower the price of the...

  • RE: sp_helprotect problem

    Hi Jonas,

    could you post the statement that's causing error? If it is just "sp_helprotect udfUSR_PermissionListByEmployeeID", I don't know what the problem could be.

    I tested various possibilities and got the same...

  • RE: query optimization\

    Hm... I understood the original query differently - according to parentheses the second part of condition /i.e. (REGISTERED_ID=(select ID from IDTABLE where EMAIL_ADDRESS='key1'))/ should always be applied.

    That makes it...

  • RE: optimizing query

    Well... if you copied the query here correctly, then "select from" is wrong - you have to specify what to select (e.g. select ID from ...). However, IMHO such query...

  • RE: Update Or?

    Hi Steve,

    I'm still not sure I understand what you need to do... but I'll try.

    To update just one independent table:

    UPDATE dbo.table

    SET c_alias = 'Test'

    WHERE c_alias IN ('Work', 'Book', 'Event')

    This simply...

  • RE: Stored Procedure Output As Field Value

    Do you mean to 'embed' the procedure into the query as one of the result fields? That can't be done, AFAIK, but if you start the procedure before you start...

  • RE: optimizer not using indexes

    Hi,

    your DB is much bigger than the one we are working with - we have a maximum of about 20 million records in a table - so I'm not sure...

  • RE: SQL help needed!

    Well, I'd go either for the Jonathan/NPeeters idea, or I'd try this to see which will perform better on your DB:

    SELECT m.PKCol, m.email, (select count(tbMembers.PK) from tbMembers where tbMembers.zipcode =...

  • RE: Will T-Log disc damage cause DB crash?

    Hi Jennifer,

    Just to give you general overview: we have a 90 GB database with occasionally rather high activity (updates or inserts of 300.000+ rows in one transaction etc.) and our...

  • RE: SQL aggregates including missing dates

    Oops.. I shouldn't reply when I don't have enough time to think about what I'm writing. Thanks for correction, Jonathan+David, of course you're right - and...

  • RE: IAM Page Out of Range

    quote:


    Is it possible for a restored database that registers clean on the DBCC CHECKDB chart to contain incipient corruption that will shortly...

  • RE: SQL aggregates including missing dates

    count(i.invoice_date) eliminates all NULL values in the field i.invoice_date, that is, all days without invoices. Try count(*) instead, that should help.

    BTW, one of the reasons why I proposed a date...

  • RE: SQL aggregates including missing dates

    Hello Jay,

    as far as I can remember, there were several such questions not long ago - if you search the forums, you'll probably find the answer quickly. Just in a...

  • RE: Lowest amount of the combination

    It is rather hard to understand, but I think a begin to see a light.. though I'm still only guessing.

    "The lower level can goto the upper level but upper level...

Viewing 15 posts - 1,171 through 1,185 (of 1,216 total)