plsql遇到的问题总结

前端之家收集整理的这篇文章主要介绍了plsql遇到的问题总结前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

sqlplus system/111111@localhost:1522/xe;进入oracle
create user GDB identified by GDB_PWD; 创建用户
grant all privileges to GDB; 权限设置
drop user zfmi cascade; 删除用户
set serveroutput on; log 在终端显示
sqlplus sys/111111@localhost:1522 as sysdba;
grant execute on utl_http to GDB;

select * from dba_data_files;
alter tablespace USERS add datafile ‘/u01/app/oracle/oradata/(XE)…./users01.dbf’ size 10240M;

alter tablespace USERS drop datafile ‘/u01/app/oracle/oradata/XE/sysaux.dbf’;

drop tablespace USERS including contents and datafiles;

~/.bashrc 添加环境变量

CONSTRUCTOR FUNCTION GetContractInventoryDetails RETURN SELF AS RESULT AS
BEGIN NULL; RETURN; END GetContractInventoryDetails;

TO_TIMESTAMP_TZ(‘08/13/2015’,’mm/dd/yyyy’)

grep -ih ‘create table’ table.sql >droptable.sql

Instr()函数返回字符或字符串在另一个字符串中第一次出现的位置

date -d “(awk-F.'{print1}’ /proc/uptime) second ago” +”%Y-%m-%d %H:%M:%S” 开机时间

IGNORE_PLS_INTEGER(l_tmp_7.getobject(l_var_vpn_routing)); 将 l_tmp_7 类型 转成 l_var_vpn_routing 类型的值(复杂类型装换)

Anydata.convertObject(l_var_connection ) 将 l_var_connection 复杂类型的值 转成 anydata

IGNORE_PLS_INTEGER (l_res_n_list(i).getCollection (l_tmp_list(array) )); 将 l_res_n_list里的值传给l_tmp_list

need extend
l_offer_data := AnydataList();
l_offer_data.extend(l_offer_data_t.COUNT);
for i in 1..l_offer_data_t.COUNT
LOOP
l_offer_data(i):=AnyData.CONVERTVARCHAR2(l_offer_data_t(i));
end loop;

l_process .get_response().getTypeName()

IF l_tmp IS NOT NULL AND l_tmp.COUNT >0 THEN
l_function_type_list := FunctiontypeArray();
for i in 1..l_tmp.COUNT
LOOP
l_function_type_list.EXTEND;
IGNORE_PLS_INTEGER(l_tmp(i).getObject(l_function_type_list(l_function_type_list.COUNT)));
end loop;
END IF;

l_loc_addr_site_id_array := LocationsiteaddressidtypeArray();
l_loc_addr_site_id_array.extend;
l_loc_addr_site_id_array(l_loc_addr_site_id_array.count):=l_loc_addr_site_id;
p_site_addr_list.set_loc_site_addr_id(l_loc_addr_site_id_array);

exception when others THEN
dbms_output.put_line(‘exception!’);
dbms_output.put_line(‘error message: ‘||sqlerrm);
dbms_output.put_line(‘error position: ‘||dbms_utility.format_error_backtrace);

2015-AUG-10 12:18:20
2015-01-01T00:00:00

LOOP
fetch l_cr into l_equip;
EXIT WHEN l_cr%NOTFOUND;
l_result.extend;
l_result(l_result.COUNT) := Anydata.convertvarchar2(l_equip);
END LOOP;

EXCEPTION
WHEN DatanotFoundException THEN
BEGIN
log_debug ((‘debug’) || ‘: ’
|| (‘Caught Data Not Found Exception from GetAsset!!!!No rethrow here!!!’
|| sqlERRM ));
END;
log_vistit改成 log_debug (‘contract_discount_to_gcsm:’||l_pstmt );
log4j_visit (‘debug’,‘unknown_function’,
** discountDetailsList.size() = ’
|| TO_CHAR (l_discount_details_list .COUNT));

l_limit := (CASE WHEN l_j + 1000 <= p_idlist .COUNT THEN l_j + 1000
ELSE p_idlist .COUNT END);

plsql 也称过程化的sql,是oracle对sql的扩充,在普通 sql 的基础上增加了编程语言的特点

plsql 语言的组成:块结构,一个plsql一般有以下几个部分
DECLARE –变量定义部分

BEGIN –执行体的开始

EXCEPTION –异常处理(可选的)

END; –执行体的结束

chr(10)表示换行,chr(13)表示回车

IF condition1 THEN
statements1;
ELSIF condition2 THEN
statements2;
ELSE
else_statements;
END IF;

LOOP
statements;
exit [when condition]
END LOOP;

WHILE condition
LOOP
statements
END LOOP;

FOR var IN lowest_number..highest_number
LOOP
statements
END LOOP;

异常处理的完整流程:
定义异常->抛出异常->捕获及处理异常
处理非预定义异常
非预定义异常有错误号没有名字,处理的办法是:自己定义一个名字,绑定到错误号,捕获错误

DECLARE
    myexcp EXCEPTION;
    PRAGMA EXCEPTION_INIT(myexcp,-02292);
    dno emp.deptno%type;
BEGIN
    dno:=&inputno;
    delete from dept where deptno=dno;
EXCEPTION
    WHEN myexcp THEN
        delete from emp where deptno=dno;
        delete from dept where deptno=dno;       
END;
/

自定义异常处理
例:定义一个异常,往emp表中插数据,如果工资少于1500 抛出异常,不能让他插
DECLARE
v_no emp.empno%type;
v_name emp.ename%type;
v_sal emp.sal%type;
myexcp EXCEPTION;
BEGIN
v_no:=&inputno;
v_name:=&inputname;
v_sal:=&inputsal;

if v_sal<1500 then
        raise myexcp;
    end if;   

    insert into emp (empno,ename,sal) values (v_no,v_name,v_sal);

EXCEPTION
    WHEN myexcp THEN
        insert into emp (empno,1500);
END;
/

创建DML触发器
CREATE OR REPLACE TRIGGER trigger_name
BEFORE|AFTER event ON table_name
[FOR EACH ROW] #加了这一个就是行级触发器,如果不加就是语句级
[DECLARE]
BEGIN
body
END;

例:定一个触发器,禁止用主户在非工作时间修改emp表
create or replace trigger change_emp
before insert or update or delete on scott.emp
begin
if (to_char(sysdate,’fmhh24’) not between 9 and 18) then
raise_application_error(-20000,’DML on ad 9:00-18:00’);
end if;
end;
/

存储过程
过程定义:
CREATE [OR REPLACE] PROCEDURE procedure_name
[(part_name [ IN | OUT | IN OUT] datetype… )]
[AUTHID DEFINER | CURRENT_USER]
IS | AS
BEGIN
procedure_body
END
过程调用、运行
call | execute procedure_name(part_list);
存储过程运行权限要求:
1、运行一个过程时,默认是以定义者的权限来访问相关表,所以即便运行无法访问存储过程涉及到的表,
过程也能运行,如果要改变这种方式在定义过程时加 AUTHID CURRENT_USER

requestDoc DBMS_XMLDOM.domdocument;
requestNode XMLDOM.domnode;

l_clob_1 := TO_CLOB(l_tmp_string);
requestDoc := dbms_xmldom.newDOMDocument (l_clob_1);
requestNode := XMLDOM.item (xmldom.getelementsbytagname (requestDoc,‘updateAccountRequest’ ),0);
request := SoapDecUpdateAccountRequest.decode_update_account_request(requestNode);

l_tmp_1 anydata;
requestMap := Varchar2AnydataMap_gdb();
requestMap.put(‘Request’,ANYDATA.convertObject(request));
l_tmp_1 := p_request_map .get(‘Request’);
IF l_tmp_1 IS NOT NULL THEN
IGNORE_PLS_INTEGER (l_tmp_1.getObject (l_request ));
END IF;

if responseMap.containsKey( ‘Response’) then
responseDoc := SoapEncUpdateAccountResponse.encode_root_upd_acc_resp(response);
l_xmltype := dbms_xmldom.getXmlType(responseDoc); —-将responseDoc转成XML格式。
dbms_xmldom.freeDocument(responseDoc);
response_clob := l_xmltype.getClobVal; —-将xmltype转成clob格式的

JAVA 通过JDBC 连接oracle:
public static void main(String[] args) {
try{
Class.forName(“oracle.jdbc.driver.OracleDriver”);
Connection conn = DriverManager.getConnection(“jdbc:oracle:thin:@localhost:1522:xe”,“charlene”,“123”);
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(“SELECT * FROM csi_dppco.address”);
while(rs.next()){
System.out.println(rs.getInt(1) + “\t” + rs.getString(2));
}
}catch(Exception err){
System.out.println(err.toString());
}

}

正则表达式: 删除空行
^[\s\t]*\n
sed -i ‘/^\@.* /a\showerrors;test.sql MOUSETRAP_HOME/bin/xml-transformer in.xml mapping.txt out.xml

方法编译方式:
DiscountdetailsListAdd (l_discount_details_list,l_discount_det );
文件编译一遍,有这个方法文件
CREATE OR REPLACE PROCEDURE
DiscountdetailsListAdd (list IN OUT DiscountdetailsList,v IN
DiscountDetails )
IS BEGIN list.extend ; list (list.count ) := v ; END ;
/

终端路径:要在你正在编译的目录下

l_bvoip_schedule_discounts := BvoipscheduletypeArray ();
l_bvoip_schedule_discounts (l_tag_number + 1) := BvoipScheduleType ();
类型不匹配修改

component ‘SET_GCP_RATE_PLAN_EFFCTV_DATE’ must be
declared

这种就是缺少函数
要在typ里面写入

构造函数的关键字是constructor
MEMBER FUNCTION get_schedule_discounts (SELF IN BvoipCountryInfo ) RETURN
BvoipscheduletypeArray,
CONSTRUCTOR FUNCTION BvoipCountryInfo RETURN SELF AS RESULT)
CONSTRUCTOR FUNCTION NmapNetworkLegacy RETURN SELF AS RESULT IS BEGIN RETURN; END;
函数之间是逗号分割,最后一个不写逗号。

