我试图在oracle 11g上执行以下SQL语句
select product.product_id, category.category_id, product.name, category.description
from product , category
inner JOIN category_prodcut ON category.category_id = category_prodcut.category_id
inner JOIN category_prodcut ON product.product_id = category_prodcut.product_id;
但出现以下错误:
ORA-00904:“ PRODUCT”。“ PRODUCT_ID”:无效的标识符 00904. 00000-“%s:无效的标识符” *原因:
*行动: 错误在行:56列:32
该如何解决?怎么了?
product_id在那里是因为我这样做:
select product_id from product;
一切正常
答案 0 :(得分:2)
我只能想象您正在尝试编写此查询:
<script type="text/javascript">
$(document).ready(function(result){
if($("#id_purchasetotal-0-Disc_p").val() != ''){
$('#id_purchasetotal-0-Quantity_p, #id_purchasetotal-0-rate_p, #id_purchasetotal-0-Disc_p').on('change', function() {
$('#id_purchasetotal-0-Total_p').val($('#id_purchasetotal-0-Quantity_p').val() * $('#id_purchasetotal-0-rate_p').val() * (1 - ($("#id_purchasetotal-0-Disc_p").val()/100)));
});
}
else {
$('#id_purchasetotal-0-Quantity_p, #id_purchasetotal-0-rate_p').on('change', function() {
$('#id_purchasetotal-0-Total_p').val($('#id_purchasetotal-0-Quantity_p').val() * $('#id_purchasetotal-0-rate_p').val());
});
}
});
</script>