473,396 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Join query not displaying all records in one column

6
Hi experts!

I created a view about 4 months ago that has been working great. The view populates from three tables on joins and displays the records that I want (see below with the selected columns).

However, I added a 'notes' column as a varchar into the pmprojects table and increased the allowable size of txt in the column to 750 characters.

Upon running a query on JUST the pmprojects table, all data appears as it should (even the notes).

However, when the View is run, I only get the notes column populated where both the workorder number and project number is populated. This does not happen with any other field within my join. For instance I can add a date or other txt and recieve the desired result (the correct data is shown).

Would someone mind looking at this to see what I am doing wrong? Please also feel free to give me criticism(s).
Thank you,
Bob
Expand|Select|Wrap|Line Numbers
  1. SELECT DISTINCT 
  2.                       TOP 100 PERCENT dbo.DBCostJobsFormatted.JOB_NUMBER  AS [Work Order Number], dbo.pmProjects.WorkOrderNumber AS [Pm Workorder Number],dbo.DBCostJobsFormatted.CUSTOMER_NAME AS [CUSTOMER NAME], dbo.DBCostJobsFormatted.SHIP_TO_1 AS [JOB NAME], dbo.DBCostJobsFormatted.SHIP_TO_3 AS City, RTRIm(dbo.DBCostJobsFormatted.JOB_DESC_1) + ' ' + RTRIM(dbo.DBCostJobsFormatted.JOB_DESC_2) AS [PROJECT DESCRIPTION], dbo.DBCostJobsFormatted.SALESMN_NO AS [SALES #], dbo.DBCostJobsFormatted.Coord AS Coordinator, dbo.DBCostJobsFormatted.JOB_REC_DATE AS [JOB RECD DATE], 
  3. dbo.DBCostJobsFormatted.EST_DUE_DATE AS [EST  DUE DATE], dbo.pmProjects.PermitInHand AS [Permit in Hand], 
  4. dbo.pmProjects.WOintoInstallDept AS [WO into Inst Dept], dbo.pmProjects.FinalInspectionDate AS [Final Inspection], 
  5. dbo.pmProjects.depositrecvd AS [Deposit Recvd], dbo.pmProjects.DateSnttobilling AS [Date Sent to Billing], 
  6. dbo.pmProjects.SignsReceived AS [Signs Recvd], dbo.pmProjects.FabEstShipDate AS [Fab Est Ship Date], 
  7. dbo.pmProjects.ServDate AS [Comp and Service Date], dbo.DBCostJobsFormatted.TOTAL_PRICE AS [Est Price], 
  8. dbo.DBCostJobsFormatted.JOB_CODE AS [Job Code], dbo.pmProjects.AmtSentToBilling AS [Amount Sent to Billing], dbo.pmProjects.UniqueID, 
  9. dbo.pmProjects.OutsideVendor, dbo.pmProjects.PkgSenttoMan, dbo.BRDBCostJob_Codes.JC_Branch, dbo.pmProjects.Notes
  10. FROM         
  11. dbo.BRDBCostJob_Codes RIGHT OUTER JOIN dbo.DBCostJobsFormatted ON dbo.BRDBCostJob_Codes.Job_Code = dbo.DBCostJobsFormatted.JOB_CODE LEFT OUTER JOIN dbo.pmProjects ON dbo.DBCostJobsFormatted.JOB_NUMBER =dbo.pmProjects.WorkOrderNumber
  12.  
Sep 26 '07 #1
0 1010

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Omavlana | last post by:
Hi, I need your help to resolve this problem. I have written a right outer join query between 2 indipendent tables as follows. select b.Account_desc, b.Account, a.CSPL_CSPL from...
2
by: Preston Landers | last post by:
Hello all. I am trying to write a query that "just" switches some data around so it is shown in a slightly different format. I am already able to do what I want in Oracle 8i, but I am having...
0
by: Omavlana | last post by:
Hi, I need your help to resolve this problem. I have written a right outer join query between 2 indipendent tables as follows. select b.Account_desc, b.Account, a.CSPL_CSPL from...
9
by: Alan Lane | last post by:
Hello world: Background: Yesterday, January 21, Doug Steele was kind enough to help me out on a Left Join problem. I was trying to return all stores and their Gross Adds for December, 2004...
2
by: Lyn | last post by:
Hi, I am opening a form in Continuous mode to list the records from a recordset created in the calling form. The recordset object is declared as Public and is set into the new form's Recordset...
26
by: Jeff | last post by:
Ok gang. Here is something complicated, well, at least to me anyway. Using Access DB I have a table in my DB called members. In that table, I have 2 tables I will be using "username" and...
8
by: jason.teen | last post by:
Hi, Is it possible to join on an alias for a field value on-the-fly. Something like the nz() function, but not only for Null values. I want it to be for anything I stipulate as equivalent. ...
1
by: Pragathiarun | last post by:
Hi, In a trasaction table there are some erroneous records in a column called Policynumber that need to be indentified. There is a column called Tran type which can have values "A" and "D". For...
2
Alireza355
by: Alireza355 | last post by:
Dear all I have one query which selects some items from my main table and inserts the results into a fresh temporary table. in this table, there is a column that remains empty to be filled with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.