Forum Replies Created

Viewing 15 posts - 7,081 through 7,095 (of 7,613 total)

  • RE: switching address with Subtring & len funtion

    Eugene Elutin (11/20/2012)


    ScottPletcher (11/20/2012)


    select PARSENAME(left(email, charindex('@', email) - 1), 1) + '.' + PARSENAME(left(email, charindex('@', email) - 1), 2) +

    substring(email, charindex('@', email), len(email))

    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: switching address with Subtring & len funtion

    select

    PARSENAME(left(email, charindex('@', email) - 1), 1) + '.' +

    PARSENAME(left(email, charindex('@', email) - 1), 2) +

    substring(email, charindex('@',...

    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: Performance Issue

    SQL Server has frankly always had some internal issues with parallelizing queries. Parallelization is great for (re)building indexes, but for queries it's always had its quirks.

    Unless you are absolutely...

    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: Dependent Delete statements

    delete from #ExistingBackups

    where

    (Name not like '%master%' and Name not like '%model%' and Name not like '%msdb%') or

    (ISNUMERIC(Right(SUBSTRING(name,1,charindex('.',name)-1),8))=0) or

    ...

    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: Grant execute on all Stored Procedures in specific DB's?

    ahthomas (11/19/2012)


    How do I grant (in the quickest simplest way) execute on all stored proc's in a database? I have a few to do this to, but not all on...

    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: Which information can i log when i use Change Data Capture

    ocolakoglu (2/8/2011)


    Hi

    When i use change data capture can i log hostname,username information?

    You can use any columns from the original table you want ... but that's it.

    So to capture that...

    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: trouble creating job to build index script

    fluffydeadangel (11/19/2012)

    my simple goal is to create a two part job that will reindex only the items that need it ...

    select 'ALTER INDEX ALL ON dbo.' ... 'FILLFACTOR = 80'...

    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 track of the number of times a record appears in query results

    Other than the final ORDER BY, I think the query below will do it.

    Personally, I wouldn't rewrite your existing query any more than you have to to make it do...

    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 remove characters char(0) to char(31)

    I too think nested REPLACEs would probably be fastest.

    You could do a simple function, but I'm not sure that would perform as well, let alone better ... but, really, with...

    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: Identity column reseed cause problem with other database

    No, normally you never change an identity/key value in a warehouse once it's been assigned. I can't imagine anything that would require that to be done, so it's very...

    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: Identity column reseed cause problem with other database

    No, normally you never change an identity/key value in a warehouse once it's been assigned. I can't imagine what would require that to be done.

    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: Local variable and Try/Catch conundrum

    The TRY block will be fully parsed and begin execution before the CATCH block is processed, so, yes, all variables in the TRY block will be made available to 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: How many rows in a table before using a clustered index?

    Bobby Glover (11/9/2012)


    Praise the lord for this post. I have the same issue 1000 tables 750 are heaps, the wierd thing is they have NON-CLUSTERED PKs in all the tables....

    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: Production table - Need to Alter 4 existing columns and increase the size and precision

    To be safe, you probably want to add the length of the clustering key to the column to be ALTERed.

    So, for example, if the clus key is 4...

    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: Text To Decimal Values

    ScottPletcher (11/8/2012)


    AndrewSQLDBA (11/8/2012)


    Update to Original post

    I just saw some of the data as only 3 digits. So 499 would need to be converted to 499.00 etc.....

    There may also be...

    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,081 through 7,095 (of 7,613 total)