Forum Replies Created

Viewing 15 posts - 5,041 through 5,055 (of 7,619 total)

  • RE: Relation between max degree of parallelism & no of CPU cores in a server

    MAXDOP controls whether a single query plan can be parallelized, and if so, to what extent. Other SQL tasks can, and usually will, still be running across the other...

    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: Join 2 reference values in one line ...

    Or use in-line subqueries:

    SELECT ID, OrderNumber,

    (SELECT MarketCenterCity

    FROM MarketCity

    WHERE MarketCityId = o.SrceMktId) AS SourceMKT,

    ...

    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 my database come back :(

    Ed Wagner (6/12/2015)


    Lynn Pettis (6/12/2015)


    ScottPletcher (6/12/2015)


    Your best chance might be to "unformat" the drive. Some formatting software makes provisions to do that. Of course the more you've overwritten...

    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: HELP - Database in Recovery Pending

    Again, add another log file to the db, and do it quickly. That should allow SQL to complete pending transactions. See my last post for additional details.

    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 use a INSERT statements to add the following two recipes into the database.

    We can't directly do homework or other coursework for you. However, we can give you general pointers.

    First you need to design tables to hold data. Each table should...

    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 my database come back :(

    Your best chance might be to "unformat" the drive. Some formatting software makes provisions to do that. Of course the more you've overwritten any part of the drive...

    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: HELP - Database in Recovery Pending

    Add another log file to the db. Put it on a drive with plenty of space. Allow SQL time to get caught up on log writes, and the...

    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 Maximum, using filelds from 2 tables

    drew.allen (6/11/2015)


    ScottPletcher (6/11/2015)


    You can't add Librarian id into the GROUP BY and accurately answer the query, since multiple librarians could have the same surname. You could pre-aggregate, but you...

    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 Maximum, using filelds from 2 tables

    You can't add Librarian id into the GROUP BY and accurately answer the query, since multiple librarians could have the same surname. You could pre-aggregate, but you must still...

    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 help for paaing table name and date as variable in dynamic sql

    I admit I can't imagine this type of proc being exposed to an external application or user. It seems much more internal to me, and thus the chance for...

    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 help for paaing table name and date as variable in dynamic sql

    Been busy today, but I think I've got the errors fixed now. I'm definitely not using XML and STUFF when a few simple functions will do. Just the...

    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 help for paaing table name and date as variable in dynamic sql

    ALTER PROCEDURE sampleprocedure

    @tablename AS varchar(4000),

    @date AS date

    AS

    SET NOCOUNT ON;

    DECLARE @query nvarchar(4000);

    SET @query = 'SELECT * FROM ' +

    ...

    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: Looking for clues on a performance problem

    Put in a query hint to force a HASH join. I'd rely more on that than on an ARITHABORT setting.

    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 help for paaing table name and date as variable in dynamic sql

    Lynn Pettis (6/10/2015)


    ScottPletcher (6/10/2015)


    Sorry, I was being lazy and didn't include checks for db name and schema:

    ALTER PROCEDURE sampleprocedure

    @tablename AS varchar(4000),

    @date AS...

    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 help for paaing table name and date as variable in dynamic sql

    Sorry, I was being lazy and didn't include checks for db name and schema:

    ALTER PROCEDURE sampleprocedure

    @tablename AS varchar(4000),

    @date AS date

    AS

    SET NOCOUNT ON;

    DECLARE...

    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 - 5,041 through 5,055 (of 7,619 total)