Click here to Skip to main content
15,918,041 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello guys, I have a database in access 2007, but it is recorded in 2002 - 2003, I created around 5 selected to join table together, one among them, hold records but others no, I was looking where the problem might be I did not get that, the difference between those that don't hold records and the one which hold records is that which hold records has one field related to it from another table where others in each one of the selected query in they combination has more than one items from others table..

Please help know what I can do to make those select query holds their records too.

[edit]SHOUTING removed - OriginalGriff[/edit]
Posted
Updated 16-Sep-13 22:35pm
v2
Comments
Maciej Los 17-Sep-13 4:15am    
We don't see your screen, we can't access to your hard drive, we can't read in your mind...
Please, be more specific and provide more details. What you mean: "(query) holds records"?
DAVID DUSHIMIMANA 17-Sep-13 4:28am    
Sir, allow me to send to you sql query to see that, since there is no where through this forum I can send to u my database unless if I get know your email address. this sql query bellow it is for one of the select query table that do not hold their records, for them they hold it from another tables where they get the sources.
SELECT Address.FirstName, Address.Surname, Address.LastName, Address.PhoneNo, Address.Gender, lending.loan_type, lending.loan_period, lending.loan_date, lending.return_date, DateDiff('d',[loan_date],[return_date])-[loan_period] AS Overdues_days, lending.member_id, lending.Address_id, lending.Title, lending.id
FROM Address INNER JOIN lending ON Address.id=lending.Address_id
WHERE (((lending.return_date)=Date()));

And then bellow is select query that hold it content

SELECT Role.Role, Staff.username, Staff.password, Staff.FirstName, Staff.LastName, Staff.Gender, Staff.Email, Staff.Address, Staff.Telephone, Staff.RoleID, Staff.Id_role, Staff.id
FROM Role INNER JOIN Staff ON Role.ID = Staff.Id_role;

I think from there you can get a point, or if possible allow me to get your email so that I may send to u my database to have the look on it. mine is [DELETED]@hotmail.com

[edit]Email removed - OriginalGriff[/edit]
OriginalGriff 17-Sep-13 4:36am    
DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalisation if you want to be taken seriously.

Never post your email address in any forum, unless you really like spam! If anyone replies to you, you will receive an email to let you know
Zerotimedev 17-Sep-13 7:23am    
I read this like 3times and I'm still not 100% sure what you are after. What do you mean by hold? Do wish to retrieve one set of results into memory then select from that or something completely different ?
DAVID DUSHIMIMANA 17-Sep-13 11:40am    
Sir, when I said hold I was mean keeping the records forever. because those select queries is where I did calculation, I just want them to keep records forever.

1 solution

Forever? So would you not write them back to a table if you are using SQL only, using an insert query like this

http://www.w3schools.com/sql/sql_insert_into_select.asp

Otherwise you would write code to read the results into whatever format you are after...
 
Share this answer
 
Comments
DAVID DUSHIMIMANA 18-Sep-13 1:02am    
Sir, thank you for your help, unfortunately I don't see where to insert those sql queries in access, they give access only to query tables only.
Zerotimedev 18-Sep-13 2:02am    
You could create a LoanResults table, then run a query to insert the results of your query into that table.

Im still not 100% sure if its what you are after, but I still think if you wish to keep the data then you need somewhere to store it and if you are happy using tables and SQL then you can just store it in a table. Then you can either run queries from those tables and report from that.

Hope it helps...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900