Forum Replies Created

Viewing 15 posts - 4,501 through 4,515 (of 7,619 total)

  • RE: Script to compare schema across databases?

    Some third-party vendors offer such tools. Naturally all -- or at least most -- of them cost money.

    MS provides the tablediff utility, which is free. It's command-line only,...

    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: Query Help

    SQLisAwE5OmE (1/11/2016)


    ScottPletcher (1/11/2016)


    I would think it would be something like below.

    Note: I assumed from the context that you need to match only the *child's* birthday, even though you said "all...

    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: Loop through an IN() clause?

    It seems you want to see a tester that has never performed a check on a given part id, not just for the first/last check.

    If so, I think you could...

    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: Query Help

    I would think it would be something like below.

    Note: I assumed from the context that you need to match only the *child's* birthday, even though you said "all members". ...

    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: Table-Valued inputs for stored procedures

    You could also, of course, instead simply insert the values from the tvp into a properly clustered temp table, and then process using the temp 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: Calculate future dates which excludes weekends and holidays for few columns

    azawan (1/8/2016)


    @scot-2

    Dear Scot same results

    When I run the exact code I posted above, I get these results:

    start_dateFuture1_Datefuture2_datefuture3_datefuture4_date

    2016-01-012016-02-052016-03-032016-04-272016-05-16

    2016-01-102016-02-142016-03-102016-05-042016-05-23

    2016-02-202016-03-262016-04-212016-06-152016-07-04

    2016-03-132016-04-172016-05-122016-07-062016-08-01

    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: Calculate future dates which excludes weekends and holidays for few columns

    azawan (1/6/2016)


    @scot-2

    Thanks for your reply

    After running your query i got below results

    start_dateFuture1_Datefuture2_datefuture3_datefuture4_date

    2016-01-012016-02-05 2016-02-05 2016-02-05 2016-02-05

    2016-01-102016-02-14...

    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: Calculate future dates which excludes weekends and holidays for few columns

    azawan (1/5/2016)


    Dear Scot

    First thanks for your reply, i am getting following error message

    Msg 8116, Level 16, State 1, Line 8

    Argument data type date is invalid for argument 2 of dateadd...

    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: Calculate future dates which excludes weekends and holidays for few columns

    azawan (1/5/2016)


    Dear Scot

    First thanks for your reply, i am getting following error message

    Msg 8116, Level 16, State 1, Line 8

    Argument data type date is invalid for argument 2 of dateadd...

    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: Calculate future dates which excludes weekends and holidays for few columns

    I can't use an inline tally table because a filter at work blocks it, so I'm using a physical tally table. The table is named "tally" and its 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: Thoughts on a way to improve performance of the "Update Top 100" query.

    I just noticed the OR condition on only status. That will force a table scan regardless. But I'd still like to see the actual query plan.

    Btw, are 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: Thoughts on a way to improve performance of the "Update Top 100" query.

    You should cluster this table on ( ProcessDate ) or ( ProcessDate, SOID ) if you want to insure the index is unique. You can create a separate nonclustered...

    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: Index rebuilding

    I guess I wasn't clear enough. The idea is shrinking other databases on the same drive set(s) to free disk space, not on the db that needs the index...

    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: Create temporary table from output of dynamic SQL

    You can create a non-temp table in tempdb.

    CREATE TABLE tempdb.dbo.table_name ( ... )

    That table will go away only when you explicitly drop 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: Help with a query, plz

    SELECT DISTINCT females_only.*

    From dbo.vw_csys_NurserySchool

    Cross Apply (

    SELECT Parent1_id, Parent1_FullName, Parent1_Email, Parent1_STATUS, Parent1_Gender, YEAR, FULL_ADDRESS

    WHERE Parent1_Gender = 'F' AND CATEGORY <> 'STF'

    UNION

    SELECT Parent2_id, Parent2_FullName, Parent2_Email, Parent2_STATUS, Parent2_Gender,YEAR, FULL_ADDRESS

    WHERE Parent2_Gender = 'F' AND...

    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 - 4,501 through 4,515 (of 7,619 total)