医药CRM系统开发

自已做医药CRM系统有四年了,终于可以算个产品了,努力市场化,今年重种将医药营销的理念加入CRM

导航

代理商销售明细表

Posted on 2007-02-28 10:54  hhq80  阅读(403)  评论(0编辑  收藏  举报

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[zy_yp1_proxysalesdetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[zy_yp1_proxysalesdetail]
GO

CREATE TABLE [dbo].[zy_yp1_proxysalesdetail] (
 [lsh] [numeric](18, 0) IDENTITY (1, 1) NOT NULL ,
 [proxyid] [char] (10) NULL ,
 [hisid] [char] (10) NULL ,
 [proxyname] [char] (100) NULL ,
 [hisname] [char] (100) NULL ,
 [czy] [char] (10) NULL ,
 [nbbm] [numeric](8, 0) NULL ,
 [sl] [numeric](18, 2) NULL ,//数量
 [dj] [numeric](18, 2) NULL ,//单价
 [jsdjh] [char] (20) NULL ,
 [ph] [char] (20) NULL ,
 [yxq] [datetime] NULL ,
 [sf] [char] (4) NULL ,
 [czrq] [datetime] NULL
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[zy_yp1_proxysalesdetail] ADD
 CONSTRAINT [DF_zy_yp1_proxysalesdetail_czrq] DEFAULT (getdate()) FOR [czrq],
 CONSTRAINT [PK_zy_yp1_proxysalesdetail] PRIMARY KEY  CLUSTERED
 (
  [lsh]
 )  ON [PRIMARY]
GO