Viewing 15 posts - 1,036 through 1,050 (of 8,416 total)
Don't just add DISTINCT to remove the duplicates. There is a crucial difference between grouped aggregates (SUM...GROUP BY) and windowed aggregates (SUM OVER(PARTITION BY...)):
DECLARE @test-2 TABLE
(
...
January 22, 2012 at 7:43 pm
Hi Bhuvnesh,
This script demonstrates how to do what you are looking to do here:
USE tempdb
GO
-- Create partitioning function
CREATE PARTITION FUNCTION PF_Product(varchar(10))
AS RANGE LEFT
FOR VALUES ('BigScreen', 'Computer', 'PoolTable');
GO
-- Create...
January 22, 2012 at 7:20 pm
SQLRNNR (1/20/2012)
Duplicate postPlease post answers here
http://www.sqlservercentral.com/Forums/Topic1239489-392-1.aspx
Confusingly, the linked thread refers to itself as a duplicate. I think we should answer here :unsure:
January 20, 2012 at 9:01 am
Hugo Kornelis (1/20/2012)
(Though I don't understand why MS would choose to use a signed integer to store page numbers; it's not as if there will ever be negative page numbers!)
They...
January 20, 2012 at 5:31 am
Raymond van Laake (1/20/2012)
Currently I have this:
SET @fetchTimestamp = GETDATE()
DECLARE @strTimestamp CHAR(23) = RTRIM(CONVERT(CHAR,@fetchTimestamp,105))+ ' '+RTRIM(CONVERT(CHAR,@fetchTimestamp,114))
SET @sql = N' SET DATEFORMAT dmy UPDATE '+@myTable+' SET myTimeStamp='''+@strTimestamp+'''
EXEC sp_executesql @sql
Why are you...
January 20, 2012 at 3:48 am
GilaMonster (1/20/2012)
Yes, they will. GetDate, like Rand, gets one value for a statement (if called once)
Not necessarily true for RAND, if it is seeded with a non-deterministic function like NEWID:
SELECT
...
January 20, 2012 at 3:36 am
Good question, Craig, and not even remotely evil 🙂
January 20, 2012 at 3:30 am
I like these sorts of questions, nice one Steve.
January 20, 2012 at 3:28 am
GilaMonster (1/18/2012)
Not baloney. I've crashed a production server by starting profiler (with a very limited trace set). I'm far from the only one.
I have done this :blush:
January 19, 2012 at 8:08 am
Brandie Tarvin (1/19/2012)
Is that a chicken hawk?
It's the result of a Google Images search for 'flying chicken'. Beyond that, no clue 🙂
January 19, 2012 at 8:07 am
Grant Fritchey (1/18/2012)
I wouldn't even say I was an expert at execution plans. Paul can run rings around me without breaking a sweat. That's what an expert looks like.
Your cheque...
January 19, 2012 at 8:02 am
GSquared (1/19/2012)
"fowl swoop"
January 19, 2012 at 7:57 am
Brandie Tarvin (1/19/2012)
SQLRNNR (1/19/2012)
GunganMesa don't think so. No, mesa don't.
January 19, 2012 at 7:47 am
aitchkcandoo (1/18/2012)
I tried but got error 'CONCAT' is not a recognized built-in function name.
CONCAT is only available in SQL Server 2012, as I said.
January 18, 2012 at 5:01 pm
aitchkcandoo (1/18/2012)
January 18, 2012 at 11:44 am
Viewing 15 posts - 1,036 through 1,050 (of 8,416 total)