Viewing 15 posts - 466 through 480 (of 3,957 total)
Just for fun, using the SQL 2012 LAG function, this query matches ChrisM's first result:
SELECT LinkingID, ID1, ID2
,rn=CASE WHEN ID3=ID2 AND ID4=ID1 THEN 2 ELSE 1...
January 25, 2015 at 5:01 pm
Brandie Tarvin (1/23/2015)
January 25, 2015 at 4:41 pm
We believe we have isolated the problem to a different method used to call the SP from C#.Net.
We are working through the recoding on that and I expect to see...
January 25, 2015 at 4:37 pm
A couple of clarifications...
Numbered stored procedures: http://beyondrelational.com/modules/2/blogs/77/Posts/19618/0289-sql-server-deprecated-features-numbered-stored-procedures.aspx (This was new to me but I could have done without the information since clearly it will be deprecated).
The first profiler trace posted...
January 22, 2015 at 7:29 pm
I'm hoping that anyone with knowledge of older versions of .Net Framework and Crystal Reports might be able to help me with this one:
http://www.sqlservercentral.com/Forums/Topic1653942-391-1.aspx
Thanks in advance for taking a look.
January 22, 2015 at 6:51 pm
dopydb (1/21/2015)
Yea only 100 or so inserts a day, otherwise i wouldnt use a trigger at allAny tips for making it more efficient? 🙂 always interested in other approaches
The answer...
January 21, 2015 at 6:11 pm
I can also confirm that in SQL 2008 if you remove the CTE it works.
This also works, but sort of defeats the purpose.
CREATE TYPE test_list AS TABLE(a int);
GO
CREATE FUNCTION dbo.test_function...
January 21, 2015 at 6:04 pm
Runs fine on this version of SQL:
Microsoft SQL Server 2012 - 11.0.2218.0 (X64)
Jun 12 2012 13:05:25
Copyright (c) Microsoft Corporation
Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601:...
January 21, 2015 at 5:36 pm
Indeed there are many ways. Jeff's articles are great. There is also this one:
https://www.simple-talk.com/sql/performance/the-performance-of-traversing-a-sql-hierarchy-/
January 21, 2015 at 5:26 pm
What exactly are you trying to get out of that second SELECT?
Is this what you are looking for?
SELECT XMLRECORD
FROM (SELECT @xml) a (XMLRECORD)
CROSS APPLY XMLRECORD.nodes('/row') t(p)
where p.value('(./c1)[1]', 'VARCHAR(8000)')...
January 21, 2015 at 5:22 pm
Another way using Erikur's sample data and no ROW_NUMBER():
CREATE TABLE #A (num1 TINYINT NOT NULL PRIMARY KEY);
INSERT INTO #A(num1) VALUES (1),(2),(3),(4),(5);
CREATE TABLE #B(ltr CHAR NOT NULL PRIMARY KEY);
INSERT INTO #B(ltr)...
January 21, 2015 at 5:09 pm
Sean Lange (1/20/2015)
dwain.c (1/20/2015)
Sean Lange (1/20/2015)
Ed Wagner (1/20/2015)
Brandie Tarvin (1/20/2015)
Sean Lange (1/20/2015)
January 20, 2015 at 5:55 pm
ashokputta9 (1/19/2015)
1.Split the RR ("PL:TW RR:1.8%,PL:TX RR:0.9%") into LowendRR ("PL:TW RR:1.8%") and HighendRR ("PL:TX RR:0.9%")
2.Split the LowendRR ("PL:TW RR:1.8%") into LowendPL...
January 20, 2015 at 5:44 pm
I'm going to backtrack a minute here and ask why you have a process to calculate your user account balances?
Doesn't that imply that, between processing runs the balance is not...
January 20, 2015 at 5:39 pm
Using the first of your examples:
SELECT
Method = 'Integer Inclusive',
t.RID,
t.Num,
s.LowerBound,
s.UpperBound
FROM...
January 20, 2015 at 5:27 pm
Viewing 15 posts - 466 through 480 (of 3,957 total)