随笔分类 -  常用SQL

常用的SQL
摘要:merge语法是根据源表对目标表进行匹配查询,匹配成功时更新,不成功时插入。 其基本语法规则是 merge into 目标表 a using 源表 b on(a.条件字段1=b.条件字段1 and a.条件字段2=b.条件字段2 ……) when matched then update set a. 阅读全文
posted @ 2018-05-29 16:43 我不卖豆腐 阅读(1377) 评论(0) 推荐(0)
摘要:declare g_commit_count number; cursor cu1 is select gl_flexfields_pkg.get_description_sql(gcc.chart_of_accounts_id, 1, --1 ... 阅读全文
posted @ 2017-05-19 14:23 我不卖豆腐 阅读(2172) 评论(0) 推荐(0)
摘要:下面是销售订单的四个主要环节和每个环节用到的常用表:一、登记1、oe_order_headers_all--订单头信息表2、oe_order_lines_all--header_id=oe_order_headers_all.header_id--订单行信息表3、mtl_sales_orders--segment1=oe_order_headers_all.order_number--sales_order_id=mtl_material_transaction.transaction_source_id--记录订单编号的信息表4、wsh_delivery_details--source_he 阅读全文
posted @ 2013-09-29 10:53 我不卖豆腐 阅读(495) 评论(0) 推荐(0)
摘要:网上的解决方法:Cause:A reference was made to a variable not listed in the SELECT clause. In OCI, this can occur if the number passed for the position parameter is less than one or greater than the number of variables in the SELECT clause in any of the following calls: DESCRIBE, NAME, or DEFINE. In SQL*Form 阅读全文
posted @ 2012-04-19 11:30 我不卖豆腐 阅读(22896) 评论(0) 推荐(1)
摘要:1.取得当前账册下ORG_IDSELECT orgs.org_id,ou.set_of_books_id FROM (SELECT DISTINCT prv.profile_option_value org_id FROM apps.fnd_profile_options_vl pro, applsys.fnd_profile_option_values prv, (SELECT 10003 level_id, furg.responsibility_id level_value FR... 阅读全文
posted @ 2012-03-30 15:09 我不卖豆腐 阅读(2650) 评论(0) 推荐(0)