Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
mousemee
Starting Member
1 Post |
Posted - 2013-03-16 : 00:43:32
|
Hi, i am currently practicing sql using access vba.i created a statementSELECT APPTLOOKUPTABLE.APPTFROM APPTLOOKUPTABLEWHERE (((APPTLOOKUPTABLE.DEPT) Like [DEPTCB].[Value]))IT WORKED WHEN I TRIED IT AS AN SQL QUERY, SHOWING ME A LIST OF APPOINTMENTS WITHIN MY TABLE.HOWEVER, WHEN I INSETED IT INTO VB ACCESS, IT ONLY RETURNED A SINGLE VALUE, WHICH IS THE FIRST VALUE WITHIN THE TABLE THAT IS EQIALS TO DEPTCB.VALUEWHEN I ADDED THE KEYWORD DISTINCT, HOWEVER, IT WORKED PERFECTLY FINE. I DO NOT UNDERSTAND HOW THIS COULD BE.ANY HELP IS APPRECIATED. |
|
Mar
Starting Member
47 Posts |
Posted - 2013-03-19 : 08:24:51
|
Magic!Could be human error. Try it again creating a new query from scratch.Could be machine is tired, reboot and try it again.Try different fields and tables to see what works and what doesn't.If you get the same results then its probably a bug in Access or you have something really different with your installation or setup. |
|
|
|
|
|