Trifon Dinev

Trifon Dinev

  • NA
  • 269
  • 0

Category product tables

Jun 16 2011 4:16 AM
Hi all,

I have 3 tables


CREATE TABLE [dbo].[items](
[itemId] [uniqueidentifier] NOT NULL,
[itemname] [nvarchar](150) NOT NULL,
CONSTRAINT [PK_items] PRIMARY KEY CLUSTERED
([itemId] ASC)
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
)ON [PRIMARY]
CREATE TABLE [dbo].[itemcategory](
[categoryId] [uniqueidentifier] NOT NULL,
[itemId] [uniqueidentifier] )
NOT NULL ON [PRIMARY]

what I want is:

Main categories must be in one dropdownlist, subcategories in an another dropdownlist and items in third dropdownlist.

I need to prepare stored procedure for this 3 tables.

Could you help me, please?

Thanks,

Trifon.

CREATE TABLE [dbo].[category](
[categoryId] [uniqueidentifier] NOT NULL,
[catParentId] [uniqueidentifier] NULL,
[categoryName] [nvarchar](50) NOT NULL,
CONSTRAINT [PK_category] PRIMARY KEY CLUSTERED
(
[categoryId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
)ON [PRIMARY]

Answers (2)