Viewing 15 posts - 6,136 through 6,150 (of 7,614 total)
I think this query will give you what you need in separate rows. If so, let us know, and we can pivot it to a single row.
DECLARE @control_date datetime
SET...
April 17, 2014 at 2:02 pm
I suggest:
1) be sure to pad the month and day values so that the final format is a full yyyymmdd.
2) apply column names to make the code easier to understand...
April 17, 2014 at 1:47 pm
WHERE
column_name LIKE '[a-z]%'
April 17, 2014 at 1:38 pm
Lynn Pettis (4/17/2014)
ScottPletcher (4/17/2014)
Lynn Pettis (4/17/2014)
ScottPletcher (4/17/2014)
April 17, 2014 at 10:37 am
SpeedySQL (4/17/2014)
April 17, 2014 at 10:28 am
Lynn Pettis (4/17/2014)
ScottPletcher (4/17/2014)
April 17, 2014 at 10:19 am
You need to do further research before you change the existing index to a filtered index, because that index will no longer satisfy queries originally using it if you filter...
April 17, 2014 at 9:12 am
gbritton1 (4/16/2014)
IF EXISTS (
...
April 16, 2014 at 11:07 am
I think this coding could theoretically perform better:
...
IF (@AnimalsFound = 1)
BEGIN
SET @CompleteSetFound =
CASE WHEN EXISTS(SELECT
1
FROM @FarmMatches ri
INNER JOIN [dbo].[Animal] ani ON ani.[FeatureID] = ri.[OverallID]
GROUP BY
FeatureID, Code
HAVING
MAX(CASE WHEN TypeName...
April 16, 2014 at 10:34 am
I suggest changing one of your existing indexes to also cover this query:
CREATE NONCLUSTERED INDEX [AI_OperatorCBGEstimate_14947]
ON OperatorCBGEstimate ( DateEndedStandard, UpdOperation )
...
April 16, 2014 at 10:04 am
I've coded checks for just Animal table groupings. Please check and see if it produces the results you want.
Edit: This is doing only full matches but partial matches could...
April 16, 2014 at 9:46 am
It's possible but it's huge overhead you should probably avoid.
You can use ROW_NUMBER() to sequentially number the data when you read it rather than having to physically update the values...
April 15, 2014 at 3:49 pm
You could try something like this and see if it helps:
WITH cte_OrderProjectType AS
(
select A.Orderid, min(B.TypeID) , min(C.CTType) , MIN(D.Area)
from tableA A inner join (
select PID,...
April 14, 2014 at 4:51 pm
Please add an alias to columns in the SELECT:
select ?.Orderid, min(?.TypeID) , min(?.CTType) , MIN(?.Area)
Otherwise we can't really rewrite any of the code.
April 14, 2014 at 2:12 pm
What specifically does the data in the "Verdate" look like?
For example, is it 'yyyymmdd hh:mm'?
April 11, 2014 at 4:25 pm
Viewing 15 posts - 6,136 through 6,150 (of 7,614 total)