gpt4 book ai didi

mysql - 'decimal(10,2)' 附近的存储过程语法错误

转载 作者:行者123 更新时间:2023-11-29 05:25:39 24 4
gpt4 key购买 nike

<分区>

我有以下生成语法错误的存储过程:

SELECT     
tbl_ReceiptMaster.receiptMasterId AS ID,
date_format(tbl_ReceiptMaster.date,'%d %m %y') AS Date,
tbl_AccountLedger.acccountLedgerName AS 'Ledger ',
tbl_ReceiptMaster.receiptMode AS 'Receipt Mode',
tbl_ReceiptMaster.description AS Description,
cast( tbl_ReceiptDetails.amount as decimal(18,2))as amount
FROM tbl_ReceiptMaster
INNER JOIN tbl_ReceiptDetails ON tbl_ReceiptMaster.receiptMasterId = tbl_ReceiptDetails.receiptMasterId
INNER JOIN tbl_AccountLedger ON tbl_ReceiptDetails.ledgerId = tbl_AccountLedger.ledgerId
order by cast (tbl_ReceiptMaster.receiptMasterId as decimal(10,2)) desc ;

这里是错误:

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that 
corresponds to your MySQL server version for the right syntax to use near
'decimal(10,2)) desc' at line 11

我该如何修复这个错误?

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com