转 SQL*Plus中使用DATE类型的绑定变量 和 国产数据库 DM


达梦数据库自动化脚本安装
参考
https://www.cnblogs.com/fangzpa/p/14784944.html
https://blog.csdn.net/fengxiaozhenjay/article/details/104473953

######## sample 1
静默安装报错

[Fatal Error] :1:1: Content is not allowed in prolog.

解决:
修改1:
确保注释最后的字符如下 -->

修改2
确保第一行文件不是中文

#########sample 2

The language of current OS is not chinese, Can not install chinese version. please modify the value of LANGUAGE in the config file.

修改
xml 文件
<LANGUAGE>EN</LANGUAGE>

 

 

 

参考文档

http://blog.itpub.net/13885898/viewspace-2150916

感谢jet_zhang

 

###########检查bind 变量值


SELECT
b.sql_id,
t.sql_text sql_text,
b.name bind_name,
b.value_string bind_value
FROM
v$sql t
JOIN
v$sql_bind_capture b on t.hash_value = b.hash_value and t.child_address = b.child_address
WHERE
b.value_string is not null
AND
b.sql_id='aj7bkpwb1v02n'

 

#########sample 构造日期函数
25.10.0.198:1521/os

ALTER SESSION SET NLS_DATE_FORMAT='MM/DD/YYYY hh24:mi:ss';
var B1 VARCHAR2(32);
exec :B1:='03/17/2021 00:00:00';
SELECT SEND_FILE_FLAG, EOD_FLAG FROM Sdd.tab_SWITCH WHERE RUN_DATE = NVL (:B1 , SYMBOLS.GET_RUN_DATE) AND ROWNUM = 1;

1 aj7bkpwb1v02n SELECT SEND_FILE_FLAG, EOD_FLAG FROM RB_OVERDRAW_SWITCH WHERE RUN_DATE = NVL (:B1 , GET_RUN_DATE) AND ROWNUM = 1 :B1 03/17/2021 00:00:00

 

posted @ 2021-03-17 09:55  feiyun8616  阅读(128)  评论(0编辑  收藏  举报