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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:23:42+00:00 2026-06-02T16:23:42+00:00

I am crating a view to display records with contract dates in them. The

  • 0

I am crating a view to display records with contract dates in them.

The data for this view comes from two tables, one which stores the client details and another which stores the date info.

The dates themeselves are stored in the DateCol column and the ID for the DateCol column comes from TypeID eg 118 equals a Contract Start Date and 119 equals an End date.
This returns about 250 results.

The view I have built runs a lookup against the client id and shows the date from the date_type(ie 118 and 119 shows 01/01/2012 and 01/03/2012). If I add a third column that shows me 120, the total number of results is reduced to 6.

I need to see all the results but im not sure how to build a view that shows all of these. I cant modify the original database as it is a backed for Maximizer.

We are using SQL 2005 and I have built this using the Management STudio but my knowledge is a bit limited.

This is the code for my view:

SELECT * 
FROM   dbo.AMGR_Client_Tbl 
       INNER JOIN dbo.FOOTPRINTS_Companies_118 
         ON dbo.AMGR_Client_Tbl.Client_Id = 
            dbo.FOOTPRINTS_Companies_118.Client_Id 
       INNER JOIN dbo.FOOTPRINTS_Companies_119 
         ON dbo.AMGR_Client_Tbl.Client_Id = 
            dbo.FOOTPRINTS_Companies_119.Client_Id 
       INNER JOIN dbo.FOOTPRINTS_Companies_120 
         ON dbo.AMGR_Client_Tbl.Client_Id = 
            dbo.FOOTPRINTS_Companies_120.Client_Id 
       INNER JOIN dbo.FOOTPRINTS_Companies_121 
         ON dbo.AMGR_Client_Tbl.Client_Id = 
            dbo.FOOTPRINTS_Companies_121.Client_Id 
WHERE  ( dbo.AMGR_Client_Tbl.Record_Type = '1' ) AND ( dbo.AMGR_Client_Tbl.Name_Type = 'C' ) 
OR ( dbo.AMGR_Client_Tbl.Record_Type = '1' ) AND ( dbo.AMGR_Client_Tbl.Name_Type = 'C' ) 
  • 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-06-02T16:23:47+00:00Added an answer on June 2, 2026 at 4:23 pm

    Ok, First of all you should list the actual column names that you need on your view and not use *. I believe that you just need to change the INNER JOINs for LEFT JOINs. So it would be like this:

    SELECT [List Your Columns Here]
    FROM   dbo.AMGR_Client_Tbl 
           LEFT JOIN dbo.FOOTPRINTS_Companies_118 
             ON dbo.AMGR_Client_Tbl.Client_Id = 
                dbo.FOOTPRINTS_Companies_118.Client_Id 
           LEFT JOIN dbo.FOOTPRINTS_Companies_119 
             ON dbo.AMGR_Client_Tbl.Client_Id = 
                dbo.FOOTPRINTS_Companies_119.Client_Id 
           LEFT JOIN dbo.FOOTPRINTS_Companies_120 
             ON dbo.AMGR_Client_Tbl.Client_Id = 
                dbo.FOOTPRINTS_Companies_120.Client_Id 
           LEFT JOIN dbo.FOOTPRINTS_Companies_121 
             ON dbo.AMGR_Client_Tbl.Client_Id = 
                dbo.FOOTPRINTS_Companies_121.Client_Id 
    WHERE  ( dbo.AMGR_Client_Tbl.Record_Type = '1' ) AND ( dbo.AMGR_Client_Tbl.Name_Type = 'C' ) 
    OR ( dbo.AMGR_Client_Tbl.Record_Type = '1' ) AND ( dbo.AMGR_Client_Tbl.Name_Type = 'C' ) 
    

    Also, you should note that on your WHERE there seems to be a duplicated condition.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list view that is displaying data using the gridview. This list
I have an events app which gets events data from sqlite database and displays
My application is an apporval system.I am creating data view from a task list
I am using a UITableView to display some data which the user can filter.
I creating the one UITable view with the 2 sections in with when i
I'm working on creating a grouped table view. The data is being loaded alright,
I'm creating an array of view controllers, adding them to a UINavigation Controller, and
I'm creating an autolayout-friendly split view class for one of my applications. Among its
I'm crating a simple MVC app that has People and Notes tables. Using the
I have started creating an app which uses a core data stack at the

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.