易截截图软件、单文件、免安装、纯绿色、仅160KB

SQL HexString 与 Binary 互换

HexString to Binary:
DECLARE @y CHAR(34)
SET @y = '0x499104dc92dd27499da9ad8f56dcb437'
DECLARE @x BINARY(16)
DECLARE @sql NVARCHAR(200)
SET @sql = 'SELECT @x = ' + @y
EXEC sp_executesql
@sql,
N'@x BINARY(16) OUTPUT',
@x OUTPUT
SELECT @x
Binary to HexString:
DECLARE @a VARBINARY(20)
SET @a=0x7fd81de7360fb53649412521d06249cc69357d78
SELECT @a
SELECT master.dbo.fn_varbintohexstr(@a)


相关文档:

ms sql : xp_cmdshell

向高手请教一个问题:
当我执行:
  use master
exec  xp_cmdshell 'osql /S musqlserver /U sa /P mypwd /d haodb /Q "select top 10 * from trandetail"  /o C:\my1.xls'
以上执行成功,会产生新文件:C:\my1.xls'
然后我想将此文件直接copy到另一台电脑中[已建连接]
执行
   ......

SQL 自增列(非自增字段)

--
> 测试数据:[tb]
if

object_id
(
'
[tb]
'
)
is

not

null

drop

table

[
tb
]
go

create

table

[
tb
]
(
[
id
]

int
,
[
lx
]

int
)
insert

[
tb
]
select

29
,
2

union

all
select

30
,
3

union

all
sel ......

Access与Sql Server之ASP代码比较

后台数据库:
[Microsoft Access]

[Microsoft Sql Server]
更换之后,ASP代码应注意要修改的一些地方:
[一]连接问题(举例)
[Microsoft Access]
constr = "DBQ=c:\data\clwz.mdb; DRIVER={Microsoft Access Driver (*.mdb)}"
[Microsoft Sql Server]
constr = "DRIVER={SQL Server};SERVER=host;DATA ......

一步一步学Linq to sql(四):查询句法


select
 
描述:查询顾客的公司名、地址信息
查询句法:
var 构建匿名类型1 = from c in ctx.Customers
                      select new
    ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号