Forum Replies Created

Viewing 15 posts - 5,311 through 5,325 (of 7,613 total)

  • RE: Size of Data Roadblocks

    xsevensinzx (3/10/2015)

    GilaMonster (3/10/2015)


    Partitioning is not done for performance reasons. It's for data management, fast loads and fast deletes. It won't necessarily improve performance, it may, in fact, reduce performance. If...

    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: Convert Varchar to Time

    SELECT *

    FROM ( --[SMF_DATA].[dbo].[System_Management_Facility]

    SELECT CPUTM = '335:55:20.97',

    CPUZIPTM = '0:00:01.96'

    ) AS test_data

    WHERE

    (LEFT(CPUTM, CHARINDEX(':', CPUTM) -...

    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: Size of Data Roadblocks

    If the table is already clustered on time (hooray!), then reading a week's worth of data shouldn't take that long.

    We need to review two things (at least).

    First, the query code...

    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: Converting the datatype of a computed column

    Would need to see the specific cast and data values to be sure, but most likely the whole decimal places weren't large enough to hold the character value.

    For example, 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: Joining on a table with a Unique Clustered Index

    If you want an index to be unique, you must explicitly specify that in SQL. You should also always explicitly specify the proper fillfactor and filegroup (even if 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: replace() remove the last character of some values

    SQL_NuB (3/4/2015)


    Jeff Moden (3/4/2015)


    What's wrong with just doing a replacement?

    UPDATE tgt

    SET Family = REPLACE(Family,'--','')

    FROM dbo.yourtable

    WHERE Family LIKE '%--%'

    ;

    there are 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: Dynamic Return type in a function

    In order to accept and return differing data types, you'd have to use sql_variant, which will affect how easily you can use the value returned by the function:

    CREATE FUNCTION [dbo].[fnchkNull]...

    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: Job to run more than one job in order

    Removed, duplicate post.

    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: Job to run more than one job in order

    Removed, duplicate.

    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: Job to run more than one job in order

    The initiating job is going to have to start the first job, then wait until that job finishes, then start the next job, etc..

    You could set up full messages using...

    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: CONVERT and CAST question?

    CREATE VIEW ...

    AS

    SELECT ..., LEFT(useremail, CHARINDEX('@', useremail + '@') - 1) AS , ...

    FROM existing_table

    --WHERE ...

    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: ?? on a CASE within a WHERE ??

    WHERE

    ((@Units = 'Yes' AND USER_DEFINED_DATA.CAD213 = 'on') OR

    (@Units = 'No' AND USER_DEFINED_DATA.CAD214 = 'on') OR

    (@Units...

    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: replace() remove the last character of some values

    LEFT(family, CHARINDEX('--', [family] + '--') - 2)

    Edit: Added the "- 2".

    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: Backup Maintenance Plan Issue

    It depends. If the login running the job has sysadmin authority, the job will run as the SQL Server Agent service account. If not, the job will run...

    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: Backup Maintenance Plan Issue

    It's a security issue. The account that the maintenance plan is running under does not have the relevant authority for that drive, but the account you run under does.

    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,311 through 5,325 (of 7,613 total)