Viewing 15 posts - 1,831 through 1,845 (of 8,416 total)
mister.magoo (7/19/2011)
July 19, 2011 at 5:36 pm
The Dixie Flatline (7/18/2011)
And also...
select (ABS(@test)+@test)/2 as result
Neat!
July 18, 2011 at 9:34 pm
CELKO (7/18/2011)
SIGN (1 + SIGN(x)) * xbut it means using x twice. Hide it in a CTE and use the twice.
CTEs generally don't help - the expression is evaluated...
July 18, 2011 at 9:32 pm
invulnarable27 (7/18/2011)
July 18, 2011 at 4:29 pm
opc.three (7/17/2011)
I was referring to restrictions in terms of using OUTPUT results in a derived table.
Right, I'm with you now - yes 'composable DML' is limited to being a source...
July 17, 2011 at 7:35 pm
opc.three (7/17/2011)
Can you? This would seem like Option (i.e. workaround) #3. The filtering is not technically part of the OUTPUT clause but it will work.
The OUTPUT rows are produced by...
July 17, 2011 at 9:31 am
invulnarable27 (7/17/2011)
Or would you put the tempdb on the RAID10 array along w/ the data file?
This one.
July 17, 2011 at 1:21 am
sql_novice_2007 (7/14/2011)
How can I convert the following string to date time data.July 7 2011 12:47 pm EDT
The conversion is the easy part. Don't forget to think about how your...
July 17, 2011 at 1:08 am
This is another way of writing a query to suit the requirement:
CREATE TABLE #Cities
(
city_name VARCHAR (25) NULL
);
CREATE INDEX nc1 ON #Cities (city_name);
INSERT #Cities
(city_name)
VALUES
('Chennai'),
('Hyderabad'),
('Bangalore'),
('Bombay'),
('Kolkata'),
('Cochin'),
('Ahemadabad'),
('Bangalore'),
(NULL),
('Delhi');
SELECT
ranked.city_name
FROM
(
SELECT
city_rank = CONVERT(BIGINT, -1),
c.city_name
FROM #Cities AS c
WHERE
c.city_name IS...
July 17, 2011 at 12:20 am
sqlfriends (7/16/2011)
July 17, 2011 at 12:00 am
There are hundreds of scripts out there for things like this. I used Google to find this:
http://sqlserverteam.blogspot.com/2008/11/monitor-database-growth.html
There are probably better ones. Have a look around.
July 16, 2011 at 11:38 pm
I normally write such stubs the other way around, to avoid all that tedious messing about with quotes in the view definition:
IFOBJECT_ID(N'dbo.MyView', N'V')
IS NULL
EXECUTE ('CREATE VIEW dbo.MyView AS SELECT 1...
July 16, 2011 at 11:35 pm
Yes, you can filter an OUTPUT clause, and achieve what you want to do in one statement:
DECLARE @Production TABLE (col1 INT NULL, col2 INT NULL, col3 INT NULL);
DECLARE @Archive TABLE...
July 16, 2011 at 11:19 pm
First again!
Good question - I guessed correctly, but still leaned a new fact for the day. Cool.
July 16, 2011 at 4:02 pm
Viewing 15 posts - 1,831 through 1,845 (of 8,416 total)