sql - Query results in empty result -


i trying following query

`select  skillmgt.*, competences.competence_description  skillmgt  inner join competences  on skillmgt.eid=competences.competence_id  eid=121 , datename(yyyy,timestamp)=2013` 

the query runs successfully, returns no results although have eid's equal competence_id's , where clause true

actually,even without where clause not work!

edit: solved doing:

 select skillmgt.*,competences.* competences  join skillmgt  on competences.competence_id=skillmgt.cid  skillmgt.eid=121 , datename(yyyy,skillmgt.timestamp)='2013' 

datename returns string. depending on sql flavor, should try

select  skillmgt.*, competences.competence_description  skillmgt  inner join competences  on skillmgt.eid=competences.competence_id  eid=121 , datename(yyyy,timestamp)="2013" 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -