December 21, 2017 at 9:50 am
Hi Friends,
I have a created one sample table and inserted some sample rows here
create table ram
(
invoiceno varchar(20),
cust_name varchar(20),
invoice_docvalu number(10,2),
taxable_value number(5,2),
IGST_value number(5,2),
CGST_value number(5,2),
SGST_VALUE number(5,2),
HSN varchar(20)
)
insert into ram values ('Inv/01-1718','HH','180','32',0,'21.6','21.6','74')
insert into ram values ('Inv/01-1718','HH','170','28',0,'20.4','20.4','74')
insert into ram values ('Inv/01-1718','HH','140','30',0,'16.8','16.8','54')
insert into ram values ('Inv/01-1718','HH','160','20',0,'18.8','18.8','54')
Expected Output is
Based on this hsn code i Have to display summarise value of invoice_docval,IGST_Value,SGST_Value,CGST_Value ,Taxable_value
Kindly Give suggestion
December 21, 2017 at 10:02 am
raghuldrag - Thursday, December 21, 2017 9:50 AMHi Friends,I have a created one sample table and inserted some sample rows here
create table ram
(
invoiceno varchar(20),
cust_name varchar(20),
invoice_docvalu number(10,2),
taxable_value number(5,2),
IGST_value number(5,2),
CGST_value number(5,2),
SGST_VALUE number(5,2),
HSN varchar(20)
)insert into ram values ('Inv/01-1718','HH','180','32',0,'21.6','21.6','74')
insert into ram values ('Inv/01-1718','HH','170','28',0,'20.4','20.4','74')insert into ram values ('Inv/01-1718','HH','140','30',0,'16.8','16.8','54')
insert into ram values ('Inv/01-1718','HH','160','20',0,'18.8','18.8','54')
Expected Output is
Based on this hsn code i Have to display summarise value of invoice_docval,IGST_Value,SGST_Value,CGST_Value ,Taxable_value
Kindly Give suggestion
Based on the sample data what will the output look like.
December 21, 2017 at 10:20 am
my expected output is
invoiceno cust_name invoice_docvalu taxable_value IGST_value CGST_value SGST_value HSN
Inv/01-1718 HH 300 50 0 35 35 54
Inv/01-1718 HH 350 60 0 43 43 74
Based on HSN code i have summarise
December 21, 2017 at 10:50 am
use SUM with GROUP BY invoiceno, cust_name,HSN
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
December 21, 2017 at 11:15 am
I agree, that's why I wanted to see the expected results.
December 21, 2017 at 9:40 pm
Hi friends,
That code is working if my expected output is like below what do to
invoiceno cust_name invoice_docvalu taxable_value IGST_value CGST_value SGST_value HSN
Inv/01-1718 HH 650 50 0 35 35 54
Inv/01-1718 HH 650 60 0 43 43 74
here i have to show summarise value of invoice_docvalu based invoiceno
December 22, 2017 at 3:33 am
I don't remember "number" being a data type in SQL Server 2000. Is that really what you're using? If it is, please post correct table DDL.
raghuldrag - Thursday, December 21, 2017 9:40 PMThat code is working if my expected output is like below what do to
What code is that? Please post the query you have tried, so that we can show you where you're going wrong.
John
December 22, 2017 at 5:11 pm
raghuldrag - Thursday, December 21, 2017 9:40 PMHi friends,That code is working if my expected output is like below what do to
invoiceno cust_name invoice_docvalu taxable_value IGST_value CGST_value SGST_value HSN
Inv/01-1718 HH 650 50 0 35 35 54
Inv/01-1718 HH 650 60 0 43 43 74here i have to show summarise value of invoice_docvalu based invoiceno
What?
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply