Viewing 9 posts - 46 through 54 (of 54 total)
Vedran Kesegic (3/25/2013)
You do not need a view for delete-insert command. Making the code even simpler:
INSERT INTO destination
SELECT *
FROM
(
DELETE TOP (100)
FROM source
OUTPUT DELETED.*
) AS t
...
Thanks for that. And yes I'm...
March 25, 2013 at 6:50 am
Over the years I have isolated xp_cmdshell, xp_sendmail etc from users and 3rd Party applications by using a stored procedure in front of the system procs. All inputs are checked...
March 25, 2013 at 6:39 am
A simple and quick way to archive data.
-- Simple table to populate with data
CREATE TABLE [dbo].[Current MPANs]( [MPAN] [char](13) NOT NULL PRIMARY KEY )
CREATE TABLE [dbo].[Old MPANs] ([MPAN] [char](13)...
March 25, 2013 at 5:28 am
I know of one place that does backup to the USB drive, yet they have 2 SANs?!
During a DR test the admin guys were too rushed to do a...
March 21, 2013 at 6:46 am
Throwing the 2 versions of the code through a test rig shows that the methods are reasonable similar on speed. Its how the methods get used is probable more...
February 28, 2013 at 9:53 am
Using the above sample from Cadavre to load the data here is an alternative. Admittedly you will need to prejudge the possible number of options and pad out the sql...
February 28, 2013 at 6:53 am
Did you want a null for no colours or a zero?
select[Main Category]
,[SubCategory]
,[SubCategory2]
,[SubCategory3]
,[Distinct Products] = COUNT(distinct [Product Name] )
,[Distinct Manufacturers] = COUNT (distinct [Manufacturer] )
--- Choose which answer
,[Distinct Colours]...
February 17, 2013 at 8:35 am
Tony, you may want to take the bugs out of the application first as in the long run it will cause less complex sql.
I think the answer you are looking...
February 17, 2013 at 5:33 am
Perhaps a bit late but a different solution in one statement 🙂
To set the data up based on the solution of http://www.sqlmag.com/article/tsql3/calculating-concurrent-sessions-part-3-103407:
USE tempdb;
IF OBJECT_ID('dbo.Sessions', 'U') IS NOT...
February 15, 2013 at 11:20 am
Viewing 9 posts - 46 through 54 (of 54 total)