I have a Table in SQL Server which contains following fields:
Date, Amount, Particulars
I want to save the results in a new table like this:
DATE PARTICULARS AMOUNT
------- ------------------ -----------
20/10/04 abc 38383
DEF 958
ghi 18393
21/10/04 Xyz 78338
hsius 838
22/10/04 jhdljkhj 873883
kljkdfljk 73733
jhjhfjjh 838738
Above you can see how the "Particulars" and "Amount" are grouped on "Date".
I used the following query:
"Select Distinct Date,Particulars,Amount
From Transac
Where Custid = 95
Order By Date"
However the above query does not fetch the result as I needed. It does not group like what I have shown above.
How to write the query?
Date, Amount, Particulars
I want to save the results in a new table like this:
DATE PARTICULARS AMOUNT
------- ------------------ -----------
20/10/04 abc 38383
DEF 958
ghi 18393
21/10/04 Xyz 78338
hsius 838
22/10/04 jhdljkhj 873883
kljkdfljk 73733
jhjhfjjh 838738
Above you can see how the "Particulars" and "Amount" are grouped on "Date".
I used the following query:
"Select Distinct Date,Particulars,Amount
From Transac
Where Custid = 95
Order By Date"
However the above query does not fetch the result as I needed. It does not group like what I have shown above.
How to write the query?