Click here to Skip to main content
14,972,741 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
HI, I have sql data which I need to post to tally erp 9.
Data getting in sql query like this.
query :
SQL
select C_PREFIX,N_SRNO,C_ACODE,C_GROUPCODE,C_REFNO,D_DATE,sum(N_AMOUNT) total
from ledger 
where C_PREFIX='04sr' and N_SRNO=1054
group by C_PREFIX,N_SRNO,C_ACODE,C_GROUPCODE,C_REFNO,D_DATE

output:
C_PREFI N_SRNO C_ACODE C_GCODE C_REFNO D_DATE total
04SR 1054 000120 000014 1153 2007-06-22 00:00:00.000 -987.35
04SR 1054 000154 000003 1153 2007-06-22 00:00:00.000 341.95
04SR 1054 000155 000014 1153 2007-06-22 00:00:00.000 -33550
04SR 1054 000193 000003 1153 2007-06-22 00:00:00.000 34195.4I

I want my query output to be like
C_PREFIX N_SRNO C_GROUPCODE C_REFNO D_DATE C_ACODE(000120) C_ACODE(000154) C_ACODE(000155) C_ACODE(000193)
04SR 1054 '' 1153 2007-06-22 -987.35 341.95 -33550 34195.41


Help me to get the solution
Posted
Updated 26-Dec-15 17:37pm
v2
Comments
ZurdoDev 26-Dec-15 23:38pm
   
So include the other columns in your SELECT statement. What's the issue?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900