Forum Replies Created

Viewing 15 posts - 7,561 through 7,575 (of 7,612 total)

  • RE: I got burned today at a SQL Server Interview!

    First, 100% on the honesty thing. I would detect you and not hire you. Moreover, I would add you to my personal file of "never hires". Just...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Beginning Database Design - Spot the Flaws

    Hmm, but happens if/when your requirements change and a table that was a "prime" table becomes an intersection table, or vice versa? Do you go back thru and rename...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Beginning Database Design - Spot the Flaws

    Regarding table names, I now prefer singular but can live with plurals ... the main thing is consistency. Whichever you choose, use it thru-out, without regard to whether it's...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Beginning Database Design - Spot the Flaws

    I've read everything: interesting article and comments!

    FWIW, here's my take on a first-cut design *for just books* [personally I would adjust it to allow reviews on other objects -- such...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Time and day of week (BETWEEN) question

    I need to find the record in the DB that has a start time >= the time of my call and on or after the day of the week...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: hostel reservation system

    I think you need to check the current date instead of automatically using s.enddate in the calcs. For example:

    DATEDIFF(DAY, s.startdate, CASE WHEN GETDATE() < s.enddate THEN GETDATE() ELSE s.enddate...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: SQL 2000 vs. 2005 T-SQL output results vary

    Essentially, @tbl is not getting populated with the first "insert to @tbl"

    The INSERT will not, and should not, be reflected in the table until the statement has finished....

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Set SysProcesses.Program_Name from OSQL or T-SQL?

    If it's not running from SQL, how does it even have a spid?  I thought spid was used by SQL, kpid was used by Windows.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Set SysProcesses.Program_Name from OSQL or T-SQL?

    >> I'm pretty sure that when OSQL is used, any procs called by it are given the same spid. <<

    Yes, of course. 

    But the osql task itself will have a...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Can anyone think of a good reason for NOT having a PK?

    The index should be on the search column(s), not on an id column.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Can anyone think of a good reason for NOT having a PK?

    Yes, if you want to add an index to a small table, and you should for many of them, always make it a unique, clustered index.  For example, for the sample...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Set SysProcesses.Program_Name from OSQL or T-SQL?

    I thought the osql was a separate process and so would get its own spid.  How will you know which row in the table the child process needs to get?

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: REPLICATE() beyond 8000 bytes

    Probably easiest is to do something like this (handles up to 24000, assuming PRINT can handle that):

    print space(@hangingIndent) + replicate(@startCharacter, CASE WHEN @widthOfPattern > 8000 THEN 8000 ELSE @widthOfPattern END)...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Can anyone think of a good reason for NOT having a PK?

    >> I suggest you make them both nonclustered indexes. Your inserts and queries will move along alot faster. <<

    That depends on the queries.  For example, if you always specify a...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: New Column Updates

    Very interesting article, definitely worth seeing.

    Btw, though, shouldn't the columns be NCHAR(2) instead of NVARCHAR(2)?  It's a waste of space and processing overhead to make a 2-byte column variable.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

Viewing 15 posts - 7,561 through 7,575 (of 7,612 total)