Viewing 15 posts - 8,281 through 8,295 (of 8,731 total)
Cadavre, is there a reason on why you didn't leave the condition as it was?
Should we test the difference between yours and this?
UPDATE fi
SET fi.cor = 'Y', fi.tam =...
October 26, 2012 at 8:33 am
jdfletchr (10/26/2012)
Try the Parsename function. Not what is was made for, but works quite well for what you need and is much faster that CharIndex and Len.
Did you read...
October 26, 2012 at 8:05 am
That's because it's giving your results by groups, not the total.
As you didn't post DDL or consumable sample data, here's an example that can help you to fix the query.
DECLARE...
October 25, 2012 at 11:49 am
I've seen it before, had to use it and hated it completely.
It was the worst database design I've ever seen.
It's pointless and will cause problems trying to understand what the...
October 25, 2012 at 11:26 am
I told you that was a start.
What you need is dynamic code to include all columns needed.
Have you read the articles?
October 25, 2012 at 11:14 am
I only found a problem with your query but it should throw an error and not incorrect results. The problem is the query is not complete.
Could you post DDL?
As a...
October 25, 2012 at 10:53 am
Have you read Jeff Moden's articles on cross tabs and Dynamic cross tabs? Search them in this site.
I don't remember if ROW_NUMBER is mentioned on the article, but this will...
October 25, 2012 at 10:41 am
Davin21 (10/25/2012)
How about this?
SELECT *
FROM #testenvironment
WHERE PARSENAME(CAST(yourdata AS NVARCHAR(MAX)),3) IS NULL
I had the same idea, but I added an extra condition because your query will return results with no period...
October 25, 2012 at 8:24 am
I was so close, thanks to the QotD that made me remember the PARSENAME function.
My code
SELECT @HOLDER = ID
FROM #testEnvironment
WHERE PARSENAME( CAST(yourData AS NVARCHAR(MAX)),3) IS NULL
AND PARSENAME(CAST(yourData AS NVARCHAR(MAX)), 2)...
October 25, 2012 at 8:20 am
But you're assuming that an identity column is available and that it has no gaps.
You're assuming as well that the data is being inserted to the table in the correct...
October 25, 2012 at 7:51 am
kabaari (10/24/2012)
Ok. I got the below to run. The formula returns weekly defects / overall production totals. I want to calculate weekly defect / weekly production. Is this possible?
To help...
October 24, 2012 at 4:28 pm
kabaari (10/24/2012)
Below are my results:yield
94.4000000000000000
97.6000000000000000
98.4000000000000000
96.8000000000000000
Now, I need to get rid of the zeros and show dates.
You should do formatting on the front end.
But if you must do it here, an...
October 24, 2012 at 4:25 pm
There's not much we can do without DDL and sample data.
To audit the problem, you could do a simple select instead of the update.
Another thing to watch is the datatype....
October 24, 2012 at 4:00 pm
The Dixie Flatline (10/23/2012)
Agreed. One fix would be...
October 24, 2012 at 10:59 am
YSLGuru (10/23/2012)
What tips form Jeff? I just see one poast saying there is no such native funcationailty. did I miss a post?
No, I was referring to his article on...
October 23, 2012 at 4:38 pm
Viewing 15 posts - 8,281 through 8,295 (of 8,731 total)