Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sql statement problem?
Message
 
 
To
28/01/2011 10:56:34
General information
Forum:
ASP.NET
Category:
Databases
Environment versions
Environment:
VB 9.0
OS:
Windows XP
Database:
Jet/Access Engine
Miscellaneous
Thread ID:
01497544
Message ID:
01497659
Views:
36
>yes ar, Access sql .....
>So i don't know how to post my sturture........
>
>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
>w.from_year int
>w.to_year int
>
>
>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
>
>
>
>what is my wrong in this statement ?
>Anyone know how can i do, please thx?

For now, try removing DISTINCT and Having condition - I believe the problem may be in having.
Also, if I remember correctly, dates in access should use # and not ' single quote.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform