Topic: two requests
Again I... Ridiculous situation Any at me. There are two requests which separately work perfectly but when I try to merge them in one table produce incorrect numbers.
select dd. PROJECTCODE as x_project; sum (cast ((case when name = ' totaldrilldepth ' then value end) as float)) as s from drillingdetail dd where cast ([DRILLINGDATE] as date) between ' 13-feb-2017 ' and ' 20-feb-2017' group by PROJECTCODE
select s. PROJECTCODE as x_project; count (sd.sampleid) as sss from SAMPLEDESPATCH sd left join DESPATCHSEND ds on sd. DESPATCHNO=ds. DESPATCHNO left join sample s on s. SAMPLEID=sd. SAMPLEID where cast ([senddate] as date) between ' 13-feb-2017 ' and ' 20-feb-2017' group by PROJECTCODE
From below the information which they produce separately and that which should be is presented, being in one request. Tried different methods and subqueries and two to unite - produces any hogwash, digits do not coincide, as I only did not unite them... Digits produces generally the space