Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7092235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:17:17+00:00 2026-05-28T08:17:17+00:00

I need to retrieve data from one table and use it to retrieve data

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T08:17:18+00:00Added an answer on May 28, 2026 at 8:17 am

    It looks like you want something like this.

    create procedure GetCartByEmailId
      @EmailId int
    as  
    
    select P.BrandName,
           P.ModelName,
           HR.HardwareName as RamName,
           HR.HardwareCost as RamCost,
           HG.HardwareName as GraphicCard,
           HG.HardwareCost as GraphicCardCost,
           HS.HardwareName as ScreenSize
    from Cart as C
      inner join ProductInfo as P
        on C.ProductId = P.ProductId
      left outer join HardwareInfo as HR
        on C.Ram = HR.HardwareID
      left outer join HardwareInfo as HG
        on C.GraphicCard = HG.HardwareID
      left outer join HardwareInfo as HS
        on C.ScreenSize = HS.HardwareID
    where C.EmailId = @EmailId
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

using jquery I need to retrieve an array from table cells, format the data
I need to retrieve data (vehicle details, in this case) from a MySQL table
This one is doing my head in... I need to retrieve data from Oracle
I need to retrieve data from two tables. the first is a list of
I need to retrieve a set of Widgets from my data access layer, grouped
I need to retrieve all rows from a table where 2 columns combined are
I'm having trouble taking data from a table and using it to replace strings
I need to gather Distinct Id's from a particular table using LINQ. The catch
I need to retrieve a record from a database, display it on a web
I need to retrieve random rows from SQL Server database. I am looking for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.