Invalid reference to variable ‘L_SCL_EFF_DATE’
log4j_visit (‘debug’,‘** sclEffDate(for BVOIP AVPN Facilitaion) = ’ || l_scl_eff_date .to_string());

FORCE UNDER DppcoUtil_dppqcb
是继承关系

Ctrl+Y

恢复撤销

lc_rs%ISOPEN

l_tmp_2 := l_tmp_1.request;

BEGIN
– l_tmp_2 := l_tmp_1 ;
l_tmp_2 := l_tmp_1.request;
IF l_tmp_2 IS NOT NULL THEN
IGNORE_PLS_INTEGER (l_tmp_2.
getObject (l_discount_det_1 ));
END IF;
END;
– l_discount_det_1 := l_tmp ;

p_atp_info IN OUT NOCOPY
AtpInfoType,p_solution_type IN VARCHAR2 )
nocopy什么意思:
in out说明这个参数数个传入传出参数
varchar2是类型
nocopy:引用别人的话
pl/sql中对out,in out参数使用的?默认形参会复制一份实参的副本,然后在内部传递,修改等,发生异常,不会赋值给实参,控制权交还调用环境,而实参值不变,还是调用前的值。而使用了nocopy后,形参将获得一个指向实参的指针,然后在内部传递,赋值都直接修改实参了,此时如果异常发生,控制权交还调用环境,但是实参已经被修改了。无法还原成调用前的值。

gsm模块什么意思:

PLS-00526: A MAP or ORDER function is requ
http://cache.baiducontent.com/c?m=9d78d513d9811fee4fece4690d60c067695682643cd3c7140fc3923b84642a12506692e474600704a2983c7001de141cbca77665377274f0c799ce1180e785285ed36623706dc61651940de88b182a9b66d618feae6afaa7b577d6b9d2a48214008c005524d7e78b2d51499572ad5462b2f8ce5f15294deab56734b94e775fd96802e150f996633358c3a59d070d9e76cd&p=9065d110cd934eab5cbfc7710f54&newp=c263c54ad2c75ded0dbbc7710f5192695803ed633ed3d1093d81c5&user=baidu&fm=sc&query=PLS-00526%3A+A+MAP+or+ORDER+function+is+requ&qid=88875ae60005e024&p1=2

lc_rs是cursor Java里所有对象都可以toString plsql里不行
打log只能是varchar2类型的, lc_rs是游标

过滤目录:
applypatch:
右键create patch:

grep -c ‘Index’ att_merged02_2_16.patch

匹配开头
svn stat | grep ‘^?’

执行顺序
install.sql
install_common.sql
dppqc.sql
dppqc_new.sql
dppqc_pkg (调用了api)自己写
dppqc.pkb

test_aaa.sql(data.sql/table.sql/test01.sql)

l_cust_info_type (l_tag_number1 + 1).set_main_telephone(l_in_country .get_main_phone());

_cust_info_type (l_tag_number1+ 1).main_telephone :=_in_country .main_telephone. ; _cust_info_type (l_tag_number1+ 1).isset_main_telephone := ‘T’;

delete the duplicate type and body of the wsheader_dppqcb

unless type

REM INSERTING into BCI_DPPCO.CONTRACT
SET DEFINE OFF;

l_is_contract_available := get_property_dppqcb (‘Is_Contract_Available’);

sql> SELECT ECATSNUMBER FROM bci_dppco.CONTRACT WHERE CONTRACTID =1;

ECATSNUMBER

20140213-3704

lc_ecats_num_rs := /* NOT TRANSLATED: getEcatsNumPstmt.executeQuery() */ NULL;
游标改成这个:
open lc_ecats_num_rs for replace_question_marks(l_get_ecats_num_pstmt) using tmp_1 ;
执行update
EXECUTE IMMEDIATE replace_question_marks(l_update_ecats_num_pstmt) using tmp_1,tmp_2;

NVL (column1,0)什么意思?
。它的格式是NVL( string1,replace_with)。它的功能是如果string1为NULL,则NVL函数返回replace_with的值,否则返回string1的值,如果两个参数都为NULL ,则返回NULL。

EXECUTE IMMEDIATE replace_question_marks (l_cstmt ) USING tmp,tmp_1,tmp_2 ;

select * from CONTRACT where CONTRACTID=”’|| l_contract_id1 || ”’

rs = pstmt.executeQuery();
if(rs.next())

IF /* NOT TRANSLATED: rs.next() */ NULL then

l_contractquery := ‘select * from CONTRACT where CONTRACTID=”’
|| l_contract_id1 || ””;
l_pstmt := l_contractquery ;
OPEN lc_rs FOR l_pstmt ;
l_flag := NULL;
FETCH lc_rs INTO pager_number_1;
pager_number_1 BCI_dppco.CONTRACT%rowtype;
if lc_rs%rowcount >0 then

l_contract_status_flg AND UPPER (TRIM (l_contract_status ))
= UPPER (‘CustomerSigned’)

只要if 下面有句子,是还要走的。

还有找标签类型:
l_contract: ContractType–>tyb
MEMBER FUNCTION get_contract_status (SELF IN ContractType ) RETURN
VARCHAR2 IS BEGIN RETURN SELF .contract_status; END;
–>soapdecsetcontractreqt.pkb
contract_status–>l_name

IF l_name = ‘ContractStatus’ THEN
BEGIN l_obj .contract_status := SoapDecCommon_dppqcb.decode_string (l_child ); END;
END IF;

l_obj ContractType ;

svn :记得mine
resitory

sublime :
preference:
自动换行
“word_wrap”:true,
“wrap_width”:80

记得写分号

@plsql/com/att/edb/dppco/query/SetContract.tyb
@query_properties_insert.sql;
@tests/SetContract/setContract_table.sql;

2016/2/22 Victor How to effectivly work on Steyr project? 1
2016/3/23 Carrie How to quickly adapt yourself to Steyr RE project 1
2016/4/25 Brain Steyr project expericce sharing 1
2016/5/26 Andy Steyr project expericce sharing 1
2016/5/26 Jason Steyr project expericce sharing 1
2016/6/27 Julia Steyr project expericce sharing 1
2016/7/25 Charlene Steyr project expericce sharing 1
2016/8/22 Roy Steyr project expericce sharing 1
2016/9/26 Eileen How to develop tool/script for RE project? 1

2016/9/26 Sherry Steyr project expericce sharing 1

2016/10/24 Abby How to effectivly work in Steyr project? 1
2016/11/21 Paul Steyr project expericce sharing 1
2016/12/26 Evan Steyr project expericce sharing 1

LLINGINSTANCETYPE) = ”PRICEPLANINSTANCE” 最后这个改成单引号里面套上单引号

key的顺序
FOR l_idx_1 IN
1..l_to_be_iterated .getKeys().getNumEntries()
LOOP
l_tmp_2 := l_to_be_iterated.getKeys ();
l_instance_id := l_tmp_2.getByIndex(l_idx_1 );
BEGIN
SitesummaryinstancetypeArr1Add (l_result_list,
l_to_be_iterated .get(l_instance_id ));
END;
END LOOP;

其实需要将getkeys()放在最开始,最先初始化。
FOR l_idx_1 IN
l_tmp_2 := l_to_be_iterated.getKeys (); –step 1
FOR l_idx_1 IN
1..l_tmp_2.getNumEntries() – step 2
LOOP
l_instance_id := l_tmp_2.getByIndex(l_idx_1 ); –step 3
BEGIN
SitesummaryinstancetypeArr1Add (l_result_list,
l_to_be_iterated .get(l_instance_id ));
END;
END LOOP;

先后顺序FETCH

IF lc_rs%ISOPEN AND ( lc_rs%FOUND IS NULL OR lc_rs%FOUND
= TRUE) THEN
/* FETCH VARS GUESSED */ FETCH lc_rs INTO
ctnumber,contractedbusinessname,
contractindicator,sourcesystemid,
priceplaninstanceid,
attcontractsolutionnumber,contractsubtype ;

fetch lc_rs into
ctnumber,contractsubtype ;
if lc_rs%isopen and lc_rs%found then/by script end/

EXECUTE IMMEDIATE l_ins_pstmt_ctrt_unavailable ;

EXECUTE IMMEDIATE replace_question_marks(l_ins_pstmt_ctrt_unavailable) using tmp_29,tmp_30
,tmp_31,tmp_32,tmp_33,tmp_34,tmp_35,tmp_36,tmp_37,tmp_38,tmp_39,tmp_40,tmp_41,tmp_42;

WHILE l_discount_details_it%FOUND
LOOP
BEGIN
l_tmp_1 := /* NOT TRANSLATED: discountDetailsIt.next() */ NULL;
BEGIN
– l_tmp_2 := l_tmp_1 ;
l_tmp_2 := l_tmp_1.request;
IF l_tmp_2 IS NOT NULL THEN
IGNORE_PLS_INTEGER (l_tmp_2.
getObject (l_discount_det_1 ));
END IF;

for i in 1..l_discount_details_list.count
LOOP
BEGIN
l_tmp_1 := /* NOT TRANSLATED: discountDetailsIt.next() */ NULL;
BEGIN

if l_discount_details_list(i) is not null then 
                            l_discount_det_1 := l_discount_details_list(i);
                            end if;

l_tmp := /* NOT TRANSLATED: pricePlanInstanceIdIt.next() */ NULL;
l_price_plan_instance_id := objectToString (l_tmp );
need to changed :
– WHILE l_price_plan_instance_id_it%FOUND
for i in 1..l_price_plan_instance_id_list.count
LOOP
BEGIN
l_tmp := /* NOT TRANSLATED: pricePlanInstanceIdIt.next() */ NULL;
l_price_plan_instance_id := l_price_plan_instance_id_list(i)/objectToString (l_tmp )/;
l_discount_percent_list := AnydataList ();
不用方法了,直接赋值
l_tmp:=l_country_info_set.getByIndex(i);
l_country_code := /safeAccessVarChar2 (l_tmp );/l_tmp;
IF l_contract_end_date IS NOT NULL THEN
BEGIN
l_cal_contract_end_date := l_contract_end_date /* NOT TRANSLATED: new Date(contractEndDate.getTime()) / /*NULL/;
END;
END IF;

getInteger(custStrata)
TO_NUMBER(l_cust_strata)

类型转换
– pricing_plan_inst_id_lt := priceplaninstanceid ;

pricing_plan_inst_id_lt := Varchar2List();
后面的赋值给前面的
Varchar2ListAdd(pricing_plan_inst_id_lt,priceplaninstanceid);

IF /* NOT TRANSLATED: rs.next() */ NULL
changed to
IF lc_rs%FOUND then

l_customer_id ||””;
双单引号

l_request_mis .set_serviceperiod( /* NOT TRANSLATED: new Integer(contractPeriod) */ NULL);
l_request_mis .set_serviceperiod(cast(l_contract_period as INTEGER));

– l_in_put_list .transactionid := objectToString (p_hm .correlation_id);
l_in_put_list .transactionid := safeAccessVarChar2 (p_hm .correlation_id);
typ里面
不能注释别人的方法

get
ls_rc 类型错误

DBMS_XMLDOM可以查找文档

若是直接改成docment.comment不行的要改成getlength()>0

ignore_pls_integer(p_ref.getvarchar2(l_tmp)); // l_tmp(varchar2(32767);)转换为anydata类型
Varchar2Array1Add (l_vararray,l_tmp); //l_tmp赋值给l_arry
Varchar2Array1Add (list IN OUT NOCOPY Varchar2Array,v IN VARCHAR2 ) IS
BEGIN list.extend ; list (list.count ) := v ; END ;
p.map.put(p_key,l_varrray)
function getvarchar2 (anydata_p in sys.anydata) return varchar2;

MEMBER FUNCTION GETOBJECT(
self IN ANYDATASET,
obj OUT NOCOPY “”)
RETURN PLS_INTEGER;

http://psoug.org/reference/anydata.html 查阅方法的东西
http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/t_anyset.htm#BABGIGIH 这里面可以直接查找 用到的方法

getcustumer
test_setcontract.sql里面是只能写一个log
但是test_01里面可以写log.在

SET SERVEROUTPUT ON ;
DECLARE
request CONSTANT CLOB :=to_clob(’
test_sxxxxxx.sql

xxxxxxxxxxx_test01.sql

set serveroutput on size unlimited;
spool test_setcontract.log;

=============
getNetworkElementAssetDetails.tyb
get_net_el_asset_det
steps
查找你要用的: (看responsedocument)
erged_03_21/plsql/webservice/DboripnaiSvc.typ:
public NetworkElementAssetDetailsResponseDocument getNetworkElementAssetDetails (com.att.cio.commonheader.v3.WSHeaderDocument WSHeader,java.lang.String assetQueryType,java.lang.String deviceID,java.lang.String slotID,java.lang.String cardSerialNumber,java.lang.String portName)

in java you can find:
e/dboripnai/src/DBOR_IPNAI_Svc/src/DBORIPNAISvcContract.wsdl:

DBOR_IPNAI_Svc.java

public com.att.dbor.ip.nai.v1.NetworkElementAssetDetailsResponseDocument getNetworkElementAssetDetails(com.att.dbor.ip.nai.v1.

DboripnaiSvc_
里面的方法
MEMBER FUNCTION get_net_el_asset_det 有时候是缩写

做一个完整api的步骤
soupui
/sandBox/attworkspace/dboripnai/src/DBOR_IPNAI_Svc/src/DBORIPNAISvcContract.wsdl
大家都用的是一个
打开点soap->
nita wsdl

  1. wsdl生成xml/ create test files (table.sql,data.sql,test_01.sql)
  2. decode/encode
  3. api_interface define(pkg.pkb)

  4. 5.
    6

Steps to run the test cases:
进入到sql里面去执行这个命令
0. execute “create user GDB identified by {password}” then give privilege to the user GDB
1. @getContractPackage_table.sql to create the tables
2. @getContractPackage_data.sql to insert data
3. execute @dppqcb.sql to create related packages
4. execute @GetContractPackage_test01.sql to run the test script

create user mynew identified by 123456
create user mynewtest identified by 123456;
grant connect,dba,resource,unlimited tablespace to mynewtest;
grant all privileges to s_tirks;

设置全部权限,授权全部可用

– set linesize 180;
– set serveroutput on size unlimited;
– set define off;
– spool test01.log;
– @plsql/com/att/edb/dppco/query/GetContractPackage.tyb;
– show errors;
– @plsql/com/uniquesoft/utils/properties_dppqcb.pkg;
– show errors;
declare

request_clob clob :=’

spool off;


SELF .document := /* NOT TRANSLATED: documentBuilder.parse(xmlIn) */ NULL;

SELF .document := to_clob(SELF .response_string);

– SELF.bws_endpoint_url := ‘http://130.3.148.17/webservice/services/ProvisioningService‘;
SELF.bws_endpoint_url :=’www.baidu.com’;
SELF.bws_user_id := ‘EDFAdmin@bwas1-hcomm.att.net’;
SELF.bws_password := ‘EDFTrinity!1’;
SELF.bw_encoding_format := ‘ISO-8859-1’;
SELF.response_string := ”;

EXCEPTION WHEN others THEN
BEGIN
log_exception();
RAISE;
END;

======================================
成propty insert 脚本:
gen-prop-insert.sh properties_dppqcb /sandBox/projects/att2/working/trunk/ibm_8_03/DPPQCB.161/gcp_dppqcb.161/dppqcBc/src/Utilities/src/com/att/edb/dppco/util/ContractBillingQuery.properties getBillAccount

[3:04:17 PM] Paul Lu: gen-prop-insert.sh

l_response_values := Varchar2Varchar2arrayMap_gdb ();
/* NOT TRANSLATED: this.document.getDocumentElement() .normalize() */ NULL;
log_debug ((‘debug’) || ‘: ’
|| (‘Root element :’
|| /* NOT TRANSLATED: this.document.getDocumentElement() .getNodeName() */ NULL));
l_tn_un_assigned_list := /* NOT TRANSLATED: this.document.getElementsByTagName(“phoneNumber”) */ NULL;
l_temp := 0;
WHILE l_temp
< /* NOT TRANSLATED: tnUnAssignedList.getLength() */ NULL

changed to :

l_xml_doc := dbms_xmldom.newDOMDocument(self.document);
l_root_element := DBMS_XMLDOM.GETDOCUMENTELEMENT(l_xml_doc);
l_root_node := DBMS_XMLDOM.MAKENODE(l_root_element);
log_debug ((‘debug’) || ‘: ’
|| (‘Root element :’ || dbms_xmldom.getNodeName(l_root_node)));
l_tn_un_assigned_list := DBMS_XMLDOM.getElementsByTagName(l_xml_doc,’phoneNumber’);
FOR l_temp IN 0..( DBMS_XMLDOM.GETLENGTH(l_tn_un_assigned_list) - 1 )
LOOP
BEGIN
SELF .add_to_map(l_response_values,‘tnUnAssigned’,
AnyData.convertVarChar2 (DBMS_XMLDOM.GETNODEVALUE(xmldom.item(l_tn_un_assigned_list,l_temp))));

ibm_11_12/gcp_gdp.153/attmerged23_2/plsql/com/att/gcp/gdb/util/ OciclientLogin.tyb

===============
OPEN lc_rs FOR replace_question_marks (l_pstmt ) USING tmp ;
IF lc_rs%ISOPEN AND ( lc_rs%FOUND IS NULL OR lc_rs%FOUND = TRUE) THEN
/* FETCH VARS GUESSED */ FETCH lc_rs INTO
[3:06:39 PM] Paul Lu: 要改成:
OPEN lc_rs FOR replace_question_marks (l_pstmt ) USING tmp ;
/* FETCH VARS GUESSED */ FETCH lc_rs INTO

IF lc_rs%ISOPEN AND lc_rs%FOUND THEN

l_tmp  := l_tmp_1 ;
                l_hm  := ApplicationUtil.execute_type_sql_1 (l_tmp,l_sql,'OBJECT_ID');

……………

l_tmp  := AnydataArray();
                for l_id_x in 1.. l_tmp_1.count
                LOOP
                    AnydataArray1Add(l_tmp,anydata.convertNumber(l_tmp_1(l_id_x)));
                END LOOP;
                lc_rs  := ApplicationUtil.execute_type_sql_1 (l_tmp,

‘OBJECT_ID’);

– l_request := l_request_doc .get_bill_account_write_request();
l_request := request;

……………….

log_debug (‘debug’ || ‘:’|| ‘unknown_function’ || ‘:’|| 脚本可以改

response := l_bill_account_write_response;

projects url

– IF NULL IS OF (InvalidInputException ) THEN
IF sqlcode = -20024 THEN
IF NULL IS OF (DatanotFoundException ) THEN
IF sqlcode = -20027 then
IF NULL IS OF (BackEndSysDown ) THEN

if sqlcode = -20028 then

CONSTRUCTOR FUNCTION GetVrfNameByEvc(p_req GetVrfNameByEvcRequest) RETURN SELF AS RESULT IS BEGIN SELF.request :=p_req; RETURN;END;
MEMBER FUNCTION get_response RETURN Ge
constructor function RETURN SELF AS RESULT IS BEGIN request :=p_req;RETURN; END;

==============
table name:
bci_dppco.
‘csi_dppco.

==========
现在执行顺序:
sql:命令:
rlwrap 写在前面
sqlplus sherryzhu/123456@localhost:1522/xe; —-链接数据库
rlwrap sqlplus GDB/GDB_PWD@localhost:1522/xe;

screenshot 截图命令
gnome-screenshot -wd 10
[sherryzhu@rat196 Desktop]$ gnome-screenshot -wd 12

drop type Varchar2anydataarraymap1entry force;

接口(Java Naming and Directory Interface),在J2EE规

afs.sql

locate_field.pl ~/Desktop/aa.sql PVC pvc_lsite_id

drop table «schema.name».«table.name»;
changed to
drop table «table.name»;
create table «table.name»(

select * from a,b
where a.id=b.id(+)

这里的意思就是a,b表连接,a表先全部展示,然后b表id和a表一致的就连接上,没有的就补些空格在后边。

\n
,\n
匹配
shift+ 右键, 操作快速组成表

====================
rocCon.Create
这个就是链接
stmtInstar = instarConn.createStatement();

=================
issue: 0321
/sandBox/attworkspace/modified01_merged/plsql/com/att/edb/ctp/query/GetEthVplsDetailsStatics.pkb
Line :314
premise 改为了premise_instarConn

’ from site s,premise_instarConn p,SITE_CONTACT sc,instar.country ’ || ’ where s.loc_id = p.loc_id (+) and s.site_id = sc.site_id (+) ‘

==============
to_date(‘05-JUN-15’,’DD-MON-RR’),

--set back for add new by julia 
                    l_resp.customer_info :=l_cust_info;
                    l_resp.site_info :=l_site_info;
                    l_resp.access_port_info :=l_apil;
                    l_resp.pvc_info_list :=l_pvcl;

log_debug_configure.enable_logging();

next(),是返回当前元素, 并指向下一个元素。
hasNext(), 则是判断当前元素是否存在,并指向下一个元素(即所谓的索引

顺序问题;

–lc_rs34 := /* NOT TRANSLATED: ps34.executeQuery() */ NULL;
l_ps341 := GetEthVplsDetailsStatics.qry_3_4 ;–add by sherry
dbms_output.put_line(‘sql: ‘||replace_question_marks(l_ps341));
open lc_rs34 for replace_question_marks(l_ps341) using tmp_10 ;

query_statistics_afs.init_stats (replace_question_marks (l_ps341 ),'get_eth_vpls_detail');

dispatch disallowed 调用不允许

select 选出几个fetch就是要几个,不能少

Rtrim
返回字符串str与尾部的空格字符去掉

in.hasnext();判断有没下个元素,返回boolean
next()方法是取下个元素

SppInstarContext_ipnai2_install 这些怎么生成

workload :0322——
quary: 3

table: 4

’1’
l_request.put(‘ServiceType’,anydata.convertvarchar2(‘si’));
l_request.put(‘QueryType’,anydata.convertnumber(IpnaiMethodsStatics_ipnai2.listassetbykia));

==========
写在括号里面
CONSTRUCTOR FUNCTION NetElAssetDetReqstDocument RETURN SELF AS RESULT IS BEGIN null; RETURN; END;

‘dd-mm-yyyy hh24:mi:ss
‘14-08-2008 22:12:00’
YYYY-MM-DD”T”HH24:MI:SS”Z”
2015-08-14T22:12:00Z

=========
l varchartoanydata?
l_result: Varchar2AnydataMap

cStatics_ipnai2.logger .method_enter( /* NOT TRANSLATED: currentThread() */ NULL,l_method_name );

方法里面直接赋值:
ignore_pls_integer(p_request.request.getObject(l_net_el_asset_det_reqst));
l_param1 := l_net_el_asset_det_reqst.asset_query_type;
l_param2 := l_net_el_asset_det_reqst.device_id;

为空的要改的:
l_result := IpnaiFacadeStatics_ipnai2.spp_instar_context .get_net_el_asset_det(p_s1,p_s2,p_s3,p_s4,p_s5 );

l_spp_instar_context SppInstarContext_ipnai2;
l_spp_instar_context := SppInstarContext_ipnai2();
l_result := l_spp_instar_context .get_net_el_asset_det(p_s1,p_s5 );
l_result NetElAssetDetRespDocument ;

l_eq_instl_date := to_date(equipment_installed_dt,’yyyy-mm-dd hh24:mi:ss’) ;

l_utildate :=l_eq_instl_date;
l_xml_cal_cur2 := /* NOT TRANSLATED: new XmlCalendar(utildate) */ NULL;
l_installdate_xml := /* NOT TRANSLATED: new
XmlCalendar(xml_cal_cur2.toString()
.substring(0,xml_cal_cur2.toString() .indexOf(‘.’))) */ NULL;

-- GregorianCalendar gc = new GregorianCalendar(eqInstlDate.getYear(),eqInstlDate.getMonth(),eqInstlDate.getDay());
                --
                l_result .equipment_installed_dt := l_utildate ;

l_nai_edw_ipnai NaiEdwDao_ipnai2;
l_nai_edw_ipnai := NaiEdwDao_ipnai2();
l_net_list :=l_nai_edw_ipnai.get_net_el_asset_query_final(p_str2);

INSTR_AUX

l_param3 := l_net_el_asset_det_reqst.slot_id;

表名要重写
如果重新命名

昨天可以得到的结果,今天为什么一个得不到了?
需要运行一遍,执行get_net_el_()这个方法的tyb

– l_param1 := safeAccessVarChar2 ( /* NOT TRANSLATED: request.getParameter(“assetQueryType”) */ NULL);

果然是要改的,改成:
l_net_el_asset_det_reqst NetElAssetDetReqst;

l_net_el_asset_det_reqst := NetElAssetDetReqst();
ignore_pls_integer(p_request.request.getObject(l_net_el_asset_det_reqst));
l_param1 := l_net_el_asset_det_reqst.asset_query_type;

log_debug (replace_question_marks (l_statement ));
query_statistics.init_stats (replace_question_marks (l_statement ),‘get_net_el_asset_query_final’);

atttables:
users.sql
create table linkeduser.gcp_Service( ); 相同的是在
@/sandBox/attworkspace/atttables/tables/GCP_Circuit+EDF_TO_IDIS.DB.ATT.COM.table.sql
table drop/table create
select count(*) from gcp_Service@EDF_TO_IDIS.DB.ATT.COM;

my_user:
desc gcp_Service
drop table gcp_Service;
create synonym gcp_service@EDF_TO_IDIS.DB.ATT.COM;
delete gcp_circuitcircuit 删除里面的数据
drop synonym gcp_node_1

空格写的有问题,也要删掉的

l_statement := SppIdissqlStringIntfStatics.get_clfi_info_query ;
tmp := p_p1 ;
tmp_1 := p_p2 ;
log_debug (replace_question_marks (l_statement ));

WHILE /* NOT TRANSLATED: rs.next() */
改为:
WHILE /* NOT TRANSLATED: rs.next() */ l_rs.next()

–l_a_clfi_uni_holder .clfi_id := NVL(clficircuitid,0);

LOOP
/* FETCH VARS GUESSED */ FETCH lc_rs INTO
uni_circuit_id,acna,ban,cs_name,in_effect_indicator,ubid,uverse_ban,customer_name ;
EXIT WHEN lc_rs%NOTFOUND ;
BEGIN
l_a_clfi_uni_holder := ClfiUniHolder ();
l_a_clfi_uni_holder .uni_ckt := uni_circuit_id ;

ctrl+ 右键 也是复制的意思

l_result .set_device_description(l_rr_1 .device_description);

用就用,不用就不用管。
l_result .install_date:=(l_rr .equipment_installed_dt);

create table

to_date(‘05-JUN-15’,’DD-MON-RR’)
to_date(‘2014-02-14 20:47:00’,’yyyy-mm-dd hh24:mi:ss’)
to_date(‘2015-09-14T22:12:00Z’,’YYYY-MM-DD”T”HH24:MI:SS”Z”’)

NAI_EDW_EQUIPMENT_USER_ATTR_naiEdw
EQUIPMENT_USER_ATTR_naiEdw

nai_edw_server_parameter_naiEdw
server_parameter_naiEdw

nai_edw_network_equipment_mfr_naiEdw
network_equipment_mfr_naiEdw

NAI_EDW_PATH_USER_ATTRIBUTE_naiEdw
PATH_USER_ATTRIBUTE_naiEdw

SVN失败了然后再更新一下,出现delete才对了
不用在上面直接删

uniSvc.In_Effect_Indicator

uniSvc.”In-Effect_Indicator”

单引号:
① 表示字符串常量
② 字符串中的双引号仅仅被当作一个普通字符进行处理。此时,双引号不需要成对出现
安装的时候把那个contract那个选项关了,要不然特别慢
你把下载的文件解压,应该有两个文件一个是piugin 和feature这两个文件,接着将这些文件分别放入到eclipse的对应文件夹下面,就可以了,eclipse提供这种安装插件方法,类似如接口。很方便。下次启动eclipse时它会自动加载插件
消除勾选的从官网检查的选项

pi返回是array的在写package的时候,将array封装到相对应的response里面
[4:47:14 PM] Julia Zhang: 然后进行encode
[4:49:14 PM] Julia Zhang: ========================比如================================
—————————————-declare————————————————–
l_result ContactdetailArray;
l_result_list ContactdetailList;
l_wsh_doc WsHeaderDocument_bvoip2;
——————————–body———————————————-
l_wsh_doc :=WsHeaderDocument_bvoip2();
l_wsh_doc.ws_header :=request.ws_header;
l_result := api.list_contact_detail_by_site_id(l_wsh_doc,request.site_id,request.remote_site_id,request.site_status);
l_result_list.contact_detail_array :=l_result;
response.contact_detail_list :=l_result_list;
if response is not null then
– ignore_pls_integer(resp_hm.response.getObject(response_doc));
– response := response_doc .vrf_name_response ;

-- commit;
    res_dom_doc := SoapEncListCntcDetBySiteIdResp .encd_root_list_cntc_det_by (response);

In-Effect_Indicator

create table a(“in-d” varchar2(200));
insert into a (“in-d”)values(‘ll’);

plsql DborbvoipsdSvc.tyb
not translated function : arraycopy()

/* NOT TRANSLATED: arraycopy(convertToAnyData(_response1),convertToAnyData(_response),
_response1.length) */ NULL;

使用arraycopy() 时注意数组的索引从1开始,不是从0 开始
++++++++++++++++++++++++++++++++++++++++++++++++++++
translated code:
create or replace procedure arraycopy
(src in anydataarray,srcpos in integer,dest in out nocopy anydataarray,destpos in integer,length in integer)
is
procedure arrayextend(array in out nocopy anydataarray,endindex in integer) is
l_count integer;
l_length integer;
begin
if array is null then array := anydataarray(); end if;
l_count := array.count;
if l_count >= endindex then
return;
else
l_length := endindex - l_count;
array.extend(l_length);
return;
end if;
end;
begin
if src is not null and src.count > 0 then
if dest is null then dest := anydataarray(); end if;
if srcpos is null or destpos is null or length is null and (srcpos+length-1 > src.count)then
dbms_output.put_line(‘java.lang.system error : IndexOutOfBoundsException’);
return;
else
arrayextend(dest,destpos+length-1);
for i in 0..(length-1)
loop
dest(destpos+i) := src(srcpos+i);
end loop;
return;
end if;
else
dbms_output.put_line(‘java.lang.system error : NullPointerException’);
return;
end if;
end;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
test code:
set serveroutput on;
declare
l_array anydataarray;
l_array_1 anydataarray;
begin
l_array:= anydataarray();
l_array_1 := anydataarray();
l_array_1.extend(3);
l_array_1(1):= anydata.convertvarchar2(‘my’);
l_array_1(2):= anydata.convertvarchar2(‘plsql’);
l_array_1(3):= anydata.convertvarchar2(‘test’);
arraycopy(l_array_1,1,l_array,3);
if l_array is not null and l_array.count >0 then
dbms_output.put_line(‘=======get array success’);
dbms_output.put_line(‘array count is: ‘||l_array.count);
dbms_output.put_line(‘element_1 is: ‘||safeaccessvarchar2(l_array(1)));
dbms_output.put_line(‘element_2 is: ‘||safeaccessvarchar2(l_array(2)));
dbms_output.put_line(‘element_3 is: ‘||safeaccessvarchar2(l_array(3)));
else
dbms_output.put_line(‘=======get array failure’);
end if;
end;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
———————-victor
[2:29:13 PM] Julia Zhang: 为什么不直接用arrayaddall
[2:29:29 PM] Julia Zhang: AnydataArray1AddAll(l_response,l_response1);
AnydataArray1AddAll(l_response,l_response2);
[2:29:42 PM] Julia Zhang: ——————————————————————————
/* NOT TRANSLATED: arraycopy(convertToAnyData(_response1),
_response1.length) */ NULL;
/* NOT TRANSLATED: arraycopy(convertToAnyData(_response2),
_response1.length,_response2.length) */ NULL;
[2:29:43 PM] Charlene Chen : 索引的位置

=================================
增加了arrayaddall.sql(victor写的),翻译 NOT TRANSLATED: arraycopy(….), 用到的更新下吧
[3:31:53 PM] Charlene Chen : arraycopy(l_response1,l_response,l_response1.count);
arraycopy(l_response2,l_response1.count +1,l_response2.count);

nonquoted identifiers can contain only alphanumeric characters from your database character set and the underscore (_),dollar sign (),andpoundsign(#).Databaselinkscanalsocontainperiods(.)and"at"signs(@).Oraclestronglydiscouragesyoufromusing and # in nonquoted identifiers.
标点符号
Quoted identifiers can contain any characters and punctuations marks as well as spaces. However,neither quoted nor nonquoted identifiers can contain double quotation marks or the null character (\0).

不能识别的句子总结:

oracle dms

==============

6 1 getSipIcSummary gcp_nmap 18T Sherry

===============
在根目录下运行
installapi.pl name

FETCH lc_rs BULK COLLECT INTO l_smplx LIMIT l_rs_limit

CHR()

“SYS.UTL_INADDR”,line 19
at “SYS.ANYDATA”,line 48

set serveroutput on;
declare
begin
dbms_output.put_line(UTL_INADDR.GET_HOST_ADDRESS);
end;
/
/sandBox/attworkspace/generated01_nmap/plsql/com/att/dbor/rubyweb/common/RubyWebUtils.tyb
at line 54
–delete
–l_ws_context .set_source_ip_address(UTL_INADDR.GET_HOST_ADDRESS);

(RubyWebConstantsStatics.icore_ds_name );

from vpn_ICoreDbor,ipfr_ICoreDbor
‘PsocDataSource’;

listIpagNteClfiPortInfo

select * from service_office_basic_info where to_date(date_month,’yyyy-mm-dd’)=’2010-05-31’
select sysdate,to_char(sysdate,’YYYY-DDd hh:mi:ss’) from dual

sqlSelectFetchItem returns sqlExpression:
sqlSelectFetchColumnItem | sqlAggrFunction

{sqlSelectFetchColumnItem}
(isDistinct = ‘distinct’)? (‘(‘)?columnRef = sqlColumnReferenceExpression (aliasName=ID)? (‘)’)?
;

sqlColumnReferenceExpression returns sqlExpression:
{sqlColumnReferenceExpression}
(aliasName = ID’.’)? columnName = ID (joinTag ?=’(’ ‘+’ ‘)’| newaliasname ?=’as’ newname?=ID)?

SELECT DISTINCT Company FROM Orders
1. 函数
sqlSelectFetchColumnItem | sqlAggrFunction|sqlPrimaryExpression
2.格式
select insert分为两个布局

3.日期写成固定格式的
date: “to_date(‘2014-02-14 20:47:00’,’yyyy-mm-dd hh24:mi:ss’)”
3.trim太复杂(层层 套)

http://tool.oschina.net/apidocs/apidoc?api=jdk-zh
4. update

update t_test t set t.password= ?,t.remark = ‘*’
columns+=sqlSelectFetchItem (‘=’ ‘?’ ‘,’ columns+=sqlSelectFetchItem )* (‘=”?”,’)?

/////////////
(‘update’)((sqlDataReferences+=sqlDatasetReference) (‘,’tableReferences += sqlDatasetReference)*)(‘set’)
(((‘,’)? condition1 += sqlConditionExpression ) | ( columns+=sqlSelectFetchItem (‘=’ ‘?’ ‘,’)?) )*
((‘where’) condition += sqlConditionExpression)? (‘;’)?

如果指定leading参数,oracle数据库去除任何等于trim_character的开头字符。
sql> select trim(leading ‘x’ from ‘xdylan’) “test_trim” from dual;

test_trim

dylan

TO_CHAR(ipa.total_port_state_date,‘YYYY-MM-DD’)

decode(round(co.port / 1000 - 1),-1,NULL,round(co.port / 1000 - 1)) AS basePort,mod(co.port,1000) AS port,

shift + 鼠标右键, 然后按住Tab键可以整体右移

https://eclipse.org/Xtext/documentation/301_grammarlanguage.html

omitted 英 [əʊ’mɪtɪd]
美 [oʊ’mɪtɪd]
v. 遗漏; 省略( omit的过去式和过去分词 ); 删掉; 忘记做

cardinality
英 [kɑ:dɪ’nælɪtɪ]
美 [ˌkɑ:də’nælətɪ]
n. 基数

caret 英 [ˈkærət]
美 [‘kærət]
n. 脱字号,补字号; 补字符号

tree rewrite action

https://eclipse.org/Xtext/documentation/301_grammarlanguage.html

expression 42
Operation {
left=Operation {
left=IntLiteral {
value=42
}
}
}

assigns

v. 指定; 指派; 分配( assign的第三人称单数 ); (作为说明或原因) 提出

if (isTrue())
    if (isTrueAsWell())  
        doStuff(); 
    else 
        dontDoStuff(); 


Condition: 
    'if' '(' condition=BooleanExpression ')' 
    then=Expression(这里应该是if else内部的条件) 
    (=>'else' else=Expression)?  (这里应该是又写了一个else)

token 英 [ˈtəʊkən]
美 [ˈtoʊkən]
n. 象征; 记号; 代币;
adj. 象征性的; 作为对某事的保证的; 作为标志的;
vt.

** is not accessible due to restriction on required library”的错误出现。
顾名思义,错误意思为是所需要的类库由于受限制无法访问。

forEach [
println(” ddddddddddddd”)

VALUES’ ‘(’ value += sqlPrimaryExpression (‘,’(value +=sqlPrimaryExpression))* 要value全写value

1.value = sqlPrimaryExpression 这种形式的会导致覆盖的可能
2.变量名要一致。 否则导致后面xtend用的时候会找不到文件
3.source 在xtend-gen
src-gen 都是源代码文件

4。xtextResource.allContents.filter(sqlInsertStatement).forEach[e|
println(“)_)))))) insert .. “) 这个后面加e是可以的
val values = e.value;
val tableRef = ((e.sqlDataReferences.head as sqlDatasetReference).refbase as sqlTableReference)
val tableName =tableRef.tableName
val schemaName = tableRef.schemaName
// val tableRef = resolve(e.leftOperand as sqlColumnReferenceExpression).refbase as sqlTableReference;
var columns = datamodel.findOrCreateSchema(schemaName.nullsafe[‘DEFAULT’].toUpperCase).
findOrCreateTable(tableName.toUpperCase).columns
columns.forEach[
c,i|c.addValue(
NodeModelUtils.getNode(values.get(i)).text
)
]
]

http://docs.oracle.com/javase/8/docs/api/
http://docs.oracle.com/database/121/ADFNS/adfns_packages.htm#ADFNS009

http://docs.oracle.com/database/121/SQLRF/ap_posix002.htm#SQLRF55542

DEC_NUM BIN_DOUBLE BIN_FLOAT


1234.56 1.235E+003 1.235E+003
0 Nan Nan
The following example returns bin_float if it is a number. Otherwise,0 is returned.

SELECT bin_float,NANVL(bin_float,0)
FROM float_point_demo;

BIN_FLOAT NANVL(BIN_FLOAT,0)


1.235E+003 1.235E+003
Nan 0

不是数字返回0

http://jingyan.baidu.com/article/ff411625b80d1312e48237a0.html

get_equipment_details
getEquipmentDetails_api

执行本文件需要的所有api文件脚本里面:
执行本tyb需要的所有api文件那个脚本:/sandBox/attworkspace/common_objects_shanghai/bin:
objects_shanghai/bin/installapi.pl
在工作目录下面:比如我的/sandBox/attworkspace/modified01_merged_0808 这个里面
install.pl CMDC_API_PKG

GetEquipDetRespDocument,
TYPE里面一定也要改呀 否则报错了

get_equipment_details
CmdcMethodsStatics.getequipmentinfo 539

EquipmentDetailQueryStatics

定位数据的位置和值的那个脚本是哪个
locate_field.pl file path that contains insert sql you want to deal with
locate_field.pl ~/Desktop/a.sql PVC pvc_lsite_id
chmod -R 777 *
chmod 777 .
CmdcUtils.checkNull(rs.getString(“deviceTid”)) !
l_equip_details .set_device_model(l_device_mdl );
fetch 跟select保持一致,不参考java代码。域要跟它一致。

FETCH lc_rs2 BULK COLLECT INTO
l_devicename_array,
l_deviceptnii_array,
l_deviceclli_array,l_nodetype_array,l_nodesubtype_array,l_nodeid_array

lc_rs3b_1 := ResultSet_cmdc (lc_stmt_rs );
@ /sandBox/attworkspace/modified01_merged_0808/tests/gcp/getEquipmentDetails/getEquipmentDetails_data.sql

Oracle 树操作(select…start with…connect by…prior) …_博客
2013年6月24日 - oracle树查询的最重要的就是select…start with…connect by…prior语法了。依托于该语法,我们可以将一个表形结构的以树的顺序列出来。在下面列述了or…
www.cnblogs.com/linjiq…
prior 在谁的前面就表示已查出数据的这个字段 作为将要查找下一条字段符合的条件。

http://www.cnblogs.com/linjiqin/archive/2013/06/24/3152674.html

{
“working_dir” : “ @H_75_1403@f@H_439_1404@older,cmd:[bash,c,echoeshowerrors;\nexit|sqlplussherryzhu/123456@H_403_1591@@localhost:1522/xe@ file”]
}

Click on Tools -> Build System -> New Build System
copy and paste the code below:
{
“working_dir” : “ f@H_439_1404@older,shellcmd:echoe@H_502_1743@‘showerrors;\nexit|sqlplus64paulgdb/paulgdb@localhost:1522/xe@ file”,
}
modify the password and user name.

click on File -> Save,save the file with the name: sqlplus.sublime-build

create a file named login.sql under the opened folder in sublime with the content:
set serveroutput on ;

delete gcp_circuitcircuit;
值是空的就选不出来

CONNECT BY PRIOR org_id = parent_id就是说上一条记录的org_id 是本条记录的parent_id

SVN: ‘0x00400103: Compare with Revision’ operation finished with error: svn: E195002: PREV,BASE or COMMITTTED revision keywords are invalid for URL

CmdcUtils.print_to_string (l_temp));

response_map.exception_1 :=SELF.process_exception(l_temp);
svn: E195002: PREV,BASE or COMMITTTED revision keywords are invalid for URL

IF lc_rs_rmt_dvc_ip_for_clfi IS NOT NULL AND lc_rs_rmt_dvc_ip_for_clfi%ISOPEN THEN CLOSE lc_rs_rmt_dvc_ip_for_clfi ;
END IF;
l_tmp_rs := NULL;

when other then
BEGIN
log_exception();
raise;
END;
关掉fetch后面的游标,写在循环的外面。
close lc_rs3b_1;
l_rs3b_2 := ResultSet_cmdc (lc_stmt_rs );
resultset关闭的时候:
l_rs3b_2.close();

getSCIDByCable

自己造requst时候字段从哪个文件找。

改密码:
alter sherry 123456 identified by 654321;
getComponentBySCID_ap

alter user sherry identified by 654321;
getUniCktDetailsbyCLCI same as getEvcByClci

l_request_SCIDByCable := ScidByCableRequest();
l_request_a := p_request.request;
if l_request_a is not null then
ignore_pls_integer(l_request_a.getObject(l_request_SCIDByCable));
end if;
l_param1 := to_char (l_request_SCIDByCable.start_row);
l_param2 := to_char ( l_request_SCIDByCable.max_rows);
l_param3 := to_char ( l_request_SCIDByCable.cable_id);
l_param4 := to_char ( l_request_SCIDByCable.cableloc_aclli);
l_param5 := to_char ( l_request_SCIDByCable.cableloc_zclli);

