Viewing 15 posts - 1,201 through 1,215 (of 1,244 total)
This should do the trick...
-- test data --
IF OBJECT_ID('tempdb..#temp') IS NOT NULL
DROP TABLE #temp;
CREATE TABLE #temp (
id INT,
color VARCHAR(15)
)
INSERT #temp (id,color) VALUES
(1,'Green'),
(2,'Yellow'),
(3,'Yellow'),
(4,'Pink'),
(5,'Green'),
(6,'Yellow'),
(7,'White'),
(8,'White'),
(9,'Pink')
-- the solution --
SELECT
ROW_NUMBER() OVER (ORDER BY x.id)...
May 19, 2015 at 9:54 pm
After doing some more digging, the closest thing I could find is an apparent isssue with the Cardinality Estimator, reported by Dave Ballantyne.
New "Type Conversion in Expression....." warning in SQL2012...
May 19, 2015 at 9:15 pm
Lynn... If you want to take a crack at this one (Case Sensitive Collation Causing Cardinality Warning), you have my word, I'll respond in a timely manner... As an added...
May 19, 2015 at 4:58 pm
reamades (5/19/2015)
OwnerID
OwnerName
OwnerAddress
OwnerCity
OwnerState
OwnerZip
PropertyDescription
County
etc.
So John Smith might have OwnerID=1 in Tarrant County. And there might be Smith, John in Reno County that has OwnerID=205. I'm still wrapping...
May 19, 2015 at 12:01 pm
Nope... All CHAR(1) to CHAR(1)... (not shure how the [Union####] come into play...)
here's the warning section of the plan.
<Warnings>
...
May 18, 2015 at 9:52 pm
Alan.B (5/18/2015)
If the collation that the table is stored in is Case Insensitive then you use a...
May 18, 2015 at 9:40 pm
I don't know that I'm 100% clear on what you want but I think this should be pretty close...
Check this with the sample data and see if it's what you're...
May 18, 2015 at 6:31 pm
I agree that the ">= / <" syntax is the all around better syntax and I'll stick to it exclusively, moving forward.
May 18, 2015 at 9:52 am
Lynn Pettis (5/15/2015)
I would still refrain from using BETWEEN for date ranges. Biggest reason being if there is a data type change to column such as DATE to DATETIME...
May 15, 2015 at 8:38 pm
WOW... I could have sworn that the last time I tested, CASTing from a DATETIME to a DATE made it unsargable...
Just tetested with this...
DECLARE
@BegDate DATE = '2015-01-10',
@EndDate DATE...
May 15, 2015 at 5:21 pm
I'm with ya... I'd written a piece of obfuscation code that actually worked a little too well for it's intended purpose... Rather than trashing the code, I figured that it...
May 15, 2015 at 4:51 pm
Next question:
How would you describe the differences between being "Loyal" to a company and "Dedicated" to a company? Heh... The answer will be provided either at 2AM tomorrow morning...
May 15, 2015 at 4:10 pm
The following is what I'd put in the NEVER do category...
WHERE CAST(t.SomeDateTime as DATE) BETWEEN @BegDate and @EndDate
Actually... I should say "Never do again" category... I have a few report...
May 15, 2015 at 3:26 pm
Both good points... Although I'd still put this in the "good idea not to do this" category as opposed to the "never do this" category...
May 15, 2015 at 2:58 pm
Viewing 15 posts - 1,201 through 1,215 (of 1,244 total)