Viewing 15 posts - 8,671 through 8,685 (of 10,144 total)
Grant Fritchey (3/18/2009)
I was checking up on the status of what I think is a bug that I posted to...
March 18, 2009 at 5:44 am
Here's another way:
-- sample data
DROP TABLE #temp
CREATE TABLE #temp ([ChapterPageTitle] VARCHAR(9), [No.OfPages] INT)
INSERT INTO #temp ([ChapterPageTitle], [No.OfPages])
SELECT 'Chapter 1', 2 UNION ALL
SELECT 'Chapter 2', 4 UNION ALL
SELECT 'Chapter...
March 18, 2009 at 5:34 am
Bruce W Cassidy (3/17/2009)
[font="Verdana"]Happy join? :w00t:I miss Oracle's natural join. "Just join the two tables, dammit! I've already told you what the foreign key relationship is..."
[/font]
It was...
March 17, 2009 at 2:51 pm
Steve Jones - Editor (3/17/2009)
Green Beer!!are we free associating now?
Beer! Hell yeah we know about this stuff! You want green beer? With or without the dye?
Check this one out 😎
SELECT...
March 17, 2009 at 2:29 pm
Jack Corbett (3/17/2009)
GilaMonster (3/17/2009)
Bob Hovious (3/17/2009)
March 17, 2009 at 8:24 am
There seems to be an inverse square law operating between the amount of time and effort you put into a post, and the chance of the OP responding at all...
March 17, 2009 at 8:19 am
GilaMonster (3/17/2009)
Bob Hovious (3/16/2009)
Gail, do you have any recommendations from your part of the world?
If you're into wines, you absolutely must not miss the Stellenbosch wines (Cape Town, South Africa)....
March 17, 2009 at 7:47 am
rajendran.e (3/17/2009)
Thanks for your reply..:)
Mentioned Query will return duplicate value
noo namee ...
March 17, 2009 at 6:32 am
Christopher Stobbs (3/17/2009)
does my solution not work???I'll test it with a million rows and see what happens...
OH and you haven't given us an example of a different start position?
It matches...
March 17, 2009 at 5:01 am
What do you want the output to look like if @StartPosition contains 1 and @endposition contains 3?
How do the @StartPosition and @endposition correspond to values in the table? It's not...
March 17, 2009 at 4:43 am
Then bring the two queries together:
SELECT q1.No, q1.Nome, q1.SaldoCCO, q2.saldoLR
FROM (SELECT dt.No, dt.Nome, SUM(dt.PENDENTESDEB - dt.PENDENTESCRD) AS SaldoCCO
FROM (SELECT cc.No, cc.nome as Nome,
-- block 1
CASE WHEN origem =...
March 17, 2009 at 4:30 am
Restrict the SELECT column list to the columns we need, and get rid of the unnecessary "onion skin":
SELECT No, Nome, SUM(PENDENTESDEB - PENDENTESCRD) AS SaldoCCO
FROM (SELECT No, cc.nome as Nome,...
March 17, 2009 at 4:15 am
Since this is an "onion" select - there's a select of a select of a select - we can use one of them to calculate Saldo instead of having that...
March 17, 2009 at 4:10 am
Resolving the correlated subqueries as derived tables gives two CASE blocks - I guess debit and credit, and a third block which calculates the difference between the two as 'Saldo':
SELECT...
March 17, 2009 at 3:07 am
Here's the same query after 10 minutes spent reformatting it to make it a little more readable:
SELECT No, nome, SUM(Saldo) as 'SaldoCCO'
from
...
March 17, 2009 at 2:24 am
Viewing 15 posts - 8,671 through 8,685 (of 10,144 total)