SQLSyntaxErrorException:ORA-00933:SQL命令在oracle中未正确结束
有人能帮我解答这个问题吗SQLSyntaxErrorException:ORA-00933:SQL命令在oracle中未正确结束,oracle,Oracle,有人能帮我解答这个问题吗 select trans_dt,trans_acc_no,trans_desc,trans_amt,transaction_type as trans_type , replace(trans_type,'credit','CR'), replace(trans_type,'debit','DB') from bank_transaction where (trans_amt>10000 and cust_type != bank_rd_account) orde
select trans_dt,trans_acc_no,trans_desc,trans_amt,transaction_type as trans_type , replace(trans_type,'credit','CR'), replace(trans_type,'debit','DB') from bank_transaction
where (trans_amt>10000 and cust_type != bank_rd_account)
order by(trans_type asc and trans_date desc) ;
remove and between order by子句-它给出了语法错误
select
trans_dt,
trans_acc_no,
trans_desc,
trans_amt,
transaction_type as trans_type,
replace(trans_type, 'credit', 'CR'),
replace(trans_type, 'debit', 'DB')
from
bank_transaction
where
(
trans_amt > 10000
and cust_type != bank_rd_account
)
order by
trans_type asc,
trans_date desc
有关订购人的更多信息,请参考url
删除和在order by子句之间-它给出了语法错误
select
trans_dt,
trans_acc_no,
trans_desc,
trans_amt,
transaction_type as trans_type,
replace(trans_type, 'credit', 'CR'),
replace(trans_type, 'debit', 'DB')
from
bank_transaction
where
(
trans_amt > 10000
and cust_type != bank_rd_account
)
order by
trans_type asc,
trans_date desc
有关订购人的更多信息,请参考url
在sql
中,订单不能在括号内给出。它应该如下所示
例如:
SELECT * FROM table_name ORDER BY column1 ASC|DESC, column2 ASC|DESC
您需要的查询如下所示:
select
trans_dt,
trans_acc_no,
trans_desc,
trans_amt,
transaction_type as trans_type,
replace(trans_type, 'credit', 'CR'),
replace(trans_type, 'debit', 'DB')
from
bank_transaction
where
trans_amt > 10000
and cust_type != bank_rd_account
order by
trans_type asc,
trans_date desc
在sql中,订单不能在括号内给出。它应该如下所示
例如:
SELECT * FROM table_name ORDER BY column1 ASC|DESC, column2 ASC|DESC
您需要的查询如下所示:
select
trans_dt,
trans_acc_no,
trans_desc,
trans_amt,
transaction_type as trans_type,
replace(trans_type, 'credit', 'CR'),
replace(trans_type, 'debit', 'DB')
from
bank_transaction
where
trans_amt > 10000
and cust_type != bank_rd_account
order by
trans_type asc,
trans_date desc