SQL Server Management Studio连接服务器时指定端口号
今天想连接SQL Server服务器时发现没法连接,发现端口号不是默认的端口号,需要指定端口号,刚开始以为是IP地址加冒号再端口号就行了,结果发现没用,google一把发现原来不是冒号,是逗号,哈。比如:127.0.0.1,1451 , 格式就是:[IP],[Port] 。 完毕。
相关文档:
用sql操作oracle的blob字段
1、查询
select utl_raw.cast_to_varchar2(dlob),id from system.t_htinfo
2、插入
insert into system.t_htinfo values ('3',utl_raw.cast_to_raw('你'));
3、更新
update system.t_htinfo set fld_value=utl_raw.cast_to_raw('1') where fh_nm=1820648 and form_index=52
......
同一表多字段同时重复记录的SQL查询及处理数
比如现在有一人员表 (表名:peosons)
若想将姓名、身份证号、住址这三个字段完全相同的记录查询出来
select p1.* from persons p1,persons p2 where p1.idp2.id and p1.cardid = p2.cardid and p1.pname = p2.pname and p1.address ......
--------------------------------------------------------------------------
-- Author : htl258(Tony)
-- Date : 2010-04-23 08:08:36
-- Version:Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (Intel X86)
-- Jul ......
函数如下
CREATE FUNCTION StockBalance_AmountIn(@SortID int)
RETURNS numeric(18,4)
AS
BEGIN
Declare @dblReturn numeric(18,4)
Select @dblReturn = SUM(AmountCurrentMonthIn) from AT_Materiel_StockBalance Where SortID = @SortID
Return (@dblReturn)
END
......