Viewing 15 posts - 4,681 through 4,695 (of 10,144 total)
L' Eomot Inversé (5/1/2013)
May 3, 2013 at 1:20 am
Sean Lange (5/1/2013)
ChrisM@Work (5/1/2013)
Sean Lange (5/1/2013)
I would suggest you use the newer join constructs. With this query you don't even need a where clause.
Here...
May 1, 2013 at 8:11 am
Sean Lange (5/1/2013)
I would suggest you use the newer join constructs. With this query you don't even need a where clause.
Here is the syntax:
from...
May 1, 2013 at 7:48 am
kabaari (5/1/2013)
select s.partNo, p.descript,sum(case when battState = '99' then qty else '0'end) as CLNT,
sum(case when battState = '1' then qty-newQty else '0'...
May 1, 2013 at 7:46 am
todd.ayers (4/30/2013)
LOL!! yeah sorry hope I didnt offend you?
Heck no!
Have you tested the code yet?
May 1, 2013 at 7:10 am
KoldCoffee (5/1/2013)
In the real world case I have several CTEs in each statement. ie. ct1, followed by ct2, followed by final select. Which CTE...
May 1, 2013 at 7:04 am
You should consider replacing the slow slow cursor with a fast set-based equivalent:
UPDATE a SET
Transferred = 'Y'
OUTPUT
a.LoanTypeId,
a.LoanAmount,
a.LoanRate,
a.LoanYears,
MonthlyPayment = a.LoanAmount/(y.Result-1) * (a.LoanRate*y.Result),
a.[Status]
INTO Loans
FROM Applications a
CROSS APPLY (SELECT NumberOfPeriods...
May 1, 2013 at 6:46 am
...
/**Check if Loan exists**/
SELECT @RowCount = Count(*)
FROM Applications
WHERE ApplicationID = @ApplicationID
IF @RowCount = 0
BEGIN
PRINT 'Applicación' + @ApplicationID + ' no está aprobada o activa';
ROLLBACK TRANSACTION -- complete the transaction...
May 1, 2013 at 6:28 am
KoldCoffee (5/1/2013)
thanks for reply. I should have posted what the result set was that I'm after. There should be two rows for each person, one recording total count of...
May 1, 2013 at 6:20 am
Left join the scores table to the weeks table. If you mock up sample data scripts, folks will show you exactly how.
May 1, 2013 at 6:03 am
Beatrix Kiddo (5/1/2013)
Cool, thanks. I've amended it to.
and LEN(CURRENT_POINT) > 0🙂
Is there any reason not to use this? CURRENT_POINT > ' '
May 1, 2013 at 3:39 am
Beatrix Kiddo (5/1/2013)
Ah, ChrisM@Work, I think I get what you were saying now.
and LEN(LTRIM(RTRIM(CURRENT_POINT))) > 0Seems to have fixed it.
Thanks all!
LEN ignores leading spaces, you don't need to trim. However,...
May 1, 2013 at 3:27 am
Beatrix Kiddo (5/1/2013)
I'm trying...
May 1, 2013 at 2:43 am
Viewing 15 posts - 4,681 through 4,695 (of 10,144 total)