Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!
SELECT reportusercredential.id, reportusercredential.username, reportuserpermission.id as reportuserpermissionid, reportusercredential.password, reportusertype.id as usertypeid, Section.id as sectionid, reportusertype.name as usertypename, Branch.name AS branchname, Section.name as sectionname, SELECT STUFF((SELECT ',' + name FROM Branch b where ru.branchid = b.id FOR XML PATH ('')), 1, 1, '') as branchname1 FROM reportusercredential,reportuserpermission ru, Section, Branch b, reportusertype WHERE reportuserpermission.reportuserid=reportusercredential.id AND reportuserpermission.sectionid=Section.id AND reportuserpermission.branchid = Branch.id AND reportusertype.id = reportusercredential.usertypeid AND (('1'='1')) GROUP BY reportusercredential.id
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.