执行sql语句没翻译的这种改法:
l_rsh := ResultSetHelper_cmdc ( /* NOT TRANSLATED: statement.executeQuery(uniCktQuery) */ NULL);
其中 l_buf是The sql query is
OPEN l_cursor for l_buf;
l_rsh := ResultSetHelper_cmdc (ResultSet_cmdc(l_cursor));

open l_cursor_2 for (l_query_s || l_query || l_query_e);
l_rsh := ResultSetHelper_cmdc (ResultSet_cmdc(l_cursor_2));
WHILE l_rsh .next_1()

可通过level 关键字查询所在层次.
select a.*,level from persons.dept a start with paredeptid=0 connect by prior deptid=paredeptid
start with 后面所跟的就是就是递归的种子。
递归的种子也就是递归开始的地方 connect by 后面的”prior” 如果缺省:则只能查询到符合条件的起始行,并不进行递归查询
onnect by prior 后面所放的字段是有关系的,它指明了查询的方向
prior 表示上一条记录:
上一条记录的deptid是本条记录的pardptid. 上一条记录是本记录的父亲。
http://www.cnblogs.com/jack204/archive/2012/07/12/2587793.html
getConnectionSummaryReportData

set define off;
set serveroutput on;
spool getConnectionSummaryReportData_test.log
spool off;

