Viewing 15 posts - 6,076 through 6,090 (of 7,614 total)
What is the clustering key on the table?
May 14, 2014 at 8:30 am
If you just want the total hours, you don't need to return all the rows at all, simply total the time differences. This is very easy if there are...
May 14, 2014 at 8:29 am
In the Stores table, use a function to compute a persisted column that is the store name with all non-alphabetic characters stripped. Do the comparisons on that column, but...
May 14, 2014 at 8:25 am
To make sure you don't get a really poor plan, force SQL to recompile the query:
SELECT p.ProjectID, p.ProjectName, p.ProjectDescription
FROM tbl_Projects p
WHERE
p.ProjectID = @ProjectNumber
OPTION(RECOMPILE)
May 14, 2014 at 8:20 am
What is the clustering key on the table?
Can you determine a range of clustering key values for the rows you want to DELETE?
May 14, 2014 at 8:17 am
Full-text indexing would likely help you the most here.
May 13, 2014 at 4:45 pm
I don't think you actually need to go thru all those gyrations; instead, try this:
;WITH allstores(storeid, doc, article) AS(
SELECT 'ALL', '0010', '001' UNION ALL
...
May 13, 2014 at 4:43 pm
Looks reasonable to me. I don't see a "better" way.
May 13, 2014 at 4:35 pm
SELECT
ProjectID,
Project_Name AS [Project_Name|UpdateDescription],
CONVERT(varchar(10), Start_date, 120) AS Start_date,
ProjectDescription
FROM #tbl_projects
UNION ALL
SELECT
...
May 13, 2014 at 4:29 pm
Since it's only three values, maybe this:
...
,isnull(cast(CASE ca1.COMM_max WHEN 1 THEN COMM1 WHEN 2 THEN COMM2 ELSE COMM3 END*QTY*1.8 as numeric(6,2)),0) as RATE
FROM dbo.yourtablename
CROSS APPLY (
SELECT...
May 13, 2014 at 12:54 pm
MysteryJimbo (5/13/2014)
ScottPletcher (5/13/2014)
May 13, 2014 at 8:25 am
You have broad control of the frequency of cdc scan processing, and can even customize it if you want. I wouldn't ever want to risk the never-ending maintenance of...
May 13, 2014 at 8:13 am
You can't use a standard CHECK constraint, as all values must be available on a single row for that.
You could easily use an AFTER DELETE, INSERT[, UPDATE ] trigger if...
May 12, 2014 at 11:16 am
CDC should perform far better than hand-written triggers on all those tables.
Make sure you have sufficient pre-allocated log space to hold the changes until CDC can process them all.
May 12, 2014 at 11:10 am
It's testing to make sure that @Num contains only "0"-"9"s and/or "-"s.
May 12, 2014 at 11:08 am
Viewing 15 posts - 6,076 through 6,090 (of 7,614 total)