SQL Server×Ö·û´®·Ö¸î
Ò»¡¢°´Ö¸¶¨·ûºÅ·Ö¸î×Ö·û´®£¬·µ»Ø·Ö¸îºóµÄÔªËØ¸öÊý£¬·½·¨ºÜ¼òµ¥£¬¾ÍÊÇ¿´×Ö·û´®ÖдæÔÚ¶àÉÙ¸ö·Ö¸ô·ûºÅ£¬È»ºóÔÙ¼ÓÒ»£¬¾ÍÊÇÒªÇóµÄ½á¹û¡£
CREATE function Get_StrArrayLength
(
@str varchar(1024), --Òª·Ö¸îµÄ×Ö·û´®
@split varchar(10) --·Ö¸ô·ûºÅ
)
returns int
as
begin
declare @location int
declare @start int
declare @length int
set @str=ltrim(rtrim(@str))
set @location=charindex(@split,@str)
set @length=1
while @location<>0
begin
set @start=@location+1
set @location=charindex(@split,@str,@start)
set @length=@length+1
end
return @length
end
µ÷ÓÃʾÀý£ºselect dbo.Get_StrArrayLength('78,1,2,3',',')
·µ»ØÖµ£º4
¶þ¡¢°´Ö¸¶¨·ûºÅ·Ö¸î×Ö·û´®£¬·µ»Ø·Ö¸îºóÖ¸¶¨Ë÷ÒýµÄµÚ¼¸¸öÔªËØ£¬ÏóÊý×éÒ»Ñù·½±ã
CREATE function Get_StrArrayStrOfIndex
(
@str varchar(1024), --Òª·Ö¸îµÄ×Ö·û´®
@split varchar(10), --·Ö¸ô·ûºÅ
@index int --È¡µÚ¼¸¸öÔªËØ
)
returns varchar(1024)
as
begin
declare @location int
declare @start int
declare @next int
declare @seed int
set @str=ltrim(rtrim(@str))
set @start=1
set @next=1
set @seed=len(@split)
set @location=charindex(@split,@str)
while @location<>0 and @index>@next
begin
set @start=@location+@seed
set @location=charindex(@split,@str,@start)
set @next=@next+1
end
if&
Ïà¹ØÎĵµ£º
index.jsp
<%@ page language="java" import="java.sql.*" import="java.lang.*" import="java.util.*" pageEncoding="GB2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%!
& ......
1.Ñ¡Ôñ×îÓÐЧÂʵıíÃû˳Ðò(Ö»ÔÚ»ùÓÚ¹æÔòµÄÓÅ»¯Æ÷ÖÐÓÐЧ)¡¡¡¡
¡¡¡¡ SQLSERVERµÄ½âÎöÆ÷°´ÕÕ´ÓÓÒµ½×óµÄ˳Ðò´¦Àífrom×Ó¾äÖеıíÃû£¬Òò´Ëfrom×Ó¾äÖÐдÔÚ×îºóµÄ±í£¨»ù´¡±ídriving table£©½«±»×îÏÈ´¦Àí£¬ÔÚfrom×Ó¾äÖаüº¬¶à¸ö±íµÄÇé¿öÏ£¬±ØÐëÑ¡Ôñ¼Ç¼ÌõÊý×îÉٵıí×÷Ϊ»ù´¡±í£¬µ±SQLSERVER´¦Àí¶à¸ö±íʱ£¬»áÔËÓÃÅÅÐò¼°ºÏ²¢µÄ·½Ê½Á ......
--ÓÃJOB.
--SQL SERVER2000ΪÀý
ÆóÒµ¹ÜÀíÆ÷—>Êý¾Ý¿â·þÎñÆ÷—>¹ÜÀíĿ¼—>SQL SERVER´úÀí—>×÷Òµ—>ÓÒ¼ü Ñ¡—>н¨
³£¹æÑ¡ÏîÒ³—>ÊäÈë×÷ÒµÃû³Æ—>Ñ¡ÖÐËùÓÐÕß¡£
²½ÖèÑ¡ÏîÒ³—>н¨—>ÊäÈë²½ÖèÃû—>Àà ......
OracleϵÁУºSQL
Ò»£¬Ê²Ã´ÊÇSQL£¿
1£¬SQLÈ«³ÆÊÇ“½á¹¹»¯²éѯÓïÑÔ(Structured Query Language)”£¬¹ØÏµÊý¾Ý¿â¹ÜÀíϵͳµÄÒ»ÖÖ²éѯÓïÑÔ¡£
2£¬SQLÊǸ߼¶µÄ·Ç¹ý³Ì»¯±à³ÌÓïÑÔ£¬¾ßÓÐÍêÈ«²»Í¬µ×²ã½á¹¹µÄ²»Í¬Êý¾Ý¿âϵͳ¿ÉÒÔʹÓÃÏàͬµÄSQLÓïÑÔ×÷ΪÊý¾ÝÊäÈëÓë¹ÜÀíµÄ½Ó¿Ú¡£
3£¬ÒԼǼ¼¯ºÏ×÷Ϊ²Ù× ......