vbaInet

whojstall11

Registered User.
Local time
Today, 11:27
Joined
Sep 7, 2011
Messages
94
to understand my next problem you have to look at my database. Currently Im working on an query that suppose to output alot of data. My problem is that its not outputing the right and all the data. Im currently working on the "Asset to Bu" Query.


And the password page is not link so dont worry about it.
 

Attachments

Well I cant convert it it too much new things added
 
A good place to start is explaining what the problem is.
 
Currently Im working on an query that suppose to output alot of data. The query shows most of BU but it Bu's criteria is null then its i would output all my data example.
Code:
Bu   |     DAte        |             Initials      |       Blah
AS       01/23/12                ds                    sd
DS        01/23/12                 sd                 sd
SD         01/23/12              ds                  sd
SD            01/23/12              ds     
EDD           01/23/12              hg
What im saying is that EDD is there but doesnt have criteria in the "blah" field so its not going to show up in my query. Get it
 
Put that data in a spreadsheet and upload that. Also show me the SQL statement of your query. And tell me exactly what you expect to see.
 
You need to change the join from an INNER JOIN to a LEFT JOIN.
 
Ok the excel spread shows the table i want. it shows All data i need but if i try to add my "AH_Assinged_AssetNumber" column it will give me the "table 2" results. I need to be able to add "AH_Assinged_AssetNumber" and if there are no users in it should give me the message "No Users".
 

Attachments

Never mind i fixed it thank you it was and right join
Code:
SELECT [Copy Of Asset to BU2].BU_Name, [Copy Of Asset to BU2].Year, [Copy Of Asset to BU2].Expr1002 AS Device, [Copy Of Asset to BU2].AssetNumber, [Copy Of Asset to BU2].[Date Ordered], [Copy Of Asset to BU2].DeviceType, [Copy Of Asset to BU2].Status, [Copy Of Asset to BU2].[Model Number], [Copy Of Asset to BU2].[Warranty Expiration], [Asset to BU].User, [Asset to BU].UserName
FROM [Asset to BU] RIGHT JOIN [Copy Of Asset to BU2] ON [Asset to BU].AH_Assinged_AssetNumber = [Copy Of Asset to BU2].AssetNumber
ORDER BY [Copy Of Asset to BU2].BU_Name;
 

Users who are viewing this thread

Back
Top Bottom