Viewing 15 posts - 5,311 through 5,325 (of 7,613 total)
xsevensinzx (3/10/2015)
GilaMonster (3/10/2015)
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".
March 10, 2015 at 11:43 am
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".
March 10, 2015 at 9:17 am
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".
March 10, 2015 at 9:04 am
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".
March 10, 2015 at 8:58 am
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".
March 9, 2015 at 10:51 am
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".
March 4, 2015 at 3:35 pm
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".
March 4, 2015 at 3:28 pm
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".
March 4, 2015 at 3:02 pm
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".
March 4, 2015 at 3:02 pm
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".
March 4, 2015 at 3:01 pm
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".
March 4, 2015 at 2:52 pm
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".
March 4, 2015 at 2:49 pm
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".
March 4, 2015 at 2:44 pm
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".
March 3, 2015 at 9:38 am
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".
March 3, 2015 at 9:23 am
Viewing 15 posts - 5,311 through 5,325 (of 7,613 total)