邮件技术博客站

本博客站目前已重构仅保留旧博客文章,不提供新用户申请和新博文发表,原有用户可以登录修改内容和隐藏文章,如忘记密码,请联系站长进行重置。

最近发表

item where used report

要求单个item在所有成品中的用量,先参考一个函数 --生成测试数据 create table BOM_1(Item int,bom_head varchar(20),bom_child varchar(20),number int,products_attribute varchar(20)) insert into BOM_1 select 1 ,'A' ,'A1',1,'采购' insert into BOM_1 select 2 ,'A' ,'A2',2,'生产' insert into BOM_1 select 3 ,'A2','A3',3,'生产' insert into BOM_1 select 4 ,'A2','A4',2,'采购' insert into BOM_1 select 5 ,'A3','A5',2,'采购' insert into BOM_1 select 6 ,'A3','A6',1,'采购' insert into BOM_1 select 7 ,'B' ,'B1',1,'采购' insert into BOM_1 select 8 ,'B' ,'B2',2,'生产' insert into BOM_1 select 9 ,'B2','B3……

用户定义函数

函数是由一个或多个 Transact-SQL 语句组成的子程序,可用于封装代码以便重新使用。Microsoft® SQL Server™ 2000 并不将用户限制在定义为 Transact-SQL 语言一部分的内置函数上,而是允许用户创建自己的用户定义函数。 可使用 CREATE FUNCTION 语句创建、使用 ALTER FUNCTION 语句修改、以及使用 DROP FUNCTION 语句除去用户定义函数。每个完全合法的用户定义函数名 (database_name.owner_name.function_name) 必须唯一。 必须被授予 CREATE FUNCTION 权限才能创建、修改或除去用户定义函数。不是所有者的用户在 Transact-SQL 语句中使用某个函数之前,必须先给此用户授予该函数的适当权限。……

SQL INJECTION

YouStop SQL Injection Attacks Before They Stop Stop SQL Injection Attacks Before They Stop You

SQL Join

Specifies the type of join operation. INNER Specifies all matching pairs of rows are returned. Discards unmatched rows from both tables. This is the default if no join type is specified. LEFT [OUTER] Specifies that all rows from the left table not meeting the specified condition are included in the result set, and output columns from the right table are set to NULL in addition to all rows returned by the inner join. RIGHT [OUTER] Specifies that all rows from the right table not meeting the specified condition are included in the result set, and output columns fro……

@@ROWCOUNT

今天一直在研究Accpac的bom结构,差点搞晕,最终发现自己一个地方理解错误 @@ROWCOUNT 开始以为这个全局变量扫描一行+1后面发现online book写很清楚是返回受上一语句影响的行数,所以对bom来说他是提示还没找到(根节点或叶枝节点

Crystal Rerort(二)

Crystal Report, Formula 中有关循环变量类加问题,我们一定要注意在变量前加上WhileprintingRecords,这样formula每次取出的才不是最新值,另外Resetcount付初始值的Formula我们一般放在PH, PF,RH,RF, 假如报表中只调用一次我们放在前面两个位置如果每页都调用,我们必须放在后面两个位置,另外在Formula之间调用Vairable,我们必须设置它为Global变量

SQL Server Date Formats

SQL Server Date Formats One of the most frequently asked questions in SQL Server forums is how to format a datetime value or column into a specific date format. Here's a summary of the different date formats that come standard in SQL Server as part of the CONVERT function. Following the standard date formats are some extended date formats that are often asked by SQL Server developers. ……

Dynamic SQL

Overview Dynamic SQL (code that is executed dynamically), like cursors and temporary tables, is another area of T-SQL that should be used with care and wisdom. It has the potential to be used in an unsafe way and could lead to serious security breaches and code that performs badly and is difficult to maintain. On the other hand, when used wisely, dynamic SQL can help you achieve things that would be difficult to achieve any other way. And there are cases in which it is the only way you……

PO采购ITEM清单及单价

这是相关SQL查询语句 select dbo.mipoh.id as PONO,dbo.mipoh.odate as PODATE,dbo.mipod.ITEM,dbo.mipoh.postat,dbo.mipoh.VENDOR, dbo.mipod.descr,dbo.mipod.po_uofm,dbo.mipod.ordered/dbo.mipod.poxstk as QTY, dbo.mipod.PRICE,(dbo.mipod.ordered/dbo.mipod.poxstk)*dbo.mipod.price as AMOUNTfrom dbo.mipoh inner join ……

SQL2000列转行

注:上面信息摘自网上部分有自己所写 1,创建表 /* 普通行列转换 (爱新觉罗.毓华 2007-11-18于海南三亚) 假设有张学生成绩表(tb)如下: Name Subject Result 张三 语文 74 张三 数学 83 张三 物理 93 李四 语文 74 李四 数学 84 李四 物理 94 */ ------------------------------------------------------------------------- /* 想变成 姓名 语文 数学 物理 ---------- ----------- ----------- ----------- 李四 74 84 94 张三 74 83 93 */ create table tb ( Name varchar(10) , Subject va……

Exchange Load Generator v.08.02.0045

Exchange Load Generator 大家应该都知道是什么东东了,相信有很多人用过它。前段时间它出了新的版本--Exchange Load Generator v.08.02.0045: 1.下载地址: Exchange Load Generator (32 bit) Exchange Load Generator (64 bit)2.下面是相关的介绍信息: ……

Visio 2007 Connector for Exchange Server

Visio 2007 Connector是Microsoft Office Visio 2007 的一个插件,可以用它来绘制Microsoft Exchange Server 组织中的的站点间拓扑,包括网站,服务器和连接器。管理员可以创建数据连接Visio图表生动的显示这些数据,从而大大提高生产力。下面是一些抓图: 建议大家下载下来试用一下。下载地址: ……

Update Rollup 2 for Exchange Server 2007 Service Pack 1 (KB948016)发布

微软于当地时间2008/05/08日发布了用于Exchange Server 2007 Service Pack 1 (SP1) 环境的第一个累积更新包--URollup 2 for Exchange Server 2007 Service Pack 1,包括了KB940462在内的二十多个已知问题修复。强烈推荐所有已经安装Exchange Server 2007 SP1的用户安装此Update Rollup。 ……

字符处理(1)

use testcreate table t_example(id int identity(1,1) not null,meetingid varchar(10),Joiner varchar(10)) Insert t_example select '1000','李梅' union all select '1000','王俊'union all select '1000','张风' union all select '1001','王浩' union all select '1001','刘涛' ……

SQL Select notes

We can figure out the difference in three expressions: (Sum(),Compute ,Cube) bytwo select statement.CASE1USE pubs SELECT SUBSTRING(title, 1, 65) AS title, SUM(qty) AS 'qty' FROM sales INNER JOIN titles ON sales.title_id = titles.title_id GROUP BY title WITH CUBE ORDER BY title 下面是结果集:……