Viewing 15 posts - 6,061 through 6,075 (of 8,731 total)
That's a lengthy code. Instead of including a whole set of columns in a group by, I used a correlated subquery with CROSS APPLY. You can do the same with...
July 29, 2014 at 9:08 am
This is a possible solution. Be sure to understand how does it work and ask any questions that you have.
SELECT Reference,
PARSENAME( r.dotted, 3) + '.'...
July 29, 2014 at 8:25 am
To give the example of LEAD() as proposed by LinksUp.
SELECT categoryID,
EffectiveDate AS StartDate,
DATEADD( dd, -1, LEAD(EffectiveDate) OVER( PARTITION BY categoryID ORDER...
July 28, 2014 at 4:24 pm
AFAIK, you need an additional step as the condition differs for the "NOT MATCHED BY Source".
You could do it like this:
MERGE #Grantors as Target
USING #tempTors as Source
ON (Target.EntryNumber...
July 28, 2014 at 1:21 pm
I don't understand. You say you need to divide the result of a CASE statement, but the result is a string. What are your expected results? A CTE or a...
July 28, 2014 at 1:06 pm
Steve Jones - SSC Editor (7/28/2014)
Luis Cazares (7/28/2014)
July 28, 2014 at 10:39 am
Do you have unicode values in your file? If you don't you could clear the unicode checkbox in the flat file connection. If you do, you need to change the...
July 28, 2014 at 10:35 am
You might not need a convert, you need to check all the values are valid dates.
I feel the problem is with TERM.[Actual Terminated Date]
July 28, 2014 at 10:15 am
The Dixie Flatline (7/28/2014)
July 28, 2014 at 10:08 am
Didn't realize that this was for reporting services until I was posting. Maybe this T-SQL code might give you an idea.
DECLARE @Seconds int = -223
SELECT CASE WHEN @Seconds <...
July 28, 2014 at 9:09 am
I'm just guessing here, but maybe a cross tabs approach is what you need to read the table just once.
Example:
SELECT x.Somecolumns,
MAX( CASE WHEN OrderOfDiagnosisInEpisode = 1...
July 28, 2014 at 9:03 am
Just wanted to note that you won't see much difference with 5 rows. Anything will run fast with 5 rows. That's why performance tests usually start at least with 1000...
July 28, 2014 at 8:49 am
GilaMonster (7/25/2014)
quackhandle1975 (7/25/2014)
Edit: I would have thought 459 would have been the most challenging exam being the "Expert" one.None of them are 'expert' level. Not even close.
Redefine 'expert' level as...
July 25, 2014 at 2:20 pm
Welcome to the forums.
It's considered a nice way to ask for help if you post your data in a consumable format. As you're new, I did it for you, but...
July 25, 2014 at 1:29 pm
If you're using SQL Server 2012, the easiest method (not the fastest) would be something like this:
select a.acctnum,
a.dates,
a.transtype,
b.balance,
...
July 25, 2014 at 1:04 pm
Viewing 15 posts - 6,061 through 6,075 (of 8,731 total)