Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSRS Help

Status
Not open for further replies.

craigward

Programmer
Nov 13, 2007
230
GB
Hi There,
I want to develop some graphical reports using SSRS. I understand how to connect to the database and add data sets etc. What I don’t know is the best way to structure the datasets.

There are two databases a system database for users details, user names and permissions etc. and
a customer database that holds (addresses etc.), sales data, user activities, customer history etc. See below.

System database table structure (rough outline only referencing one table that is relevant):

Wce_users - Stores all users login details and permissions. (SQL script below)

Customer database table structure (rough outline below). (SQL script below)

Wce_contact (entity table) - Holds all of our customer data, names addresses etc.
wce_linkto (link table) - Stores uid’s of entity & sub entity tables to create a link.
Wce_sales (sub entity table) - Stores all sales data for customers (many rows per customer)
Wce_activity(sub entity table) - Stores all task data for users/customers (many rows per customer)
Wce_history (sub entity table) - Stores all historic data for customers (many rows per customer)

The link between the users in the system database is the users uniqueid field that is automatically added to two fields in all entity and sub entity tables when records are created, those are the createuser field and recordmanager field.

So the reports will want to show total sales for all users, sales broken down by user, sales by product. Top customers for the month / quarter / year. When records are created in any of the entity and sub entity tables there is a createtime formatted in dd/mm/yyyy.

Having not used SSRS I’m trying to work out what the best reporting graphs to use at a simple level just to get something up and running and to get a better understanding before drilling down and getting too complex. Do i need to build one query linking the two databases and relevant tables, or do i need multiple datasets for users, customers, and sales but then how do i link them?

I’m sure more information will be needed in order to help with the dataset design but any feedback would be much appreciated.

Thanks for looking.

SYSTEM DATABASE SCRIPT

