列集
CREATE TABLE [dbo].[Student2](
[StuID] [int] NULL,
[StuNum] [varchar](50) SPARSE NULL,
[StuNamePY] [varchar](50) SPARSE NULL,
[StuNameWB] [varchar](50) SPARSE NULL,
[StuName] [varchar](50) SPARSE NULL,
[IDNumber] [varchar](18) SPARSE NULL,
[FileNo] [varchar](50) SPARSE NULL,
[DocType] [varchar](50) SPARSE NULL,
[Birthday] [varchar](10) SPARSE NULL,
[Sex] [int] SPARSE NULL,
[Height] [int] SPARSE NULL,
[DocAddress] [varchar](200) SPARSE NULL,
[Birthplace] [varchar](50) SPARSE NULL,
[ISGOT] [int] SPARSE NULL,
[Address] [varchar](200) SPARSE NULL,
[ResTerm] [varchar](50) SPARSE NULL,
[Mobile] [varchar](50) SPARSE NULL,
[Tel] [varchar](50) SPARSE NULL,
[Email] [varchar](50) SPARSE NULL,
[ShuttleAddress2] [varchar](100) SPARSE NULL,
[ShuttleAddress1] [varchar](100) SPARSE NULL,
[VisitTime] [varchar](50) SPARSE NULL,
[ArrangeClass] [varchar](50) SPARSE NULL,
[BusinessWay] [varchar](50) SPARSE NULL,
[BusinessType] [varchar](50) SPARSE NULL,
[BusinessSources2] [varchar](50) SPARSE NULL,
[BusinessSources3] [varchar](50) SPARSE NULL,
[CoachDesEmpID] [int] SPARSE NULL,
[CoachDesEmpName] [varchar](50) SPARSE NULL,
[StuCoachEmpID] [int] SPARSE NULL,
[StuCoachEmpName] [varchar](50) SPARSE NULL,
[Class] [varchar](50) SPARSE NULL,
[ClassName] [varchar](4) SPARSE NULL,
[ApplyType] [varchar](10) SPARSE NULL,
[CarType] [varchar](50) SPARSE NULL,
[TransferType] [int] SPARSE NULL,
[MarketType] [varchar](50) SPARSE NULL,
[MarketContent] [varchar](100) SPARSE NULL,
[Gifts] [varchar](50) SPARSE NULL,
[OfferWay] [varchar](50) SPARSE NULL,
[CouponNo] [varchar](50) SPARSE NULL,
[CoType] [varchar](50) SPARSE NULL,
[IsGroup] [int] SPARSE NULL,
[Remark] [varchar](2000) SPARSE NULL,
[EntryDate] [datetime] SPARSE NULL,
[DjfNum] [varchar](50) SPARSE NULL,
[AreaOrganID] [int] NULL,
[AreaPointCode] [varchar](50) SPARSE NULL,
[DeptOrganID] [int] SPARSE NULL,
[DeptPointCode] [varchar](50) SPARSE NULL,
[ConEmpID] [int] SPARSE NULL,
[ConEmpName] [varchar](50) SPARSE NULL,
[ConEmpTel] [varchar](50) SPARSE NULL,
[InDate] [datetime] SPARSE NULL,
[AddEmpID] [int] SPARSE NULL,
[AddEmpName] [varchar](50) SPARSE NULL,
[OrganID] [int] SPARSE NULL,
[JlClassName] [varchar](50) SPARSE NULL,
[IsDel] [int] SPARSE NULL,
[AuState] [int] SPARSE NULL,
[AuEmpID] [int] SPARSE NULL,
[AuTime] [datetime] SPARSE NULL,
[IsInternal] [int] SPARSE NULL,
[StuInTime] [datetime] SPARSE NULL,
[SLRQ] [datetime] SPARSE NULL,
[LSH] [int] SPARSE NULL,
[StuType] [int] SPARSE NULL,
[PrioCoachID] [int] SPARSE NULL,
[PrioCoachName] [varchar](50) SPARSE NULL,
SpecialPurposeColumns XML COLUMN_SET FOR ALL_SPARSE_COLUMNS
) ON [SGPZ_Data_New]
truncate TABLE [Student2]
insert [Student2] (STUID,[StuNum],[StuNamePY],[StuNameWB],[StuName],
[IDNumber],[FileNo],[DocType],[Birthday],[Sex],[Height],
[DocAddress],[Birthplace],[ISGOT],[Address],[ResTerm],
[Mobile],[Tel],[Email],[ShuttleAddress2],[ShuttleAddress1],
[VisitTime],[ArrangeClass],[BusinessWay],[BusinessType],
[BusinessSources2],[BusinessSources3],[CoachDesEmpID],
[CoachDesEmpName],[StuCoachEmpID],[StuCoachEmpName],
[Class],[ClassName],[ApplyType],[CarType],[TransferType],
[MarketType],[MarketContent],[Gifts],[OfferWay],[CouponNo],
[CoType],[IsGroup],[Remark],[EntryDate],[DjfNum],
[AreaOrganID],[AreaPointCode],[DeptOrganID],
[DeptPointCode],[ConEmpID],[ConEmpName],[ConEmpTel],
[InDate],[AddEmpID],[AddEmpName],[OrganID],[JlClassName],
[IsDel],[AuState],[AuEmpID],[AuTime],[IsInternal],
[StuInTime],[SLRQ],[LSH],[StuType],[PrioCoachID],
[PrioCoachName])
select STUID,[StuNum],[StuNamePY],[StuNameWB],[StuName],[IDNumber],
[FileNo],[DocType],[Birthday],[Sex],[Height],[DocAddress],[Birthplace],
[ISGOT],[Address],[ResTerm],[Mobile],[Tel],[Email],[ShuttleAddress2],
[ShuttleAddress1],[VisitTime],[ArrangeClass],[BusinessWay],
[BusinessType],[BusinessSources2],[BusinessSources3],[CoachDesEmpID],
[CoachDesEmpName],[StuCoachEmpID],[StuCoachEmpName],[Class],
[ClassName],[ApplyType],[CarType],[TransferType],[MarketType],
[MarketContent],[Gifts],[OfferWay],[CouponNo],[CoType],[IsGroup],
[Remark],[EntryDate],[DjfNum],[AreaOrganID],[AreaPointCode],
[DeptOrganID],[DeptPointCode],[ConEmpID],[ConEmpName],[ConEmpTel],
[InDate],[AddEmpID],[AddEmpName],[OrganID],[JlClassName],[IsDel],
[AuState],[AuEmpID],[AuTime],[IsInternal],[StuInTime],[SLRQ],[LSH],
[StuType],[PrioCoachID],[PrioCoachName]
from student
-----------------------------------------
set statistics io on
set statistics time on
select top 2000 STUID,[StuNum],[StuNamePY],[StuNameWB],[StuName],[IDNumber],
[FileNo],[DocType],[Birthday],[Sex],[Height],[DocAddress],[Birthplace],
[ISGOT],[Address],[ResTerm],[Mobile],[Tel],[Email],[ShuttleAddress2],
[ShuttleAddress1],[VisitTime],[ArrangeClass],[BusinessWay],
[BusinessType],[BusinessSources2],[BusinessSources3],[CoachDesEmpID],
[CoachDesEmpName],[StuCoachEmpID],[StuCoachEmpName],[Class],
[ClassName],[ApplyType],[CarType],[TransferType],[MarketType],
[MarketContent],[Gifts],[OfferWay],[CouponNo],[CoType],[IsGroup],
[Remark],[EntryDate],[DjfNum],[AreaOrganID],[AreaPointCode],
[DeptOrganID],[DeptPointCode],[ConEmpID],[ConEmpName],[ConEmpTel],
[InDate],[AddEmpID],[AddEmpName],[OrganID],[JlClassName],[IsDel],
[AuState],[AuEmpID],[AuTime],[IsInternal],[StuInTime],[SLRQ],[LSH],
[StuType],[PrioCoachID],[PrioCoachName]
from student2
where idnumber='372922198203256073'
select top 2000 STUID,[StuNum],[StuNamePY],[StuNameWB],[StuName],[IDNumber],
[FileNo],[DocType],[Birthday],[Sex],[Height],[DocAddress],[Birthplace],
[ISGOT],[Address],[ResTerm],[Mobile],[Tel],[Email],[ShuttleAddress2],
[ShuttleAddress1],[VisitTime],[ArrangeClass],[BusinessWay],
[BusinessType],[BusinessSources2],[BusinessSources3],[CoachDesEmpID],
[CoachDesEmpName],[StuCoachEmpID],[StuCoachEmpName],[Class],
[ClassName],[ApplyType],[CarType],[TransferType],[MarketType],
[MarketContent],[Gifts],[OfferWay],[CouponNo],[CoType],[IsGroup],
[Remark],[EntryDate],[DjfNum],[AreaOrganID],[AreaPointCode],
[DeptOrganID],[DeptPointCode],[ConEmpID],[ConEmpName],[ConEmpTel],
[InDate],[AddEmpID],[AddEmpName],[OrganID],[JlClassName],[IsDel],
[AuState],[AuEmpID],[AuTime],[IsInternal],[StuInTime],[SLRQ],[LSH],
[StuType],[PrioCoachID],[PrioCoachName]
from student
where idnumber='372922198203256073'
set statistics io on
set statistics time on
select STUID,[StuNum],[StuNamePY],[StuNameWB],[StuName],[IDNumber],[FileNo],
[DocType],[Birthday],[Sex],[Height],[DocAddress],[Birthplace],[ISGOT],
[Address],[ResTerm],[Mobile],[Tel],[Email]
from student2
where AreaOrganID=39
select STUID,[StuNum],[StuNamePY],[StuNameWB],[StuName],[IDNumber],[FileNo],
[DocType],[Birthday],[Sex],[Height],[DocAddress],[Birthplace],[ISGOT],
[Address],[ResTerm],[Mobile],[Tel],[Email]
from student
where AreaOrganID=39
select STUID,[StuNum],[StuNamePY],[StuNameWB],[StuName],[IDNumber],[FileNo],
[DocType],[Birthday],[Sex],[Height],[DocAddress],[Birthplace],[ISGOT],
[Address],[ResTerm],[Mobile],[Tel],[Email]
from student2
where AreaOrganID=39
------------------------------------------------------------------
declare @x xml
select @x=specialPurposeColumns
from student2
where stuid=4538
select @x
update student2
set specialPurposeColumns=@x
where stuid=4538
update student
set [StuNum]=[StuNum],[StuNamePY]=[StuNamePY],[StuNameWB]=[StuNameWB],
[StuName]=[StuName],[IDNumber]=[IDNumber],[FileNo]=[FileNo],
[DocType]=[DocType],[Birthday]=[Birthday],[Sex]=[Sex],
[Height]=[Height],[DocAddress]=[DocAddress],[Birthplace]=[Birthplace],
[ISGOT]=[ISGOT],[Address]=[Address],[ResTerm]=[ResTerm],
[Mobile]=[Mobile],[Tel]=[Tel],[Email]=[Email],
[ShuttleAddress2]=[ShuttleAddress2],
[ShuttleAddress1]=[ShuttleAddress1],[VisitTime]=[VisitTime],
[ArrangeClass]=[ArrangeClass],[BusinessWay]=[BusinessWay],
[BusinessType]=[BusinessType],[BusinessSources2]=[BusinessSources2],
[BusinessSources3]=[BusinessSources3],[CoachDesEmpID]=[CoachDesEmpID],
[CoachDesEmpName]=[CoachDesEmpName],[StuCoachEmpID]=[StuCoachEmpID],
[StuCoachEmpName]=[StuCoachEmpName],[Class]=[Class],
[ClassName]=[ClassName],[ApplyType]=[ApplyType],[CarType]=[CarType],
[TransferType]=[TransferType],[MarketType]=[MarketType],
[MarketContent]=[MarketContent],[Gifts]=[Gifts],[OfferWay]=[OfferWay],
[CouponNo]=[CouponNo],[CoType]=[CoType],[IsGroup]=[IsGroup],
[Remark]=[Remark],[EntryDate]=[EntryDate],[DjfNum]=[DjfNum],
[AreaOrganID]=[AreaOrganID],[AreaPointCode]=[AreaPointCode],
[DeptOrganID]=[DeptOrganID],[DeptPointCode]=[DeptPointCode],
[ConEmpID]=[ConEmpID],[ConEmpName]=[ConEmpName],
[ConEmpTel]=[ConEmpTel],[InDate]=[InDate],[AddEmpID]=[AddEmpID],
[AddEmpName]=[AddEmpName],[OrganID]=[OrganID],
[JlClassName]=[JlClassName],[IsDel]=[IsDel],[AuState]=[AuState],
[AuEmpID]=[AuEmpID],[AuTime]=[AuTime],[IsInternal]=[IsInternal],
[StuInTime]=[StuInTime],[SLRQ]=[SLRQ],[LSH]=[LSH],[StuType]=[StuType],
[PrioCoachID]=[PrioCoachID],[PrioCoachName]=[PrioCoachName]
where stuid=4538