Forum Replies Created

Viewing 15 posts - 6,961 through 6,975 (of 7,613 total)

  • RE: Phone numbers in a Help Desk application

    GilaMonster (1/3/2013)


    kwoznica (1/2/2013)


    You also wrote

    You have a singular “phone_contact” table name!! ONLY One?!

    I take that this is a suggestion to make the phone_contact table a wider table to...

    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: Quert regarding getting the results based on months.

    CELKO (1/2/2013)

    Since SQL is a database language, we prefer to do look ups and not calculations.

    That "we" is undefined and thus meaningless. But people who have to write...

    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: Null vs ''

    If you're providing data for report or any type of BI application, remove NULLs entirely. NULLs cause serious and severe logic considerations that most people don't fully understand (including...

    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: i want to add column in exiting view

    dan-572483 (1/2/2013)


    If all the queries in combined by the UNION statement are quering the same table (or differenet tables but the coumn names are the same), then you shoudn't need...

    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: Need some help with a query

    SELECT

    OccurrenceReport.OccurrenceDate,OccurrenceReport.TimeOfOccurrence,OccurrenceReport.Floor,OccurrenceReport.Description,

    OccurrenceReport.Injured,OccurrenceReport.FDNY,OccurrenceReport.FalseActual,OccurrenceReport.FPManager,

    OccurrenceReport.DateSigned,OccurrenceCauses.Cause,

    Emp.LastName + ', ' + Emp.FirstName as "EmployeeName",

    FireM.LastName + ',...

    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: SELECT * INTO Table without propagating IDENTITY attribute?

    Please try this:

    SELECT *

    INTO dbo.newtable

    FROM dbo.oldtable_with_identity

    UNION ALL

    SELECT TOP (1) *

    FROM dbo.oldtable_with_identity

    WHERE 1 = 0

    The identity property should be left off the column in the new table :-).

    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: i want to add column in exiting view

    CELKO (12/27/2012)


    All queries combined using a UNION, INTERSECT or EXCEPT operator must have an equal number of expressions in their target lists."!

    The term for this is "union compatible" and it...

    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: Record locking

    You could also add an "in-use" column to each row which is set when someone accesses it, and unset when they close it and/or after a certain period of time...

    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: how to fetch records from multiple tables

    CELKO (12/31/2012)


    That seems to imply that someone can change his/her SSN at will. I don't believe that's true.

    Yep, you can. And thanks to identity theft this is becoming more...

    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: Record locking

    MS provides "sp_getapplock", and the corresponding "sp_releaseapplock", to help you do this. With them, you can leverage SQL's already-built-and-tested locking mechanisms for your own logical locking. You also...

    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: Keeping all three environment(Dev,Stag,Prod) in sync

    Jeff Moden (12/29/2012)


    Wouldn't truncating a table in QA violate the idea of keeping all 3 environments in sync? Presumably, keeping all 3 enviroments in sync really means keeping Dev...

    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: Keeping all three environment(Dev,Stag,Prod) in sync

    John Mitchell-245523 (12/31/2012)


    ScottPletcher (12/28/2012)


    I would never try to re-run the prod processes to get the data for other environments. That would be a nightmare to keep clean.

    That's how we...

    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: how to fetch records from multiple tables

    Jeff Moden (12/28/2012)


    Sean Lange (12/28/2012)


    First of all, SSN have and will be reused. When people die their SSN gets recycled into the available pool.

    While it is true that 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: Keeping all three environment(Dev,Stag,Prod) in sync

    Jeff Moden (12/28/2012)


    wannalearn (12/27/2012)


    Thank you all for your responses.

    We can not use Log Shipping because Our databases do not store transactions. We load data everynight from different sources ....

    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: how to fetch records from multiple tables

    CELKO (12/28/2012)


    Surely there's some good SQL programmers out there doing exactly what CELKO says they do not do.

    I have been at this for 25+ years now and I...

    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 - 6,961 through 6,975 (of 7,613 total)