Viewing 15 posts - 1,981 through 1,995 (of 2,458 total)
KtmGuy (1/29/2014)
Try executing this query ;UPDATE a
SET
a.Status = CASE WHEN b.action IN(1,3,4,5,6) THEN 'Y' ELSE 'N' END
FROM
TableA a
JOIN
TableB b
ON
a.SID = b.SID
Well done! Just a quick...
January 30, 2014 at 4:33 pm
There were some problems with your sample data which I cleaned up.
USE tempdb
GO
IF OBJECT_ID('tempdb.dbo.Test_AA') IS NOT NULL DROP TABLE dbo.Test_AA
IF OBJECT_ID('tempdb..#Test_AA_stg') IS NOT NULL DROP TABLE #Test_AA_stg
GO
CREATE TABLE [dbo].[Test_AA](
ID int...
January 29, 2014 at 11:41 am
ChrisM@home (1/27/2014)
vip.blade (1/27/2014)
thanks for your fast response! It's a function to calculate the Levenshtein-Distance from this article: http://www.sqlservercentral.com/articles/Fuzzy+Match/92822/
As far as I know there is no way to transform it...
January 27, 2014 at 2:34 pm
Hi,
thanks for your fast response! It's a function to calculate the Levenshtein-Distance from this article: http://www.sqlservercentral.com/articles/Fuzzy+Match/92822/ [/url]
As far as I know there is no way to transform it into an...
January 27, 2014 at 2:28 pm
Before you go any farther, if you've got lots of rows this is going to be pretty slow because of the triangular join you're doing. You probably should take...
January 24, 2014 at 3:18 pm
pietlinden (1/24/2014)
Just wondering, but can you force the queries to run in a single transaction, so they all execute and then the report is rendered?
If there are parameters (especially cascading...
January 24, 2014 at 3:04 pm
jignesh209 (1/24/2014)
SSRS is not blocking,but is it a good practice to create 6 different Datasets and tying it up with 6 different stored procedures.
There is nothing wrong with that at...
January 24, 2014 at 2:55 pm
patrickmcginnis59 10839 (1/21/2014)
Awesome link here discussing various methods:http://stackoverflow.com/questions/11310877/calculate-running-total-running-balance
This article provides different ways to do a running total but has some might not be the best advice based on my experience....
January 24, 2014 at 12:19 pm
This should do the trick:
WITH visitInfo AS
(
SELECT *,
RANK()
OVER (PARTITION BY UnitNumber, YEAR(AdmitDateTime), MONTH(AdmitDateTime)
ORDER BY AdmitDateTime) VisitSeqThisMonth
FROM dbo.TEST
)
SELECTUnitNumber,
AccountNumber,
Diagnosis,
AdmitDateTime,
DischargeDateTime,
ReadmitDate,
DaysToReadmit,
ReadmitAccountNumber
FROM visitInfo
WHERE VisitSeqThisMonth=1
--ORDER BY UnitNumber, AdmitDateTime;
Edit: Code cleanup,...
January 24, 2014 at 10:16 am
Luis Cazares (1/23/2014)
That's because when SQL Server is "reading" the code, it won't find a reference to Table_B alias until it gets to Table_B.
Beat me by 3 seconds!
January 23, 2014 at 2:47 pm
homebrew01 (1/23/2014)
January 23, 2014 at 2:46 pm
arthurolcot (12/23/2013)
January 23, 2014 at 2:31 pm
bryan 83518 (1/15/2014)
<Artists>
<ArtistText>Genie...
January 23, 2014 at 11:47 am
Richard Fryar (1/15/2014)
declare @x xml
select @x = '
<Artists>
<ArtistText>Genie Zhuo</ArtistText>
<Artist Type="Main">
<FullName>Genie Zhuo</FullName>
</Artist>
<Artist...
January 23, 2014 at 10:41 am
...but just came to know that our application/framework does not support procedures of functions
Just a thought...
This might not help with the hierarchy situation but may help you get around your...
January 22, 2014 at 5:57 pm
Viewing 15 posts - 1,981 through 1,995 (of 2,458 total)