I hope someone can help me out with the next problem . I have a two tables that looks like this.
Table
ID TotalCap Accname Accnumber
1 150000
1 175000
1 Brown
1 123
2 155000
2 195000
2 200000
2 Yellow
2 4567
Accnumber NewAccount
123 321
4567 8453
and a query:
SELECT Table.ID, Table_1.TotalCap, Table_3.Accname, convertaccount.NewAccount
FROM (
AS Table_3 RIGHT JOIN ((
LEFT JOIN
AS Table_1 ON Table.ID = Table_1.ID) LEFT JOIN
AS Table_2 ON Table.ID = Table_2.ID) ON Table_3.ID = Table.ID) LEFT JOIN convertaccount ON Table_2.Accnumber = convertaccount.Accnumber
GROUP BY Table.ID, Table_1.TotalCap, Table_2.Accnumber, Table_3.Accname, convertaccount.NewAccount
HAVING (((Table_1.TotalCap) Is Not Null) AND ((Table_2.Accnumber) Is Not Null) AND ((Table_3.Accname) Is Not Null));
The result is:
ID TotalCap Accname Accnumber
1 150000 Brown 321
1 175000 Brown 321
2 155000 Yellow 8453
2 195000 Yellow 8453
2 200000 Yellow 8453
Now the table is changed a little bit
Table
ID TotalCap Accname Accnumber Period CapDetails Type
1 150000 1
1 1 50000 Shares
1 1 100000 Bonds
1 175000 2
1 2 75000 Shares
1 2 100000 Bonds
1 Brown
1 123
2 155000
2 1 55000 Shares
2 1 100000 Bonds
2 195000
2 2 55000 Shares
2 2 100000 Bonds
2 Yellow
2 4567
I would like to have a result were I will see all details from a particular account I should be able to
enter an account and a period from until:
So something like which Newaccount ? 321
and from periode ? 1
untill ? 1
The result should be:
Period
Details Capital Newaccount Accname Period
321 Yellow 1
50000 Shares
100000 Bonds
150000
I would be very happy is some can help me out
Table
ID TotalCap Accname Accnumber
1 150000
1 175000
1 Brown
1 123
2 155000
2 195000
2 200000
2 Yellow
2 4567
Accnumber NewAccount
123 321
4567 8453
and a query:
SELECT Table.ID, Table_1.TotalCap, Table_3.Accname, convertaccount.NewAccount
FROM (
GROUP BY Table.ID, Table_1.TotalCap, Table_2.Accnumber, Table_3.Accname, convertaccount.NewAccount
HAVING (((Table_1.TotalCap) Is Not Null) AND ((Table_2.Accnumber) Is Not Null) AND ((Table_3.Accname) Is Not Null));
The result is:
ID TotalCap Accname Accnumber
1 150000 Brown 321
1 175000 Brown 321
2 155000 Yellow 8453
2 195000 Yellow 8453
2 200000 Yellow 8453
Now the table is changed a little bit
Table
ID TotalCap Accname Accnumber Period CapDetails Type
1 150000 1
1 1 50000 Shares
1 1 100000 Bonds
1 175000 2
1 2 75000 Shares
1 2 100000 Bonds
1 Brown
1 123
2 155000
2 1 55000 Shares
2 1 100000 Bonds
2 195000
2 2 55000 Shares
2 2 100000 Bonds
2 Yellow
2 4567
I would like to have a result were I will see all details from a particular account I should be able to
enter an account and a period from until:
So something like which Newaccount ? 321
and from periode ? 1
untill ? 1
The result should be:
Period
Details Capital Newaccount Accname Period
321 Yellow 1
50000 Shares
100000 Bonds
150000
I would be very happy is some can help me out