Sqlserver 取汉字的第一个字母,方便模糊查询
create function comm_getpy
(
@str nvarchar(4000)
)
returns nvarchar(4000)
as
begin
declare @word nchar(1),@PY nvarchar(4000)
set @PY=''
while len(@str)>0
begin
set @word=left(@str,1)
--如果非汉字字符,返回原字符
set @PY=@PY+(case when unicode(@word) between 19968 and 19968+20901
then (
select top 1 PY
from
(
select 'A' as PY,N'驁' as word
union all select 'B',N'簿'
union all select 'C',N'錯'
union all select 'D',N'鵽'
union all select 'E',N'樲'
union all select 'F',N'鰒'
&nb
相关文档:
在查询分析器中输入以下内容:
set statistics profile on
set statistics io on
set statistics time on
go
go
set statistics profile off
set statistics io off
set statistics time off ......
1、在oracle的sys-sysdba下登陆
写一个java source程序链接sqlserver2005:
create or replace and compile java source named test as
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
public class excutesql1
{
public static String entry ......
Sybase SQL Server体系结构介绍
摘要:本文主要对Sybase SQL Server体系结构进行介绍,便于读者对Sybase SQL Server有个整体大概的了解。
标签:Sybase SQL Server Sybase SQL Server 体系结构
Sybase SQL Server是一个多库结构的RDBMS,体系结构大致如下:
1.数据库 ......
由于以前都是在sqlserver 2005处理,现在客户要求oracle数据库服务器,
最初的代码为:
allRecordSize = (Integer) rs1.getObject(1); //Integer allRecordSize=0;
当执行的时候报:BigDecimal无法转化为Integer类型
为了兼容两者修改后的代码为:
Object o = rs1.getObject(1);
&nbs ......