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

  • Home
  • SEARCH
  • 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 7579963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:48:00+00:00 2026-05-30T17:48:00+00:00

I have two tables in my database named…Requests and Balance tracker which has no

  • 0

I have two tables in my database named…Requests and Balance tracker which has no relation….but i want to select data from two tables and binf it two grid…

Requests

          EmpID   |EmpRqsts|EmpDescription|ApproverID
           1      |asdfsb  |sadbfsbdf     |1
           2      |asbfd   |sjkfbsd       |1

Balance Tracker

          EmpId|BalanceAmnt|LastUpdated
         | 1   |5000       |sdfbk
         | 2   |3000       |sjbfsh

Employee Table

      EmpId|EmpName
       1   |Anil
       2   |Raghu

Now Balance tracker has ForeignKey column of EmployeeTable…What i want is..iwant to select [EmpName ] from EmpTable [EmpRqsts] from [Requests] and [BalanceAmnt][LastUpdated] from [Balance Tracker] and bind it to grid

This is my stored procedure I am using to retrieve the data

create procedure SP_GetEmployeeRequests
    (@ApproverName varchar (50))
as
begin
    select 
        EmployeeDetails.Emp_Username, 
        RequestDetails.Request_Amount,
        RequestDetails.Request_description,
        BalanceTracker.Balance_Amount,
        BalanceTracker.LastApproval,
        BalanceTracker.LastUdated
    from 
        EmployeeDetails, RequestDetails, BalanceTracker
    where 
        EmployeeDetails.Emp_ID = RequestDetails.Emp_ID
        and BalanceTracker.Emp_ID = RequestDetails.Emp_ID
        and RequestDetails.Approved_ID = (select Approved_ID 
                                          from ApprovalDetails  
                                          where Approved_By = @ApproverName)
end

Everything is fine till here but this query is retrieving only the column names. But not the values of the tables..can any one help me whats wrong in my query..

  • 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-30T17:48:02+00:00Added an answer on May 30, 2026 at 5:48 pm

    Try the following:

        CREATE procedure SP_GetEmployeeRequests
        (
             @ApproverName varchar (50)
        )
        AS
        BEGIN
    
        SELECT ed.Emp_Username, rd.Request_Amount, rd.Request_description, bt.Balance_Amount, bt.LastApproval, bt.LastUpdated
        FROM EmployeeDetails ed JOIN RequestDetails rd ON ed.Emp_ID = rd.emp_ID 
        JOIN BalanceTracker bt ON bt.Emp_ID = rd.Emp_ID
        JOIN ApprovalDetails ad ON rd.Approved_ID  = ad.Approved_ID
        WHERE ad.Approved_By = @ApproverName 
    
        END
        GO
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two tables in my database named...Requests and Balance tracker which has no
Suppose I have a database named MyDatabase which has two tables - MyTable1 and
I have a PostgreSQL database with two tables named user and group. They have
I have a database named SCORPADData and it's got two tables, Parts and Failure_Rates.
I am designing the database (MySQL) in which I have two tables Employees and
Let's say you have a database with two tables named clients and referrals. TABLE
I have two tables in my SQL database: mysql> select *from crop; +------+-----------+----------+ |
I have two tables in my database - Category and Department which both contain
I have two models 'Company' and 'Vehicle' And two tables in database named same
I have two database tables with the following structure: actions: action_id int(11) primary key

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.