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 7575083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:35:52+00:00 2026-05-30T16:35:52+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 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-30T16:35:54+00:00Added an answer on May 30, 2026 at 4:35 pm

    I solved my answer thanks for evere one who tried to help me….i am posting my answer,so that it can be help full to any one in need…

     CREATE procedure SP_GetEmployeeRequests
    (
         @ApproverName varchar (50)
    )
    AS
    BEGIN
    
    SELECT PTS_Employee.Emp_Username, PTS_Requests.Request_RequestedAmount, PTS_Requests.Request_Description, PTS_BalanceTracker.Balance_BalanceAmount, PTS_BalanceTracker.Balance_LastApproval, PTS_BalanceTracker.Balance_LastUpdated
    FROM PTS_Employee  JOIN PTS_Requests  ON PTS_Employee.Emp_ID = PTS_Requests.Emp_ID 
    JOIN PTS_BalanceTracker  ON PTS_BalanceTracker.Emp_ID = PTS_Requests.Emp_ID
    JOIN PTS_Approval  ON PTS_Approval.Approval_ApprovedID  = PTS_Requests.Approval_ApprovedID
    WHERE PTS_Approval.Approval_ApprovedBY = @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.