Viewing 15 posts - 5,506 through 5,520 (of 8,761 total)
Quick suggestion
😎
Create Trigger trgInsertSalesForce
on dbo.CustomerQuote
AFTER Insert
as
begin
Update CQ
set CQ.SalesForceId = (select
...
April 26, 2015 at 10:12 am
Quick suggestion, check the articles on this page Solving the "Running Total" & "Ordinal Rank" Problems in SS 2k/2k5[/url]
😎
April 26, 2015 at 10:07 am
Quick suggestion, use CROSS JOIN, here is a quick example
😎
USE tempdb;
GO
SET NOCOUNT ON;
IF OBJECT_ID(N'dbo.TBL_GROUP') IS NOT NULL DROP TABLE dbo.TBL_GROUP;
CREATE TABLE dbo.TBL_GROUP
(
[Group] ...
April 26, 2015 at 10:00 am
Jeff Moden (4/24/2015)
April 26, 2015 at 9:25 am
The problem here is that the inserts are not in an ever increasing order, possible option would be adding an Identity column for the primary key and then a unique...
April 26, 2015 at 7:22 am
Stewart "Arturius" Campbell (4/26/2015)
Never thought of doing it this way
This is a very efficient method when aggregating with different grouping / level of details, comes close to the divide and...
April 26, 2015 at 6:35 am
MotivateMan1394 (4/26/2015)
You could try something like this ...
Your Query Return Only One record
And My Query Return records equal the T1 Records Number.
First of all, Phil's query does not only return...
April 26, 2015 at 6:17 am
MotivateMan1394 (4/25/2015)
How can I rewrite this in better performance :
select *, ( SELECT TOP 1 Code FROM T2 WHERE T2.Id=T1.Id ...
April 26, 2015 at 4:35 am
palotaiarpad (4/26/2015)
Hmm. According to BOL, if OVER used with a SUM, then an order by clause is required...
That is incorrect, it is the partition clause and in this case the...
April 26, 2015 at 1:39 am
Quick thought, I think you are over complicating this, consider this code
😎
USE tempdb;
GO
SET NOCOUNT ON;
DECLARE @SAMPLE_SIZE INT = 1000;
IF OBJECT_ID(N'dbo.TBL_GENDER_SEEKING') IS NOT NULL DROP TABLE dbo.TBL_GENDER_SEEKING;
;WITH T(N) AS (SELECT N...
April 26, 2015 at 1:12 am
Sorry for the delay, work got in the way and of course I got a little carried away too:
Having read the article and already looking into a similar problems,...
April 25, 2015 at 1:18 pm
Ed Wagner (4/25/2015)
Eirikur Eiriksson (4/24/2015)
April 25, 2015 at 8:12 am
gracebite1981 (4/24/2015)
I am looking to help on Language translation option in SQL Server 2008 R2
Here is my requirement
I have one database (Table name...
April 25, 2015 at 12:02 am
demin99 (4/24/2015)
get an error SHOW PLAN denied on database.
select * from...
April 24, 2015 at 11:54 pm
Quick trick, in SSMS press CTRL+ALT+G to view Registered Servers, if they are grouped you can right click on the group, new query and that instance of the query will...
April 24, 2015 at 11:22 pm
Viewing 15 posts - 5,506 through 5,520 (of 8,761 total)