-1
Declare @a Decimal;
Declare @b Decimal;
Set @a = 100*(Select price From prices Where prodid = 'a4');
Set @b = 100+(Select cgst from taxes where prodid = 'a4')+(Select sgst from taxes where prodid = 'a4')+(Select cess from taxes where prodid = 'a4')
SELECT
Round(@a/@b,2) as 'Price per Crtn(excl Taxes)',
t.cgst+'%' as 'CGST(%)',
t.cgst*ROUND(@a*0.01/@b,2) as 'CGST Per Crtn',
t.sgst+'%' as 'SGST(%)',
t.sgst*ROUND(@a*0.01/@b,2) as 'SGST Per Crtn',
t.cess+'%' as 'CESS(%)',t.cess*ROUND(@a*0.01/@b,2) as 'CESS Per Crtn',
r.price as 'Price per Crtn(incl Taxes)',
'11' as 'Quantity',
'11'*ROUND(@a/@b,2) as 'Total Price(excl Taxes)',
Round(r.price*'11',2) as 'Total Price(incl Taxes)'
FROM
products p
JOIN
prices r ON (r.prodid = p.prodid)
JOIN
taxes t ON (t.prodid = r.prodid)
WHERE
p.prodid = 'a4'
iはDataGridViewの中で上記のクエリの出力を移入しようとしていますと、このエラーから抜け出すに私を助けてくださいfloatにメッセージ8114、レベル16、状態5、行の取得3の変換エラーデータ型varchar型は
を見つけたあなたに@Lamakと@Raska をありがとうhttps://stackoverflow.com/help/mcve)。 –
'cgst'カラムのデータ型は? – Lamak
cgst、sgst、cellは浮動小数点です – Kande