|
CREATE DATABASE CardFile
Go
USE CardFile
CREATE TABLE [CardFile].[dbo].[ACCOUNT] (
[AccountID] [varchar] (32) NOT NULL ,
[Name] [varchar] (50),
[Address] [text],
[Phone1] [varchar] (20),
[Phone2] [varchar] (20),
[Email] [varchar] (128),
[Note] [text]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [CardFile].[dbo].[CONTACT] (
[AccountID] [varchar] (50) NOT NULL ,
[Name] [varchar] (50) NOT NULL ,
[Title] [varchar] (50),
[Phone] [varchar] (20),
[Extn] [varchar] (10),
[Email] [varchar] (128),
[Note] [text],
[PhotoID] [image] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS OFF
GO
CREATE PROC get_Contacts (@AccntID varchar(32) ) AS
SELECT * FROM Contact WHERE Contact.AccountID = @AccntID
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I work almost exclusively with C++ and database applications and manage the IT concerns for the engineering department of a large food processing company. As such, I get involved with add-ons to existing commercial software, SCADA, interfacing with industrial components (PLC’s, automated weight checking machines, etc.) and other pet projects (currently working on v4.0 of my own document management app).
I get totally fed-up, frustrated and thoroughly delighted with programming and computers, but always remember the sage words of an old lab tech from my Air Force days; “There was never a statue erected to the man who left well enough alone.” I’ll be at it again tomorrow!