USE [master]
GO
/****** Object: Database [wce_system] Script Date: 11/18/2014 15:36:57 ******/
CREATE DATABASE [wce_system] ON PRIMARY
( NAME = N'Sites_Sys_60', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\wce_system.mdf' , SIZE = 4544KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
LOG ON
( NAME = N'Sites_Sys_60_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\wce_system_1.ldf' , SIZE = 241216KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO
ALTER DATABASE [wce_system] SET COMPATIBILITY_LEVEL = 90
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [wce_system].[dbo].[sp_fulltext_database] @action = 'disable'
end
GO
ALTER DATABASE [wce_system] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [wce_system] SET ANSI_NULLS OFF
GO
ALTER DATABASE [wce_system] SET ANSI_PADDING OFF
GO
ALTER DATABASE [wce_system] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [wce_system] SET ARITHABORT OFF
GO
ALTER DATABASE [wce_system] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [wce_system] SET AUTO_CREATE_STATISTICS ON
GO
ALTER DATABASE [wce_system] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [wce_system] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [wce_system] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [wce_system] SET CURSOR_DEFAULT GLOBAL
GO
ALTER DATABASE [wce_system] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [wce_system] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [wce_system] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [wce_system] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [wce_system] SET DISABLE_BROKER
GO
ALTER DATABASE [wce_system] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [wce_system] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [wce_system] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [wce_system] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [wce_system] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [wce_system] SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE [wce_system] SET HONOR_BROKER_PRIORITY OFF
GO
ALTER DATABASE [wce_system] SET READ_WRITE
GO
ALTER DATABASE [wce_system] SET RECOVERY FULL
GO
ALTER DATABASE [wce_system] SET MULTI_USER
GO
ALTER DATABASE [wce_system] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [wce_system] SET DB_CHAINING OFF
GO
EXEC sys.sp_db_vardecimal_storage_format N'wce_system', N'ON'
GO
USE [wce_system]
GO
/****** Object: User [WiredContact] Script Date: 11/18/2014 15:36:57 ******/
CREATE USER [WiredContact] WITHOUT LOGIN WITH DEFAULT_SCHEMA=[dbo]
GO
/****** Object: Table [dbo].[wces_users] Script Date: 11/18/2014 15:36:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[wces_users](
[UNIQUEID] [varchar](16) NOT NULL,
[CONTACTID] [varchar](16) NULL,
[WCE_UID] [varchar](30) NULL,
[WCE_PW] [varchar](30) NULL,
[WCE_DISPLAYNAME] [varchar](30) NULL,
[WCE_COUNTRYCODE] [varchar](6) NULL,
[WCE_PIN] [varchar](12) NULL,
[WCE_ALIAS] [varchar](30) NULL,
[WCE_DEFSECPROFILE] [varchar](30) NULL,
[WCE_ACTIVE] [varchar](1) NULL,
[WCE_LOCKED] [varchar](1) NULL,
[WCE_NAMED] [varchar](1) NULL,
[WCE_DEFAULTRMID] [varchar](1) NULL,
[WCE_SIG1] [text] NULL,
[WCE_SIG2] [text] NULL,
[WCE_SIG3] [text] NULL,
[WCE_SIG4] [text] NULL,
[WCE_SIG5] [text] NULL,
[WCE_SIG6] [text] NULL,
[WCE_SECURITY] [text] NULL,
[WCE_OPTIONS] [text] NULL,
[WCE_TEAMS] [text] NULL,
[WCE_DATA] [text] NULL,
[EDITTIME] [datetime] NULL,
[CREATETIME] [datetime] NULL,
[WCE_DEPARTMENT] [varchar](30) NULL,
[WCE_STATUS] [varchar](30) NULL,
[uniqueid_act] [varchar](38) NULL,
[contactid_act] [varchar](38) NULL,
[FavSort] [varchar](20) NULL,
[WCE_SIG1_Name] [varchar](50) NULL,
[LASTLOGIN] [datetime] NULL,
[mycli] [varchar](20) NULL,
CONSTRAINT [pk_wces_users_uid] PRIMARY KEY CLUSTERED
(
[UNIQUEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
CREATE UNIQUE NONCLUSTERED INDEX [UNIQUEID_INDEX] ON [dbo].[wces_users]
(
[UNIQUEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object: Table [dbo].[wces_settings] Script Date: 11/18/2014 15:36:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[wces_settings](
[UNIQUEID] [varchar](16) NOT NULL,
[WCE_NAME] [varchar](50) NULL,
[WCE_ALIAS] [varchar](30) NULL,
[WCE_DATA] [text] NULL,
[EDITTIME] [datetime] NULL,
[CREATETIME] [datetime] NULL,
CONSTRAINT [pk_wces_settings_uid] PRIMARY KEY CLUSTERED
(
[UNIQUEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
CREATE UNIQUE NONCLUSTERED INDEX [UNIQUEID_INDEX] ON [dbo].[wces_settings]
(
[UNIQUEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object: Table [dbo].[wces_security] Script Date: 11/18/2014 15:36:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[wces_security](
[UNIQUEID] [varchar](16) NOT NULL,
[WCE_NAME] [varchar](50) NULL,
[WCE_DESCRIPTION] [varchar](50) NULL,
[WCE_TABLE] [varchar](50) NULL,
[WCE_ALIAS] [varchar](30) NULL,
[WCE_DATA] [text] NULL,
[EDITTIME] [datetime] NULL,
[CREATETIME] [datetime] NULL,
CONSTRAINT [pk_wces_security_uid] PRIMARY KEY CLUSTERED
(
[UNIQUEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
CREATE UNIQUE NONCLUSTERED INDEX [UNIQUEID_INDEX] ON [dbo].[wces_security]
(
[UNIQUEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object: Table [dbo].[wces_lastip] Script Date: 11/18/2014 15:36:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[wces_lastip](
[WCE_LASTIP] [varchar](50) NULL,
[WCE_LASTATTEMPT] [datetime] NULL,
[WCE_UID] [varchar](30) NULL,
[WCE_SITE] [varchar](50) NULL,
[WCE_ALIAS] [varchar](50) NULL,
[WCE_ACTIVE] [varchar](1) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Table [dbo].[wce_dropdowns] Script Date: 11/18/2014 15:36:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[wce_dropdowns](
[UNIQUEID] [varchar](16) NOT NULL,
[WCE_TABLEFIELDNAME] [varchar](60) NULL,
[WCE_DDTYPE] [varchar](30) NULL,
[WCE_DATA] [text] NULL,
[EDITTIME] [datetime] NULL,
[CREATETIME] [datetime] NULL,
CONSTRAINT [pk_wce_dropdowns_uid] PRIMARY KEY CLUSTERED
(
[UNIQUEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO

CUSTOMER DATABASE SCRIPT

USE [master]
GO
/****** Object: Database [wce_site] Script Date: 11/18/2014 15:36:17 ******/
CREATE DATABASE [wce_site] ON PRIMARY
( NAME = N'BoxCoUK_Site', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\wce_site.mdf' , SIZE = 31360KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
LOG ON
( NAME = N'BoxCoUK_Site_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\wce_site_1.ldf' , SIZE = 3480448KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO
ALTER DATABASE [wce_site] SET COMPATIBILITY_LEVEL = 90
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [wce_site].[dbo].[sp_fulltext_database] @action = 'disable'
end
GO
ALTER DATABASE [wce_site] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [wce_site] SET ANSI_NULLS OFF
GO
ALTER DATABASE [wce_site] SET ANSI_PADDING OFF
GO
ALTER DATABASE [wce_site] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [wce_site] SET ARITHABORT OFF
GO
ALTER DATABASE [wce_site] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [wce_site] SET AUTO_CREATE_STATISTICS ON
GO
ALTER DATABASE [wce_site] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [wce_site] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [wce_site] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [wce_site] SET CURSOR_DEFAULT GLOBAL
GO
ALTER DATABASE [wce_site] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [wce_site] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [wce_site] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [wce_site] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [wce_site] SET DISABLE_BROKER
GO
ALTER DATABASE [wce_site] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [wce_site] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [wce_site] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [wce_site] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [wce_site] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [wce_site] SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE [wce_site] SET HONOR_BROKER_PRIORITY OFF
GO
ALTER DATABASE [wce_site] SET READ_WRITE
GO
ALTER DATABASE [wce_site] SET RECOVERY FULL
GO
ALTER DATABASE [wce_site] SET MULTI_USER
GO
ALTER DATABASE [wce_site] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [wce_site] SET DB_CHAINING OFF
GO
EXEC sys.sp_db_vardecimal_storage_format N'wce_site', N'ON'
GO
USE [wce_site]
GO
/****** Object: User [WiredContact] Script Date: 11/18/2014 15:36:17 ******/
CREATE USER [WiredContact] WITHOUT LOGIN WITH DEFAULT_SCHEMA=[dbo]
GO
/****** Object: Table [dbo].[wce_tempdata] Script Date: 11/18/2014 15:36:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[wce_tempdata](
[UNIQUEID] [varchar](16) NOT NULL,
[WCE_TABLEFIELDNAME] [varchar](60) NULL,
[WCE_DATA] [text] NULL,
[EDITTIME] [datetime] NULL,
[CREATETIME] [datetime] NULL,
CONSTRAINT [pk_wce_tempdata_uid] PRIMARY KEY CLUSTERED
(
[UNIQUEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
CREATE UNIQUE NONCLUSTERED INDEX [UNIQUEID_INDEX] ON [dbo].[wce_tempdata]
(
[UNIQUEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object: Table [dbo].[wce_sales] Script Date: 11/18/2014 15:36:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[wce_sales](
[ACTUALCLOSEDATE] [datetime] NULL,
[CREATETIME] [datetime] NULL,
[CREATEUSER] [varchar](16) NULL,
[EDITTIME] [datetime] NULL,
[EDITUSER] [varchar](16) NULL,
[FORECASTCLOSEDATE] [datetime] NULL,
[MANAGINGTEAM] [varchar](25) NULL,
[NOTES] [text] NULL,
[RECORDMANAGER] [varchar](16) NULL,
[SALEPROBABILITY] [numeric](20, 2) NULL,
[SALESTATUS] [varchar](50) NULL,
[SALESTATUSDATE] [datetime] NULL,
[SALETYPE] [varchar](25) NULL,
[STAGE] [varchar](40) NULL,
[STAGEDATE] [datetime] NULL,
[SUBJECT] [varchar](65) NULL,
[UNIQUEID] [varchar](16) NOT NULL,
[Amount] [numeric](20, 2) NULL,
[ProductName] [varchar](50) NULL,
[ProductType] [varchar](50) NULL,
[UNITPRICE] [numeric](20, 2) NULL,
[UNITS] [numeric](20, 2) NULL,
[Source] [varchar](175) NULL,
[Follow_up_Notes] [text] NULL,
[Project_ID] [int] IDENTITY(1,1) NOT NULL,
CONSTRAINT [pk_wce_sales_uid] PRIMARY KEY CLUSTERED
(
[UNIQUEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Table [dbo].[wce_products] Script Date: 11/18/2014 15:36:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[wce_products](
[AMOUNT] [numeric](20, 2) NULL,
[CREATETIME] [datetime] NULL,
[CREATEUSER] [varchar](16) NULL,
[EDITTIME] [datetime] NULL,
[EDITUSER] [varchar](16) NULL,
[MANAGINGTEAM] [varchar](25) NULL,
[PROBABILITY] [numeric](20, 2) NULL,
[PRODUCTFAMILY] [varchar](50) NULL,
[PRODUCTNAME] [varchar](50) NULL,
[PRODUCTTYPE] [varchar](50) NULL,
[RECORDMANAGER] [varchar](16) NULL,
[SALEID] [varchar](16) NULL,
[UNIQUEID] [varchar](16) NOT NULL,
[UNITPRICE] [numeric](20, 2) NULL,
[UNITS] [numeric](20, 2) NULL,
CONSTRAINT [pk_wce_products_uid] PRIMARY KEY CLUSTERED
(
[UNIQUEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Table [dbo].[wce_linkto] Script Date: 11/18/2014 15:36:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[wce_linkto](
[LEntityID] [varchar](16) NOT NULL,
[LETableName] [varchar](20) NOT NULL,
[LUniqueID] [varchar](16) NOT NULL,
[LUTableName] [varchar](20) NOT NULL,
CONSTRAINT [pk_wce_linkto_uid] PRIMARY KEY CLUSTERED
(
[LUniqueID] ASC,
[LUTableName] ASC,
[LEntityID] ASC,
[LETableName] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
CREATE UNIQUE NONCLUSTERED INDEX [UNIQUEROW_INDEX] ON [dbo].[wce_linkto]
(
[LEntityID] ASC,
[LETableName] ASC,
[LUniqueID] ASC,
[LUTableName] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object: Table [dbo].[wce_imsgnotify] Script Date: 11/18/2014 15:36:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[wce_imsgnotify](
[CreateTime] [datetime] NULL,
[CreateUser] [varchar](16) NULL,
[EditTime] [datetime] NULL,
[EditUser] [varchar](16) NULL,
[MessageID] [varchar](21) NULL,
[RecordType] [varchar](16) NULL,
[UniqueID] [varchar](16) NOT NULL,
[UserID] [varchar](16) NULL,
CONSTRAINT [pk_wce_imsgnotify_uid] PRIMARY KEY CLUSTERED
(
[UniqueID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Table [dbo].[wce_imessage] Script Date: 11/18/2014 15:36:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[wce_imessage](
[CreateTime] [datetime] NULL,
[CreateUser] [varchar](16) NULL,
[EditTime] [datetime] NULL,
[EditUser] [varchar](16) NULL,
[Message] [text] NULL,
[MessageID] [varchar](21) NULL,
[RecordType] [varchar](16) NULL,
[UniqueID] [varchar](16) NOT NULL,
[UserList] [text] NULL,
CONSTRAINT [pk_wce_imessage_uid] PRIMARY KEY CLUSTERED
(
[UniqueID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Table [dbo].[wce_history] Script Date: 11/18/2014 15:36:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[wce_history](
[APRIORITY] [varchar](12) NULL,
[ATYPE] [varchar](20) NULL,
[CREATETIME] [datetime] NULL,
[CREATEUSER] [varchar](16) NULL,
[DURATION] [numeric](10, 0) NULL,
[EDITTIME] [datetime] NULL,
[EDITUSER] [varchar](16) NULL,
[TIMELESS] [varchar](1) NULL,
[HTYPE] [varchar](20) NULL,
[MANAGINGTEAM] [varchar](25) NULL,
[NOTES] [text] NULL,
[RECORDEDFOR] [varchar](16) NULL,
[RECORDEDTIME] [datetime] NULL,
[SCHEDULEDTIME] [datetime] NULL,
[SUBJECT] [varchar](70) NULL,
[HASATTACHMENT] [varchar](1) NULL,
[UNIQUEID] [varchar](16) NOT NULL,
[Follow_up_Notes] [text] NULL,
[Project_ID] [varchar](145) NULL,
[Amount] [numeric](18, 0) NULL,
[Units] [numeric](18, 0) NULL,
[UnitPrice] [numeric](18, 0) NULL,
[Source] [varchar](175) NULL,
[ForecastCloseDate] [datetime] NULL,
[SALEPROBABILITY] [numeric](18, 0) NULL,
CONSTRAINT [pk_wce_history_uid] PRIMARY KEY CLUSTERED
(
[UNIQUEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Table [dbo].[wce_groups] Script Date: 11/18/2014 15:36:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[wce_groups](
[ADDRESS1] [varchar](50) NULL,
[ADDRESS2] [varchar](30) NULL,
[ADDRESS3] [varchar](30) NULL,
[CITY] [varchar](30) NULL,
[COUNTRY] [varchar](25) NULL,
[COUNTY] [varchar](25) NULL,
[CREATETIME] [datetime] NULL,
[CREATEUSER] [varchar](16) NULL,
[DESCRIPTION] [varchar](100) NULL,
[DIVISION] [varchar](50) NULL,
[EDITTIME] [datetime] NULL,
[EDITUSER] [varchar](16) NULL,
[EMAILADDRESS] [varchar](75) NULL,
[FAX] [varchar](30) NULL,
[FAXEXT] [varchar](8) NULL,
[FILEFIELD1] [varchar](125) NULL,
[GROUPNAME] [varchar](50) NULL,
[IDSTATUS] [varchar](25) NULL,
[INDUSTRY] [varchar](50) NULL,
[LASTATTEMPT] [datetime] NULL,
[LASTMEETING] [datetime] NULL,
[LASTREACH] [datetime] NULL,
[LASTRESULTS] [text] NULL,
[MANAGINGTEAM] [varchar](25) NULL,
[NUMBEROFEMPLOYEES] [numeric](10, 0) NULL,
[PHONE] [varchar](30) NULL,
[PHONEEXT] [varchar](8) NULL,
[POSTALCODE] [varchar](10) NULL,
[PRIORITY] [varchar](25) NULL,
[RECORDMANAGER] [varchar](16) NULL,
[RECORDOWNER] [varchar](50) NULL,
[REFERREDBY] [varchar](50) NULL,
[REGION] [varchar](50) NULL,
[REVENUE] [varchar](35) NULL,
[SECURITY] [varchar](16) NULL,
[SICCODE] [varchar](20) NULL,
[STATE] [varchar](20) NULL,
[TICKERSYMBOL] [varchar](12) NULL,
[UNIQUEID] [varchar](16) NOT NULL,
[WEBSITE] [varchar](75) NULL,
CONSTRAINT [pk_wce_groups_uid] PRIMARY KEY CLUSTERED
(
[UNIQUEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Table [dbo].[wce_groupcontacts] Script Date: 11/18/2014 15:36:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[wce_groupcontacts](
[LEntityID] [varchar](16) NOT NULL,
[LETableName] [varchar](20) NOT NULL,
[LParentID] [varchar](16) NOT NULL,
[LPTablename] [varchar](20) NOT NULL,
[LUniqueID] [varchar](16) NOT NULL,
[County] [varchar](20) NULL,
CONSTRAINT [pk_wce_groupcontacts_uid] PRIMARY KEY CLUSTERED
(
[LUniqueID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
CREATE UNIQUE NONCLUSTERED INDEX [LUNIQUEID_INDEX] ON [dbo].[wce_groupcontacts]
(
[LUniqueID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object: Table [dbo].[wce_dropdowns] Script Date: 11/18/2014 15:36:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[wce_dropdowns](
[UNIQUEID] [varchar](16) NOT NULL,
[WCE_TABLEFIELDNAME] [varchar](60) NULL,
[WCE_DDTYPE] [varchar](30) NULL,
[WCE_DATA] [text] NULL,
[EDITTIME] [datetime] NULL,
[CREATETIME] [datetime] NULL,
CONSTRAINT [pk_wce_dropdowns_uid] PRIMARY KEY CLUSTERED
(
[UNIQUEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Table [dbo].[wce_deletelog] Script Date: 11/18/2014 15:36:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[wce_deletelog](
[UNIQUEID] [varchar](16) NOT NULL,
[DELETEID] [varchar](16) NULL,
[ENTITYID] [varchar](16) NULL,
[WCE_TABLENAME] [varchar](60) NULL,
[DELETEUSER] [varchar](16) NULL,
[WCE_DATA] [text] NULL,
[EDITTIME] [datetime] NULL,
[CREATETIME] [datetime] NULL,
[DELETETIME] [datetime] NULL,
CONSTRAINT [pk_wce_deletelog_uid] PRIMARY KEY CLUSTERED
(
[UNIQUEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
CREATE UNIQUE NONCLUSTERED INDEX [UNIQUEID_INDEX] ON [dbo].[wce_deletelog]
(
[UNIQUEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object: Table [dbo].[wce_contact] Script Date: 11/18/2014 15:36:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[wce_contact](
[ADDRESS1] [varchar](50) NULL,
[ADDRESS2] [varchar](30) NULL,
[ADDRESS3] [varchar](30) NULL,
[ALTPHONE] [varchar](30) NULL,
[ALTPHONEEXT] [varchar](8) NULL,
[ASSISTANT] [varchar](50) NULL,
[ASSISTANTPHONE] [varchar](30) NULL,
[ASSISTANTPHONEEXT] [varchar](8) NULL,
[ASSISTANTTITLE] [varchar](50) NULL,
[CITY] [varchar](30) NULL,
[CLIENTLOCKED] [varchar](1) NULL,
[CLIENTLOGIN] [varchar](50) NULL,
[CLIENTPASSWORD] [varchar](25) NULL,
[COMPANY] [varchar](50) NULL,
[CONTACT] [varchar](50) NULL,
[COUNTRY] [varchar](25) NULL,
[COUNTY] [varchar](25) NULL,
[CREATETIME] [datetime] NULL,
[CREATEUSER] [varchar](16) NULL,
[DEPARTMENT] [varchar](50) NULL,
[EDITTIME] [datetime] NULL,
[EDITUSER] [varchar](16) NULL,
[EMAIL2] [varchar](75) NULL,
[EMAILADDRESS] [varchar](75) NULL,
[FAX] [varchar](30) NULL,
[FAXEXT] [varchar](8) NULL,
[FILEFIELD1] [varchar](125) NULL,
[FIRSTNAME] [varchar](25) NULL,
[HOMEADDRESS1] [varchar](50) NULL,
[HOMEADDRESS2] [varchar](30) NULL,
[HOMECITY] [varchar](30) NULL,
[HOMECOUNTRY] [varchar](25) NULL,
[HOMECOUNTY] [varchar](25) NULL,
[HOMEPHONE] [varchar](30) NULL,
[HOMEPOSTALCODE] [varchar](10) NULL,
[HOMESTATE] [varchar](20) NULL,
[IDSTATUS] [varchar](25) NULL,
[LASTATTEMPT] [datetime] NULL,
[LASTMEETING] [datetime] NULL,
[LASTNAME] [varchar](25) NULL,
[LASTREACH] [datetime] NULL,
[LASTRESULTS] [text] NULL,
[MANAGINGTEAM] [varchar](25) NULL,
[MOBILEPHONE] [varchar](30) NULL,
[NewField] [varchar](25) NULL,
[PAGER] [varchar](30) NULL,
[PHONE] [varchar](30) NULL,
[PHONEEXT] [varchar](8) NULL,
[POSTALCODE] [varchar](10) NULL,
[RECORDMANAGER] [varchar](16) NULL,
[RECORDOWNER] [varchar](50) NULL,
[REFERREDBY] [varchar](50) NULL,
[SALUTATION] [varchar](50) NULL,
[SECURITY] [varchar](16) NULL,
[SPOUSE] [varchar](50) NULL,
[STATE] [varchar](20) NULL,
[TICKERSYMBOL] [varchar](12) NULL,
[TITLE] [varchar](50) NULL,
[UNIQUEID] [varchar](16) NOT NULL,
[WEBSITE] [varchar](75) NULL,
[Account_Number] [varchar](35) NULL,
[Pro_Client] [varchar](25) NULL,
[Industry] [varchar](65) NULL,
[Risk_Indicator] [varchar](25) NULL,
[Number_of_Employees] [varchar](15) NULL,
[Prefix] [varchar](25) NULL,
[Number_of_Calls] [varchar](25) NULL,
[FU_Week_No] [varchar](15) NULL,
[Comments] [text] NULL,
[Action] [text] NULL,
[Sends] [text] NULL,
[Rating] [varchar](15) NULL,
[Turnover] [varchar](25) NULL,
[Internal_Rep] [varchar](25) NULL,
[Date_First_Ordered] [varchar](15) NULL,
[First_Call_Date] [varchar](15) NULL,
[Last_Call_Date] [varchar](15) NULL,
[Account_YN] [varchar](25) NULL,
[Source] [varchar](35) NULL,
[temp_date] [varchar](50) NULL,
[First_Call_Date_] [datetime] NULL,
CONSTRAINT [pk_wce_contact_uid] PRIMARY KEY CLUSTERED
(
[UNIQUEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Table [dbo].[wce_attachment] Script Date: 11/18/2014 15:36:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[wce_attachment](
[CREATETIME] [datetime] NULL,
[ATTACHMENT] [varchar](254) NULL,
[ENTITYID] [varchar](16) NULL,
[ENTITYTABLE] [varchar](20) NULL,
[SUBENTITYTABLE] [varchar](20) NULL,
[HISTORYID] [varchar](16) NULL,
[RECORDMANAGER] [varchar](16) NULL,
[UNIQUEID] [varchar](16) NOT NULL,
CONSTRAINT [pk_wce_attachment_uid] PRIMARY KEY CLUSTERED
(
[UNIQUEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Table [dbo].[wce_activity] Script Date: 11/18/2014 15:36:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[wce_activity](
[ALARMTIME] [datetime] NULL,
[APRIORITY] [varchar](12) NULL,
[ATYPE] [varchar](12) NULL,
[CLEARSTATUS] [varchar](1) NULL,
[ALARMSTATUS] [varchar](1) NULL,
[CREATETIME] [datetime] NULL,
[CREATEUSER] [varchar](16) NULL,
[DURATION] [numeric](10, 0) NULL,
[EDITTIME] [datetime] NULL,
[EDITUSER] [varchar](16) NULL,
[ENDTIME] [datetime] NULL,
[TIMELESS] [varchar](1) NULL,
[LEADTIME] [numeric](10, 0) NULL,
[MANAGINGTEAM] [varchar](25) NULL,
[NOTES] [text] NULL,
[SCHEDULEFOR] [varchar](16) NULL,
[SCHEDULEID] [varchar](16) NULL,
[STARTTIME] [datetime] NULL,
[SUBJECT] [varchar](50) NULL,
[UNIQUEID] [varchar](16) NOT NULL,
[color] [varchar](20) NULL,
[StopTime] [datetime] NULL,
[Project_ID] [varchar](145) NULL,
[Amount] [money] NULL,
[UnitPrice] [money] NULL,
[Units] [numeric](18, 0) NULL,
[Source] [varchar](175) NULL,
[ForecastCloseDate] [datetime] NULL,
[SALEPROBABILITY] [numeric](20, 2) NULL,
[Follow_up_Notes] [text] NULL,
CONSTRAINT [pk_wce_activity_uid] PRIMARY KEY CLUSTERED
(
[UNIQUEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top