Databases Reference
In-Depth Information
Create a Subscribers database in SQL Server
You must first create a database called Subscribers using the SQL Server
Database Engine to hold the address and e-mails of the people you want to
send the report as follows:
1.
Connect to the Database engine ( HodentekWin7\KAILUA in this case)
in the SQL Server Management Studio).
2.
Right-click on the Databases node and select New Database .
3.
In the New Database window type in Subscribers for the database
name and click on the OK button (accept all other defaults).
The database gets created.
Populate a table in the Subscribers database
Now we need to add a table to the Subscribers database that holds the recipient
information. You can do this by running a transact SQL query:
1.
Write a SQL statement as shown to create a table RecipientInfo
in the Subscribers database:
Use Subscribers
CREATE TABLE [dbo].[RecipientInfo] (
[SubscriptionID] [int] NOT NULL PRIMARY KEY,
[RecipientID] [int] ,
[Email] [nvarchar] (50) NOT NULL,
[FileType] [bit],
[Format] [nvarchar] (20) NOT NULL ,
) ON [PRIMARY]
GO
INSERT INTO [dbo].[RecipientInfo] (SubscriptionID,
RecipientID, Email, FileType, Format) VALUES (1, 289,
'John@ixy.net', '1', 'IMAGE')
INSERT INTO [dbo].[RecipientInfo] (SubscriptionID,
RecipientID, Email, FileType, Format) VALUES (2, 284,
'dona@pix.com', '1', 'MHTML')
INSERT INTO [dbo].[RecipientInfo] (SubscriptionID,
RecipientID, Email, FileType, Format) VALUES (3, 275,
'mysorian@gmail.com', '1', 'PDF')
GO
 
Search WWH ::




Custom Search