I use two different methods when I create lookup tables.
1) Manually type into the table the data
2) Create a script file which I run in query analyzer. Here is a sample of one the scripts I write:
create table [tbl_LookupCategory]
([int_CategoryID] int NOT NULL Primary Key,
[str_Category] nvarchar(20) Not NULL)
/* Insert the data into the table */
INSERT INTO [tbl_LookupCategory]
( [int_CategoryID],
[str_Category]
)
VALUES
( 1, 'Shirt' )
INSERT INTO [tbl_LookupCategory]
( [int_CategoryID],
[str_Category]
)
VALUES
( 2, 'Hat' )
You can also use copy database wizard to copy your database to other servers.
No comments:
Post a Comment