DB2 SQL Mixed data in character strings
Mixed character data and graphic data are always allowed for Unicode, but for EBCDIC and ASCII, the specific installation of DB2® determines whether mixed data can be used.
The field MIXED DATA on installation panel DSNTIPF can have the value YES or NO for ASCII or EBCDIC character strings. The value YES indicates that character strings can contain a mixture of SBCS and DBCS characters. The value NO indicates that they cannot. Mixed character data and graphic data are always allowed for Unicode; that is the MIXED DATA field does not have an effect on Unicode data.
For static SQL statements, the value of the CCSID SQL processing option or the derived CCSID for the DB2 coprocessor determines whether ASCII or EBCDIC character strings can contain mixed data. If a mixed CCSID is used, mixed strings are allowed. If a single-byte CCSID is used, mixed strings are not allowed.
For dynamic SQL statements, the CCSID that is selected to convert the dynamic statement text to UTF-8 determines whether ASCII or EBCDIC character strings can contain mixed data. The CCSID for a dynamic statement is determined from the SQLDA override (if any) for the host variable on the PREPARE statement, the value of the CURRENT ENCODING SCHEME special register, and the ENCODING bind option.
The value of MIXED DATA affects the parsing of SQL character string constants, the execution of the LIKE predicate, and the assignment of character strings to host variables when truncation is needed. It can also affect concatenation, as explained in Expressions with the concatenation operator. A value that applies to a statement executed at the local DB2 also applies to any statement executed at another server. An exception is the LIKE predicate, for which the applicable value of MIXED DATA is always the one at the statement's server.
The value of MIXED DATA also affects the choice of system CCSIDs for the local DB2 and the choice of data subtypes for character columns. When this value is YES, multiple CCSIDs are available for ASCII and EBCDIC data (SBCS, DBCS, and MIXED). The CCSID specified in the ASCII CCSID or EBCDIC CCSID field is the MIXED CCSID. In this case, DB2 derives the SBCS and MIXED CCSIDs from the DBCS CCSID specified installation panel DSNTIPF. Moreover, a character column can have any one of the allowable data subtypes—BIT, SBCS, or MIXED.
On the other hand, when MIXED DATA is NO, the only ASCII or EBCDIC system CCSIDs are those for SBCS data. Therefore, only BIT and SBCS can be data subtypes for character columns.
DB2 SQL Mixed data in character strings的更多相关文章
- IBM DB2 SQL error code list
SQL return codes that are preceded by a minus sign (-) indicate that the SQL statement execution was ...
- DB2 SQL性能调优秘笈
SQL优化技巧 1.去除在谓词列上编写的任何标量函数 2.去除在谓词列上编写的任何数学运算 3.SQL语句的Select部分只写必要的列 4.尽可能不用Distinct 5.尽量将In子查询重写为Ex ...
- Spark SQL 之 Data Sources
#Spark SQL 之 Data Sources 转载请注明出处:http://www.cnblogs.com/BYRans/ 数据源(Data Source) Spark SQL的DataFram ...
- 未能加载包“Microsoft SQL Server Data Tools”
直接在vs2013里的App_Data目录创建数据库,在服务器资源管理器中查看时报错: 未能加载包“Microsoft SQL Server Data Tools” 英文: The 'Microsof ...
- DB2 SQL 日期函数
DB2 SQL 日期函数1:CURRENT TIMESTAMP 函数:获取当前日期时间语法:CURRENT TIMESTAMP参数:当前日期时间返回值:当前日期时间 2:CURRENT DATE 函数 ...
- java.sql.SQLException: ORA-00911: invalid character 解决方法
java.sql.SQLException: ORA-00911: invalid character 控制台抛出这个异常:java.sql.SQLException: ORA-00911: inva ...
- SQL Server Data Tools – Business Intelligence for Visual Studio 2012安装时提示“The CPU architecture....”的解决方法
SQL Server Data Tools – Business Intelligence for Visual Studio 2012,一个很强大的工具,下载地址:http://www.micros ...
- Spark SQL External Data Sources JDBC官方实现写测试
通过Spark SQL External Data Sources JDBC实现将RDD的数据写入到MySQL数据库中. jdbc.scala重要API介绍: /** * Save this RDD ...
- SQL Server 通配符 Wildcard character
SQL Server 通配符 Wildcard character % 任意长度的字符串,如:'%computer%' _ 单个字符,如:'_ean' [] ...
随机推荐
- CentOS7安装elk
192.168.161.128 elk.test.com jdk-8u102-linux-x64.rpm elasticsearch-2.3.3.rpm kibana-4.5.1-1.x86_64.r ...
- 锋利的jQuery书中推荐的几款插件
1.jQuery表单验证插件——Validation 2.jQuery表单插件——Form 3.模态窗口插件——SimpleModal 4.管理Cookie的插件——Cookie 5.jQuery U ...
- Java NIO与IO的区别和比较
传统的socket IO中,需要为每个连接创建一个线程,当并发的连接数量非常巨大时,线程所占用的栈内存和CPU线程切换的开销将非常巨大.使用NIO,不再需要为每个线程创建单独的线程,可以用一个含有限数 ...
- 给dos命令“.bat”文件换图标
最近客户有个需求:给企业建立一个FTP服务器,并且给不同的部门分配不同的目录和管理权限. 这个好实现!直接安装serv-u,进行一番设置,搞定! 不过客户嫌登陆FTP操作麻烦,输入ip,输入账号什么的 ...
- jquery学习——选择器
一.基础选择 1.$("*") 选择所有元素 2.$(".class") 选择某个类 3.$("#id") 选择某个id 4.$(" ...
- Zigzag Iterator
Given two 1d vectors, implement an iterator to return their elements alternately. For example, given ...
- Binary Tree Longest Consecutive Sequence
Given a binary tree, find the length of the longest consecutive sequence path (连续的路径,不是从小到大). The pa ...
- 给一个正在运行的Docker容器动态添加Volume
给一个正在运行的Docker容器动态添加Volume本文转自:http://dockone.io/article/149 [编者的话]之前有人问我Docker容器启动之后还能否再挂载卷,考虑到mnt命 ...
- stream的seek方法实例
using (FileStream outStream = new FileStream(@"D:\12.txt", FileMode.Open)) { using (FileSt ...
- 服务器×××上的MSDTC不可用解决办法
MSDTC(分布式交易协调器),协调跨多个数据库.消息队列.文件系统等资源管理器的事务.该服务的进程名为Msdtc.exe,该进程调用系统Microsoft Personal Web Server和M ...