Viewing 15 posts - 5,296 through 5,310 (of 7,597 total)
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) -...
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...
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...
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...
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...
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]...
March 4, 2015 at 3:28 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...
March 4, 2015 at 3:01 pm
CREATE VIEW ...
AS
SELECT ..., LEFT(useremail, CHARINDEX('@', useremail + '@') - 1) AS , ...
FROM existing_table
--WHERE ...
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...
March 4, 2015 at 2:49 pm
LEFT(family, CHARINDEX('--', [family] + '--') - 2)
Edit: Added the "- 2".
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...
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.
March 3, 2015 at 9:23 am
Luis Cazares (3/3/2015)
Do you mean at the date of the appointment?
SELECT *
FROM TEST
WHERE DOB BETWEEN DATEADD(YYYY, -5, ApptDt2) AND DATEADD(MM, -6, ApptDt2)
Wouldn't you actually need - 6 years + 1...
March 3, 2015 at 9:22 am
Viewing 15 posts - 5,296 through 5,310 (of 7,597 total)