Viewing 15 posts - 1 through 15 (of 54 total)
I had executed twin.devil code and it works on my side. I am using SQL Server 2012.
Apart from that, I am interested to know how to populate few records into...
September 3, 2014 at 1:52 am
Luis Cazares (8/18/2014)
Here's a possible solution. Be sure to understand it....
August 19, 2014 at 11:17 pm
Lynn Pettis (7/1/2012)
DECLARE @SAMPLE TABLE
(
ID INT NOT NULL,
ACCOUNT CHAR(4) NOT NULL,
ORGANIZATION CHAR(3) NOT NULL,
SUBGROUP CHAR(2) NOT NULL,
AMOUNT int NOT NULL
)
INSERT...
July 1, 2012 at 11:22 pm
Lynn Pettis (7/1/2012)
July 1, 2012 at 8:36 am
Thanks to all the feedback. It is actually a work problem, not a homework problem 🙂
June 15, 2012 at 12:35 am
Hi imex and Eugene,
Yeah, you guys are right. If 'aaa' exists in INBOUND and 'bbb' exists in OUTBOUND, then 'bbb' and 'aaa' should not exists in INBOUND and OUTBOUND which...
May 4, 2012 at 11:23 pm
Hi Eugene,
There is really no rule to make 'aaa' to be only "inbound" but 'bbb' and 'ccc' only "outbound.
If there is an amount for 'aaa' to 'bbb' (FLAG1 to FLAG2)...
May 4, 2012 at 3:50 am
GilaMonster (4/10/2012)
All three of those sets of data are identical, there is no such thing as 'order' of rows in a table. You cannot say that a...
April 11, 2012 at 8:26 pm
GilaMonster (4/10/2012)
yingchai (4/10/2012)
Hi Cadavre,bbb will be Inbound and aaa will be Outbound.
Which columns determine that?
SQL does not have any concept of a row's position within a table, a table...
April 10, 2012 at 8:39 am
Hi Cadavre,
bbb will be Inbound and aaa will be Outbound.
April 10, 2012 at 3:46 am
Cadavre (4/10/2012)
What I want to know is how can you tell which is inbound and which is outbound?
In your sample data, aaa and bbb are the FLAG1 and...
April 10, 2012 at 3:17 am
Cadavre (4/10/2012)
First, I've build some...
April 10, 2012 at 2:42 am
dwain.c (3/15/2012)
Ah so then every account code will have a transaction in every period?
Yes. Every account code will have transactions in every period. The differences is that BS account will...
March 15, 2012 at 8:08 pm
dwain.c (3/15/2012)
;WITH PLYTD AS (
SELECT Account, Organization, Period, [Year]
,(SELECT SUM(Amount) FROM @acct a2
WHERE a1.Account = a2.Account and a1.Organization = a2.Organization and a1.[Year] = a2.[Year] and
a2.Period <= a1.Period
) As...
March 15, 2012 at 8:44 am
Viewing 15 posts - 1 through 15 (of 54 total)