注释一对儿的是“

– l_lst_log_service_types := /* NOT TRANSLATED: asList(arSvcTypes) */ NULL;
l_lst_log_service_types :=AnydataArray();
FOR i in 1..l_ar_svc_types.COUNT LOOP
l_lst_log_service_types.EXTEND;
l_lst_log_service_types(i) := anydata.convertvarchar2(l_ar_svc_types(i));
END LOOP;

( SELF .b_is_cpe_data_requested = ‘T’),翻译成java就是 this.bIsCPEDataRequested,

上溯:

NOT FINAL (重写)
(1)方法重载是一个类中定义了多个方法名相同,而他们的参数的数量不同或数量相同而类型和次序不同,则称为方法的重载(Overloading)
(2)方法重写是在子类存在方法父类方法的名字相同,而且参数的个数与类型一样,返回
值也一样的方法,就称为重写(Overriding)
因此你参数类型都不一样,所以不算做是重写,顶多是重载

http://cache.baiducontent.com/c?m=9f65cb4a8c8507ed4fece763105392230e54f7306a95c7150981cc18c9735b36163cfee667710d468d843f391cf21441b6ad7065307774ecc79bd65dddccc86e70d633712d5cd04e4e8e5fb8cb37719a7cc304&p=882a9645d59f03e009be9b7c5956cc&newp=8b2a971bc59a11a05bed973c4f4c94231610db2151d6d301298ffe0cc4241a1a1a3aecbf26211407d2cf796507ab4a5ce8fb3c70310834f1f689df08d2ecce7e719b7e&user=baidu&fm=sc&query=not+final&qid=e4fea8ca000a6217&p1=1

