select SiteID,%%physloc%%,sys.fn_PhysLocFormatter(%%physloc%%) from NT_SiteInfo
|
SiteID |
%%physloc%% | sys.fn_PhysLocFormatter(%%physloc%%) |
| 1 | 0xE900000001000000 | (1:59648:0) |
| 23 | 0xE900000001000100 | (1:59648:1) |
| 24 | 0xE900000001000200 | (1:59648:2) |
| ...... | ||
| 149 | 0xE900000001007F00 | (1:59648:127) |
| 150 | 0xE900000001008000 | (1:59648:128) |
| 151 | 0xE900000001008100 | (1:59648:33024) |
| 152 | 0xE900000001008200 | (1:59648:33280) |
| ...... | ||
| 226 | 0xE90000000100CC00 | (1:59648:52224) |
| 227 | 0xE90000000100CD00 | (1:59648:52480) |
| 228 | 0x4B02000001000000 | (1:587:0) |
| 229 | 0x4B02000001000100 | (1:587:1) |
| ...... | ||
| 360 | 0x4B02000001007F00 | (1:587:127) |
| 361 | 0x4B02000001008000 | (1:587:128) |
| 362 | 0x4B02000001008100 | (1:587:33024) |
| 363 | 0x4B02000001008200 | (1:587:33280) |
| ...... | ||
| 422 | 0x4B0200000100BD00 | (1:587:48384) |
| 423 | 0x4B0200000100BE00 | (1:587:48640) |
| 424 | 0x3C05000001000000 | (1:1340:0) |
| 425 | 0x3C05000001000100 | (1:1340:1) |
| ...... | ||
| 552 | 0x3C05000001008000 | (1:1340:128) |
| 553 | 0x3C05000001008100 | (1:1340:33024) |
| 596 | 0x3C0500000100AC00 | (1:1340:44032) |
| 597 | 0x9978000001000000 | (1:39288:0) |
| ...... | ||
| 658 | 0x9978000001003D00 | (1:39288:61) |
dbcc ind(wjgk,nt_siteinfo,0)
|
PagePID |
IAMFID | IAMPID | PageType | IndexLevel | NextPagePID | PrevPagePID |
| 238 | NULL | NULL | 10 | NULL | 0 | 0 |
| 233 | 1 | 238 | 1 | 0 | 587 | 0 |
| 587 | 1 | 238 | 1 | 0 | 1340 | 233 |
| 1340 | 1 | 238 | 1 | 0 | 30873 | 587 |
| 30873 | 1 | 238 | 1 | 0 | 0 | 1340 |
select OBJECT_DEFINITION(object_id('sys.fn_PhysLocFormatter'))
go
-------------------------------------------------------------------------------
-- Name: sys.fn_PhysLocFormatter
--
-- Description:
-- Formats the output of %%physloc%% virtual column
--
-- Notes:
-------------------------------------------------------------------------------
create function sys.fn_PhysLocFormatter (@physical_locator binary (8))
returns varchar (128)
as
begin
declare @page_id binary (4)
declare @file_id binary (2)
declare @slot_id binary (2)
-- Page ID is the first four bytes, then 2 bytes of page ID, then 2 bytes of slot
--
select @page_id = convert (binary (4), reverse (substring (@physical_locator, 1, 4)))
select @file_id = convert (binary (2), reverse (substring (@physical_locator, 5, 2)))
select @slot_id = convert (binary (2), reverse (substring (@physical_locator, 7, 2)))
return '(' + cast (cast (@file_id as int) as varchar) + ':'
+ cast (cast (@page_id as int) as varchar) + ':'
+ cast (cast (@slot_id as int) as varchar) + ')'
end
select reverse('工人')
----
人工
(1 行受影响)
select reverse('12345工人')
---------
人工54321
(1 行受影响)
select reverse('工12345人')
---------
人54321工
(1 行受影响)
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有