Table-A:
Each record in this table maintains the list of attached documents for a given user
Table-B:
Each record in this table represents single attached document for a given user.
I am trying to get list of all Table-B records for a given user along with Table-A records. Where Table-A supportingDocIds varchar column maintains the list of Table-B's PrimaryKey idAttachedDocs(INT) using a comma separated.
I tried below with no luck.
select a.*,w.month from attacheddocs a left join weeklyhrssummary w on a.idattacheddocs in (REPLACE(w.supportingDocIds, '\'', '')) where a.userId=w.userid and a.userId=138 ;
Any solutions will be appreciated. Thanks.
/Gopi
www.AlliBilli.com
Aucun commentaire:
Enregistrer un commentaire