oracle with table as 的用法
http://jingyan.baidu.com/article/75ab0bcbc2f93bd6874db24a.html
where 条件只是满足最近的 一条select 语句的条件

sql中操作符<>表示“不等于”;
作为一个常量: ‘?VPNTACountry?’ AS vpn_ta_country,增加一个新的列

grant execute on utl_mail TO test_user;.
commit;
alt 文件负责权限设置的。

svn+ssh://shoreline.dnsalias.net/localproj/svn/steyr/trunk/ibm_4_25_2016/gcp_cmdc.162/modified01_merged/tests/gcp/getEquipmentDetails

查看进程 top
cd .Skype/

https://yiqixie.com/s/home/fcADqkGtPzgbbuN8LyImF0pMm
http://www.dpriver.com/pp/sqlformat.htm

mv a b 移除并且替换

cd .Skype/

类似的还有一个_6 :::
/sandBox/attworkspace/modified01_merged_bduis/plsql/com/att/grdb/services/helper/externalgeocodes/AbstrctGcdQryHndlrSttcs.pkb 这个要不要改??
AbstrctGcdQryHndlrSttcs.query_text_where_end_1 := ‘and (skv.source_value in ( ”’ || CHR (10);
AbstrctGcdQryHndlrSttcs.query_text_where_end_2 := ”’))’ || CHR (10);

inout 可读可写
encode也要执行

httpheader主要来存放cookie 信息的

httpbody主要用来存放post的一些数据,比如username =”xxxx”&password=”124”还有就是要上传图片的nsdata数据

AnydataSetHasNext_bduis 有没有下一个数值RtrtcrctlnktmSetHasNext
AnydataSetNext_bduis 设置下一个数值RoutertocircuitlinkitemSetNext

ignore_pls_integer(l_anydata.getobject(l_rtc_link_item_curr));

/sandBox/attworkspace/modified01_merged_bduis/plsql/com/att/grdb/services/interfaces/dataprovider/IGetDataForIPAddressSvc/DataForIpAddressItem.tyb

定义写在begin的前面
哪里设置 body 哪里设置header?

行数查找快捷方式: 出现两个冒号
ctrl -g

vim ~/.bashrc

GetAllConnectedManagedPVCSummaryFromVPNSvc.this. 指的是父类方法
AnydataSet_bduis ()

split
for i in 1..l_ar_str.coutn
loop
l_ar_strs.extend;
l_ar_strs(i) := l_ar_str(i) ;
end loop;
可以直接转换/////varchaarry 和varchar2arry

Character.isDigit(arStrs[3].charAt(iIdx)) 翻译明天问
显示类的名字
dbms_output.put_line(’ SELF .query_handler.TYPE======’||anydata.convertobject(SELF .query_handler).gettypename());

this.medxItemCurr.setInstallDate(argRs.getDate( “InstallDate”));
\t router.swdateinstalled InstallDate,\n” +

l_ret := NULL;
l_set_items := NULL;
IF p_arg_ret_in .list_mpsfv_is IS NOT NULL AND p_arg_ret_in .list_mpsfv_is.COUNT > 0 THEN
l_set_items := AnydataSet_bduis();

/sandBox/attworkspace/modified01_merged_bduis/plsql/com/att/grdb/services/interfaces/dataprovider/IGetDataForIPAddressSvc/ReturnType_11.tyb 这里类似没有翻译的方法
l_ip_addr_item := NULL;
l_pvc_item := NULL;
FOR l_i IN 0..(p_arg_ret_in .list_mpsfv_is.COUNT - 1)
LOOP
l_pvc_item := p_arg_ret_in .list_mpsfv_is(l_i + 1);
l_ip_addr_item := DataForIpAddressItem.convert_from_managed_pvc_smry (l_pvc_item );
l_set_items .put(anydata.convertobject (l_ip_addr_item) );
END LOOP;
END IF;

IF l_set_items IS NOT NULL THEN
l_ret := AnydataArray ();
l_fcall_tmp := AnydArryAddAllFromSet_bduis (l_ret,l_set_items );

END IF;
    RETURN l_ret ;

InterfaceDetailItem

DtfrpddRSStmArr1AddAllFromSet (p_dest_lst IN OUT NOCOPY DataforipaddressitemArray,p_source_set IN OUT NOCOPY
/* UNTRANSLATED TYPE: Set */ AnydataSet_bduis ) RETURN
BOOLEAN IS
l_modified BOOLEAN ; l_set_elem_iterator MapIterator ; l_set_elem DataForIpAddressItem ;
l_anydata anydata ;
BEGIN
l_modified := FALSE;
l_set_elem_iterator := MapIterator ();
– WHILE DataforipaddressitemSetHasNext (p_source_set,l_set_elem_iterator )
WHILE AnydataSetHasNext_bduis(p_source_set,l_set_elem_iterator)
LOOP
– l_set_elem := DataforipaddressitemSetNext (p_source_set,l_set_elem_iterator );
l_anydata :=AnydataSetNext_bduis (p_source_set,l_set_elem_iterator );
ignore_pls_integer(l_anydata.getobject(l_set_elem));
DataforipaddressitemArray1Add (p_dest_lst,l_set_elem );
l_modified := TRUE;
END LOOP;
RETURN l_modified ;
END ;

GetManagedEquipDetailSvc

– l_lst_req_gems_ids := /* NOT TRANSLATED: asList(arGemsIds) */ NULL;
FOR i in 1..l_ar_gems_ids.COUNT LOOP
l_lst_req_gems_ids.EXTEND;
l_lst_req_gems_ids(i) := anydata.convertvarchar2(l_ar_gems_ids(i));
END LOOP;
dbms_output.put_line(’ ======118===GetDataForIpAddress=======’ );

elseif的写法
declare
var_number number;
begin
var_number := 10;
if var_number > 100 then
dbms_output.put_line(var_number||’ is greater than 100’);
elsif var_number < 100 then
dbms_output.put_line(var_number||’ is less than 100’);
else
dbms_output.put_line(var_number||’ is equal to 100’);
end if;
end;

GetManagedEquipDetailSvc
sqlQueryHandlerForEquipDetail

get_icr_vpn_data_for_curr_btch没做

schema 获取到值
l_str_prop :=get_property_bduis(CpeDataByAibPiidRtrvrSttcs.prop_key_clarify_base||’.Clarify.Schema’);
22: IF l_str_prop IS NOT NULL THEN CpeDataByAibPiidRtrvrSttcs.db_schema := l_str_prop ; END IF;
23 log_debug (‘CpeDataByAibPiidRetriever: _prepareValuesFromAppProps(): dbSchema: ”’ || CpeDataByAibPiidRtrvrSttcs.db_schema
24 || ””);

– l_str_prop := AppProperties.get_app_property_as_string (IcrVpnDataFromPvcIdHndlrSttcs.prop_key_icore_schema );
l_str_prop := get_property_bduis(IcrVpnDataFromPvcIdHndlrSttcs.prop_key_icore_schema);

ORA-30625: method dispatch on NULL SELF argument is disallowed
ORA-06512: at “SHERRY.GETDATAFORIPADDRESS”,line 246
就是前面是空值不能调用函数

CREATE OR REPLACE FUNCTION inst_of_mngd_eqp_det_ext_item (p_obj IN ANYDATA ) RETURN BOOLEAN IS
l_tmp_1 AnyData ; l_tmp ManagedEquipDetailExtItem ; l_t_obj ManagedEquipDetailExtItem ;
target_type VARCHAR2 (32767);
BEGIN
BEGIN
BEGIN l_tmp_1 := p_obj ;
IF l_tmp_1 IS NOT NULL THEN
target_type := l_tmp_1.gettypename();
IF upper(target_type) = upper(‘ManagedEquipDetailExtItem’) THEN
IGNORE_PLS_INTEGER (l_tmp_1.getObject (l_tmp ));
ELSE
RETURN FALSE;
END IF;
END IF;
END;
l_t_obj := l_tmp ;
RETURN TRUE;
EXCEPTION WHEN others THEN BEGIN log_exception();RETURN FALSE; END; END;
END ;
/

medx_list map_clli_to_addr_id 往下看的时候若是类型转来转去那么还是保留原来的类型不变。

原文链接:https://www.f2er.com/oracle/212971.html

猜你在找的Oracle相关文章