I need to retrieve data from one table and use it to retrieve data from other table using stored procedure.
cart table
CartId,
PrdouctId -> should retrieve data from productinfo table
EmailId ->should Retrieve data from cart table that who many cart are register in this EmailId
cost,
Quantity ,
Ram -> contains HardWareId
GraphicCard ->contains HardWareId
ScreenSize ->contains HardWareId
ProductInfo Table
ProductId,
BrandlName,
ModelName,
Processor,
HardwareInfo table
HardWareId,
HardwareName,
HarwareCost,
@EmailId will be supplied to the stored procedure
Select @ProductId =[productId],@Ram = [Ram] from cart where EmailId = @EmailId
Select [BrandName],[ModelName] from ProductInfo where ProductId = @productId
select [HardwareName],[HardwareCost] from HardwareInfo where HardwareId = @Ram
BrandName, ModelName, Processor,Ram,GraphicCard,ScreeSize will be shown to user in list view.
Is correct the way that I’m trying to do it?
It looks like you want something like this.