aku1

知识点滴分类文章

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……

字符处理(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','刘涛' ……

日终处理无法完成怎么办

做日终处理时,窗口出现"Return posting"后,显示 processing Day End Entry 3620, 1.. 接下来是 Internal error. reading posted header 1550 POINVZ1.C.Day End processing could not process all transactions. 解决方法如下,是可用的: 公司数据库里有表POINVI(字段INVISEQ为序列号)和PORCPI(……

Item default price

.Purchase Price(采购价格) 1.1 Vendor Contract Cost级别最高路径:Purchase Order/Setup/Vendor Contract Costs ……

不使ERP成空中楼阁 标准化编码奠定基石

【IT168 专稿】在ERP的运行过程中,由唯一的物料编码编制的BOM是整个体系运行的基石。如果该基石不牢固的话,那么整个ERP就是空中楼阁,无本之木,必然导致失败的厄运;就算是勉强上线,也避免不了大规模维护和调整,举步维艰。 所以从物料编码和BOM的编制规则、编码编制、参数定义、编码启用、编码维护等各个环节都要有一个统一的规划,才可以使物料编码和BOM规范。……