Merge two SQL queries

Version 1
    This document was generated from CDN thread

    Created by: Michael Schmidt on 25-03-2013 03:48:06 AM
    Hi all,

    is it possible to merge these both SQL queries into one SQL query to get the result within only one query?

    select e.userid, e.lastname, e.firstname, e.mailid, e.telephonenumber, d.name device from ((device d inner join enduserdevicemap em on d.pkid = em.fkdevice) inner join enduser e on e.pkid = em.fkenduser)

    select e.userid, e.lastname, e.firstname, e.mailid, e.telephonenumber, n.dnorpattern, d.name, d.description from enduser as e, device as d, numplan as n, devicenumplanmap as m, endusernumplanmap as x where (m.fkdevice = d.pkid and m.fknumplan = n.pkid and e.pkid = x.fkenduser and x.fknumplan = n.pkid and x.tkdnusage = 1)


    BR
    Michael