zoukankan      html  css  js  c++  java
  • oracle 之 插入超长字段并包含&字符的处理方法

    oracle 在插入超长数据字符串时是默认转为varchar2类型,而这类型只有4000字节,即使通过oracle改变字符串类型为clob,也是在插入时默认转为varchar2类型。

    处理方式:可以通过存储过程来增/改

    declare
     hContent clob;
    begin
    
       hContent:='<DIV style="align-content: center"><TABLE style="FONT-SIZE: 10pt; WIDTH: 185mm; MARGIN-LEFT: 50px; TEXT-INDENT: 10pt" cellSpacing=0 cellPadding=0><TBODY><TR>
    <TD style="FONT-SIZE: 18pt; HEIGHT: 17mm" align=center>杭州市第七医院压疮报表</TD></TR>
    <TR><TD style="HEIGHT: 5mm"><TABLE style="FONT-SIZE: 10pt; WIDTH: 100%">
    <TBODY><TR align=left><TD style="FONT-SIZE: 10pt; WIDTH: 18%" align=center>姓名:<SPAN id=span_xm></SPAN></TD>
    <TD style="FONT-SIZE: 10pt" align=left>性别:<SPAN id=span_xb></SPAN></TD><TD style="FONT-SIZE: 10pt" align=left>年龄:<SPAN id=span_nl></SPAN></TD>
    <TD style="FONT-SIZE: 10pt" align=right>科室:<SPAN id=span_ksid></SPAN></TD><TD style="FONT-SIZE: 10pt" align=right>床号:<SPAN id=span_ch></SPAN></TD><TD style="FONT-SIZE: 10pt" align=center>诊断:<SPAN id=span_zd></SPAN></TD></TR></TBODY></TABLE></TD></TR>
    <TR><TD style="HEIGHT: 100%; VERTICAL-ALIGN: top" colSpan=6><TABLE style="WIDTH: 185mm" cellSpacing=0 align=center ;><TBODY><TR><TD style="FONT-SIZE: 10pt; BORDER-TOP: #000000 1px solid; HEIGHT: 20pt; BORDER-RIGHT: #000000 1px solid; WORD-SPACING: 1pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid; LINE-HEIGHT: 16pt" colSpan=6>难免压疮定义:以强迫体位、重要脏器功能衰竭(肝功能衰竭、心力衰竭、昏迷等)、偏瘫、高位截瘫、骨盆骨折、生命体征不稳定等病情需要严格限制翻身为基本条件,并存高龄(≥70岁)、白蛋白小于30g/L、极度消瘦、高度水肿、大小便失禁等5项中的一项或几项可申报难免压疮。 </TD></TR><TR>
    <TD style="FONT-SIZE: 10pt; HEIGHT: 7mm; WIDTH: 40%; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" align=center>评分内容 (Braden评分法) </TD>
    <TD style="FONT-SIZE: 10pt; WIDTH: 12%; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>1 分</TD><TD style="FONT-SIZE: 10pt; WIDTH: 12%; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>2 分</TD>
    <TD style="FONT-SIZE: 10pt; WIDTH: 12%; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>3 分</TD><TD style="FONT-SIZE: 10pt; WIDTH: 12%; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>4 分</TD>
    <TD style="FONT-SIZE: 10pt; BORDER-RIGHT: #000000 1px solid; WIDTH: 12%; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>得 分</TD></TR>
    <TR><TD style="FONT-SIZE: 10pt; HEIGHT: 7mm; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" align=center>感觉:对压迫有关的不适感受能力 </TD><TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>完全丧失 </TD>
    <TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>严重丧失 </TD><TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>轻度丧失 </TD><TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>未受损害 </TD>
    <TD style="FONT-SIZE: 10pt; BORDER-RIGHT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle><SPAN id=span_gj1></SPAN></TD></TR>
    <TR><TD style="FONT-SIZE: 10pt; HEIGHT: 7mm; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" align=center>潮湿:皮肤暴露于潮湿的程度 </TD>
    <TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>持久潮湿 </TD><TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>十分潮湿 </TD>
    <TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>偶尔潮湿 </TD><TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>很少发生 </TD>
    <TD style="FONT-SIZE: 10pt; BORDER-RIGHT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle><SPAN id=span_gj2></SPAN></TD></TR>
    <TR><TD style="FONT-SIZE: 10pt; HEIGHT: 7mm; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" align=center>活动:身体活动程度 </TD>
    <TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>卧床不起 </TD><TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>局限于床上 </TD><TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>偶尔步行 </TD><TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>经常步行 </TD>
    <TD style="FONT-SIZE: 10pt; BORDER-RIGHT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle><SPAN id=span_gj3></SPAN></TD></TR>
    <TR><TD style="FONT-SIZE: 10pt; HEIGHT: 7mm; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" align=center>活动能力:改变和控制体位能力 </TD>
    <TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>完全不能</TD><TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>严重限制 </TD>
    <TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>轻度限制 </TD><TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>不受限 </TD>
    <TD style="FONT-SIZE: 10pt; BORDER-RIGHT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle><SPAN id=span_gj4></SPAN></TD></TR><TR>
    <TD style="FONT-SIZE: 10pt; HEIGHT: 7mm; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" align=center>营养:通常摄食情况 </TD><TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>恶劣 </TD><TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>不足 </TD>
    <TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>适当 </TD><TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>良好 </TD>
    <TD style="FONT-SIZE: 10pt; BORDER-RIGHT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle><SPAN id=span_gj5></SPAN></TD></TR>
    <TR><TD style="FONT-SIZE: 10pt; HEIGHT: 7mm; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" align=center>摩擦和剪力 </TD><TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>有 </TD>
    <TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>有潜在危险 </TD><TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>无 </TD>
    <TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>'||chr(38)||'nbsp'||'; </TD>
    <TD style="FONT-SIZE: 10pt; BORDER-RIGHT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle><SPAN id=span_gj6></SPAN></TD></TR><TR><TD style="FONT-SIZE: 10pt; HEIGHT: 7mm; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" align=center>总分</TD>
    <TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>'||chr(38)||'nbsp'||';</TD><TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>'||chr(38)||'nbsp'||';</TD>
    <TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>'||chr(38)||'nbsp'||';</TD><TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle>'||chr(38)||'nbsp'||';</TD>
    <TD style="FONT-SIZE: 10pt; BORDER-RIGHT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" vAlign=middle><SPAN id=span_zf></SPAN></TD></TR>
    <TR><TD style="FONT-SIZE: 10pt; BORDER-LEFT: #000000 1px solid" colSpan=3>压疮部位:<SPAN id=span_ycbw></SPAN></TD>
    <TD style="FONT-SIZE: 10pt; BORDER-RIGHT: #000000 1px solid" colSpan=3>发生科室:<SPAN id=span_fsks></SPAN>'||chr(38)||'nbsp'||';申报目的:<SPAN id=span_sbmd></SPAN></TD></TR><TR>
    <TD style="FONT-SIZE: 10pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" colSpan=3>压疮分期:<SPAN id=span_ycfq></SPAN></TD>
    <TD style="FONT-SIZE: 10pt; BORDER-RIGHT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid" colSpan=3>压疮大小:长<SPAN id=span_ycdxc></SPAN>'||chr(38)||'nbsp'||';'||chr(38)||'nbsp'||';宽<SPAN id=span_ycdxk></SPAN><YCDXK>'||chr(38)||'nbsp'||';'||chr(38)||'nbsp'||';深<SPAN id=span_ycdxs></SPAN> </TD></TR>
    <TR><TD style="FONT-SIZE: 10pt; BORDER-TOP: 0px; HEIGHT: 20pt; BORDER-RIGHT: #000000 1px solid; WORD-SPACING: 1pt; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid; LINE-HEIGHT: 16pt" colSpan=6><B>备注:最高分23分,最低分6分,15-18分低度危险, 13-14分中度危险,10-12分高度危险,小于9分非常危险。</B></TD></TR><TR>
    <TD style="HEIGHT: 30px; BORDER-RIGHT: #000000 1px solid; BORDER-LEFT: #000000 1px solid" colSpan=6>护理措施:</TD></TR><TR><TD style="BORDER-RIGHT: #000000 1px solid; BORDER-LEFT: #000000 1px solid" colSpan=6><INPUT id=span_hlcs1 class=_text style="TEXT-INDENT: 4px" type=checkbox value=1 controltype="checkbox"> <LABEL for=span_hlcs1>1、 全面评估,压疮发生的危险因素</LABEL><BR><INPUT id=span_hlcs2 class=_text type=checkbox value=2 controltype="checkbox" cnname="正确使用预防压疮的用具" datatype="1"> <LABEL for=span_hlcs2>2、 正确使用预防压疮的用具</LABEL> <LABEL class=td_bottom_line style="WIDTH: 102mm"><SPAN id=span_hlcsqt1 style="BORDER-TOP: #000000 1px solid; BORDER-RIGHT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid"></SPAN></LABEL><BR><INPUT id=span_hlcs3 class=_text type=checkbox value=3 controltype="checkbox" cnname="翻身与活动" datatype="1"> <LABEL for=span_hlcs3>3、 翻身与活动</LABEL> <INPUT id=span_hlcs4 class=_text style="MARGIN-LEFT: 149px" type=checkbox value=4 controltype="checkbox" cnname="保持皮肤清洁与干燥" datatype="1"> <LABEL for=span_hlcs4>4、 保持皮肤清洁与干燥</LABEL><BR><INPUT id=span_hlcs5 class=_text type=checkbox value=5 controltype="checkbox" cnname="营养管理" datatype="1"> <LABEL for=span_hlcs5>5、 营养管理</LABEL> <INPUT id=span_hlcs6 class=_text style="MARGIN-LEFT: 165px" type=checkbox value=6 name=hlcs controltype="checkbox" cnname="严格交班制度" datatype="1"> <LABEL for=span_hlcs6>6、 严格交班制度</LABEL><BR><INPUT id=span_hlcs7 class=_text type=checkbox value=7 controltype="checkbox" cnname="摩擦和剪力的预防" datatype="1"> <LABEL for=span_hlcs7>7、 摩擦和剪力的预防</LABEL> <INPUT id=span_hlcs8 class=_text style="MARGIN-LEFT: 100px" type=checkbox value=8 controltype="checkbox" cnname="其他措施" datatype="1"> <LABEL for=span_hlcs8>8、 其他措施</LABEL><LABEL class=td_bottom_line style="WIDTH: 50mm"><SPAN id=span_hlcsqt2 style="BORDER-TOP: #000000 1px solid; BORDER-RIGHT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid"></SPAN></LABEL> </TD></TR>
    <TR><TD style="BORDER-TOP: #000000 1px solid; HEIGHT: 30px; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" colSpan=2>责任护士签名:<SPAN id=span_zrhsqm></SPAN></TD>
    <TD style="BORDER-TOP: #000000 1px solid; HEIGHT: 30px; BORDER-BOTTOM: #000000 1px solid" colSpan=2>护士长签名: <SPAN id=span_hsqm></SPAN></TD>
    <TD style="BORDER-TOP: #000000 1px solid; HEIGHT: 30px; BORDER-RIGHT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid" colSpan=2>申报日期:<SPAN id=span_sbrq></SPAN></TD></TR><TR>
    <TD style="HEIGHT: 60px; BORDER-RIGHT: #000000 1px solid; BORDER-LEFT: #000000 1px solid" colSpan=6><B>护理部审核意见:</B> <TEXTAREA id=span_hlbyj style="HEIGHT: 70px; WIDTH: 100%" rows=4 controltype="textarea" cnname="护士长审核意见" datatype="1"></TEXTAREA> </TD></TR>
    <TR><TD style="HEIGHT: 30px; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" colSpan=3>护理部签名:<SPAN id=span_hlbqm></SPAN></TD>
    <TD style="HEIGHT: 30px; BORDER-RIGHT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid" colSpan=3>审核时间:<SPAN id=span_shrq></SPAN></TD></TR>
    <TR><TD style="HEIGHT: 30px; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid" colSpan=2>转归:<SPAN id=span_zg></SPAN></TD>
    <TD style="HEIGHT: 30px; BORDER-BOTTOM: #000000 1px solid" colSpan=2>责任护士签名:<SPAN id=span_zrhsqm1></SPAN> </TD><TD style="HEIGHT: 30px; BORDER-RIGHT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid" colSpan=2>填报日期:<SPAN id=span_tbrq></SPAN></TD></TR>
    <TR><TD style="HEIGHT: 30px; BORDER-BOTTOM: #000000 1px solid" colSpan=2></TD><TD style="HEIGHT: 30px; BORDER-BOTTOM: #000000 1px solid" colSpan=2></TD>
    <TD style="HEIGHT: 30px; BORDER-BOTTOM: #000000 1px solid" colSpan=2></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV>';
    update hlgl_print_html set htmlContent=hContent;
    end;

    这里面还包含了&nbsp,这里面的&被默认为是系统变量,所以可以通过转义来解决

    在oracle中chr(38)=&
    案例:select chr(38)||'nbsp' from dual
  • 相关阅读:
    webdav srs相关
    How To Configure WebDAV Access with Apache on Ubuntu 14.04
    ubuntu 编译lighttpd
    srs编译及推流测试
    Compile pciutils (lspci, setpci) in Windows x86,在 Windows x86 平台下编译 pciutils (lspci, setpci)
    mingw MSYS2 区别
    Qt之美(三):隐式共享
    Qt之美(二):元对象
    Qt之美(一):d指针/p指针详解
    C++的栈空间和堆空间
  • 原文地址:https://www.cnblogs.com/zmztya/p/7793895.html
Copyright © 2011-2022 走看看