Forum Replies Created

Viewing 15 posts - 7,111 through 7,125 (of 7,608 total)

  • RE: many to many relations

    lak.konduri (10/21/2012)


    I have one table and the columns are bookingreference,complaintreference,category1,category2,desriptionofthecomplaint,

    one bookingref have one complaintid,

    one complaintid have many bookingreferences,

    one complaintid have many categories and one category have many complaintid,

    one complaintid have...

  • RE: Identity column and the seed

    The seed value -- rather than seed + 1 -- is the identity value that will be assigned to the first row inserted into the table.

    So, if you want the...

  • RE: design database

    I agree, this is way too big for a quick question.

    I'd also be willing to bet that much of what they gave you is objectively not designed very well, if...

  • RE: Dynamic SQL to change Recovery Model

    I'd also suggest changing the:

    WHERE recovery_model_desc != 'simple'

    to:

    WHERE recovery_model_desc != N'simple' AND state_desc = N'ONLINE'

    You're just wasting time trying to change the db's recovery model if it isn't ONLINE.

  • RE: To sharpen the Query Logic

    Look for books and articles by Itzik Ben-Gan; his stuff on T-SQL is superb.

  • RE: How do you admin your databases?

    I'm a DBA, so yes I use SSMS to get to all my servers. Indeed, I have groups of servers so that I can run the same command on...

  • RE: Output String for bit value

    The straightforward way is:

    SELECT

    CASE WHEN column_name = 0 THEN 'FALSE' ELSE 'TRUE' END AS column_name

    The "avoid a CASE at all costs" way is:

    SELECT

    ...

  • RE: UNIQUEIDENTIFIER vs BIGINT

    Grant Fritchey (10/11/2012)


    ScottPletcher (10/11/2012)


    Grant Fritchey (10/11/2012)


    ScottPletcher (10/11/2012)


    Grant Fritchey (10/11/2012)

    As an aside, the CHAR(2) would be a really poor choice for the first column in a compound key. You'd want to...

  • RE: UNIQUEIDENTIFIER vs BIGINT

    Grant Fritchey (10/11/2012)


    ScottPletcher (10/11/2012)


    Grant Fritchey (10/11/2012)

    As an aside, the CHAR(2) would be a really poor choice for the first column in a compound key. You'd want to use either the...

  • RE: UNIQUEIDENTIFIER vs BIGINT

    Grant Fritchey (10/11/2012)

    As an aside, the CHAR(2) would be a really poor choice for the first column in a compound key. You'd want to use either the INT or the...

  • RE: please help with query

    Here's an alternative:

    SELECT u.*, n.ID, n.notes

    FROM UserTable u

    INNER JOIN Notes n ON

    (u.lastaccounttype = 'account1' AND n.account1 = 1) OR

    (u.lastaccounttype = 'account2' AND...

  • RE: Data file Autogrowth question

    No. Autogrow can be changed anytime, on either data or log, and will be used the next time the file grows dynamically.

    But I suggest using a fixed amount instead...

  • RE: UNIQUEIDENTIFIER vs BIGINT

    I know you want some specifics that you can apply to creating all indexes on all tables, but there really aren't any.

    There are some general rules for creating proper indexes,...

  • RE: UNIQUEIDENTIFIER vs BIGINT

    If you're going to search by Col1 and Col4, then, in general, put them first in the index, to narrow the row range immediately as much as possible.

    I didn't say...

  • RE: UNIQUEIDENTIFIER vs BIGINT

    The nvarchar(20) does make that a problematic clustering key, but it still depends.

    A three-column is not slower to do lookup on if that's what you (almost) always specify in the...

Viewing 15 posts - 7,111 through 7,125 (of 7,608 total)