Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access sql statement problem?
Message
From
28/01/2011 20:45:52
 
 
To
28/01/2011 20:38:10
General information
Forum:
ASP.NET
Category:
Databases
Environment versions
Environment:
VB 9.0
OS:
Windows XP
Database:
Jet/Access Engine
Miscellaneous
Thread ID:
01497732
Message ID:
01497733
Views:
37
>HI,ALL
> Anyone know Access sql statement , use left join 3 tables, and group by , having sum function...
>How can write to work, thx?
>
>select distinct (c.candidate_no) FROM ((candidate as c left JOIN education as e ON c.candidate_no = e.candidate_no )
> left Join working as w ON c.candidate_no = w.candidate_no )group by c.candidate_no
> having sum(datediff('yyyy','01/01/' & w.from_year ,'01/01/' & w.to_year )) >= 1
>
>tablename: Candidate
>----------------------------------
>
>candidate_id char(key)
> candidate_no char
>
>tablename: Education
>----------------------------------
>education_id char(key)
>candidate_no char
>
>tablename: Working
>----------------------------------
>working_id char(key)
>candidate_no char
>from_year int
>to_year int

I haven't looked at ACCESS in years! Hopefully someone will jump in and help you, but if not, there is a good reference here:

http://msdn.microsoft.com/en-us/library/aa140015%28v=office.10%29.aspx
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform