20240717@103126.1325 ba3gte5d9pcgbsh7tda6k3uchb INICIO DE FICHEIRO DE LOG :: /var/www/webservices/logs/website.sql.log
20240717@103126.1321 ba3gte5d9pcgbsh7tda6k3uchb Query : use flama_phc
20240717@103126.1343 ba3gte5d9pcgbsh7tda6k3uchb Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240717@103126.1356 ba3gte5d9pcgbsh7tda6k3uchb Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='986';
20240717@103126.1371 ba3gte5d9pcgbsh7tda6k3uchb Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='986';
20240717@103549.2600 h7cb9f770q1m8k65u4rvqafrpk Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@103549.2631 h7cb9f770q1m8k65u4rvqafrpk Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@103549.2649 h7cb9f770q1m8k65u4rvqafrpk Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='987';
20240717@103549.2686 h7cb9f770q1m8k65u4rvqafrpk Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='987';
20240717@103549.2703 h7cb9f770q1m8k65u4rvqafrpk Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='987';
20240717@103549.2719 h7cb9f770q1m8k65u4rvqafrpk Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='987';
20240717@103549.3529 r7te62pipud8dt8hbqqfd3pk3a Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@103549.3543 r7te62pipud8dt8hbqqfd3pk3a Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@103549.3560 r7te62pipud8dt8hbqqfd3pk3a Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='988';
20240717@103549.3603 r7te62pipud8dt8hbqqfd3pk3a Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='988';
20240717@103549.3621 r7te62pipud8dt8hbqqfd3pk3a Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='988';
20240717@103549.3634 r7te62pipud8dt8hbqqfd3pk3a Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='988';
20240717@103549.3650 r7te62pipud8dt8hbqqfd3pk3a Query : use flama_phc
20240717@103549.3653 r7te62pipud8dt8hbqqfd3pk3a Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@103549.3668 r7te62pipud8dt8hbqqfd3pk3a Query : select no, estab,szadrsdesc from szadrs where u_coddest=8857
20240717@103549.3730 r7te62pipud8dt8hbqqfd3pk3a Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.698.00.01'
20240717@103549.3803 r7te62pipud8dt8hbqqfd3pk3a Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001533 and bi.ref ='324.698.00.01' and bi.lordem =10000
20240717@103549.4074 r7te62pipud8dt8hbqqfd3pk3a Query : select bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.obranome ,bi.bostamp ,bo.moeda ,bi.vumoeda ,isnull(bi.vumoeda/nullif(bi.edebito,0),1) cambio ,bi.tabiva from bi inner join bo on bi.bostamp = bo.bostamp where bi.bistamp = 'rp24071734899,489000001 ' 
20240717@103549.4324 r7te62pipud8dt8hbqqfd3pk3a Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.698.00.01'
20240717@103549.4335 r7te62pipud8dt8hbqqfd3pk3a Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001533 and bi.ref ='324.698.00.01' and bi.lordem =10000
20240717@103549.4351 r7te62pipud8dt8hbqqfd3pk3a Query : select bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.obranome ,bi.bostamp ,bo.moeda ,bi.vumoeda ,isnull(bi.vumoeda/nullif(bi.edebito,0),1) cambio ,bi.tabiva from bi inner join bo on bi.bostamp = bo.bostamp where bi.bistamp = 'rp24071734899,489000001 ' 
20240717@103549.4362 r7te62pipud8dt8hbqqfd3pk3a Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.642.00.01'
20240717@103549.4444 r7te62pipud8dt8hbqqfd3pk3a Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001533 and bi.ref ='324.642.00.01' and bi.lordem =30000
20240717@103549.4734 r7te62pipud8dt8hbqqfd3pk3a Query : select bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.obranome ,bi.bostamp ,bo.moeda ,bi.vumoeda ,isnull(bi.vumoeda/nullif(bi.edebito,0),1) cambio ,bi.tabiva from bi inner join bo on bi.bostamp = bo.bostamp where bi.bistamp = 'rp24071735906,023000003 ' 
20240717@103549.5010 r7te62pipud8dt8hbqqfd3pk3a Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.642.00.01'
20240717@103549.5019 r7te62pipud8dt8hbqqfd3pk3a Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001533 and bi.ref ='324.642.00.01' and bi.lordem =30000
20240717@103549.5031 r7te62pipud8dt8hbqqfd3pk3a Query : select bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.obranome ,bi.bostamp ,bo.moeda ,bi.vumoeda ,isnull(bi.vumoeda/nullif(bi.edebito,0),1) cambio ,bi.tabiva from bi inner join bo on bi.bostamp = bo.bostamp where bi.bistamp = 'rp24071735906,023000003 ' 
20240717@103549.5042 r7te62pipud8dt8hbqqfd3pk3a Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1667.00.1'
20240717@103549.5113 r7te62pipud8dt8hbqqfd3pk3a Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001533 and bi.ref ='324.1667.00.1' and bi.lordem =40000
20240717@103549.5379 r7te62pipud8dt8hbqqfd3pk3a Query : select bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.obranome ,bi.bostamp ,bo.moeda ,bi.vumoeda ,isnull(bi.vumoeda/nullif(bi.edebito,0),1) cambio ,bi.tabiva from bi inner join bo on bi.bostamp = bo.bostamp where bi.bistamp = 'rp24071735915,007000004 ' 
20240717@103549.5638 r7te62pipud8dt8hbqqfd3pk3a Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '326.597.00.01'
20240717@103549.5714 r7te62pipud8dt8hbqqfd3pk3a Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001533 and bi.ref ='326.597.00.01' and bi.lordem =50000
20240717@103549.5986 r7te62pipud8dt8hbqqfd3pk3a Query : select bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.obranome ,bi.bostamp ,bo.moeda ,bi.vumoeda ,isnull(bi.vumoeda/nullif(bi.edebito,0),1) cambio ,bi.tabiva from bi inner join bo on bi.bostamp = bo.bostamp where bi.bistamp = 'rp24071735925,492000005 ' 
20240717@103549.6247 r7te62pipud8dt8hbqqfd3pk3a Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '326.597.00.01'
20240717@103549.6257 r7te62pipud8dt8hbqqfd3pk3a Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001533 and bi.ref ='326.597.00.01' and bi.lordem =50000
20240717@103549.6268 r7te62pipud8dt8hbqqfd3pk3a Query : select bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.obranome ,bi.bostamp ,bo.moeda ,bi.vumoeda ,isnull(bi.vumoeda/nullif(bi.edebito,0),1) cambio ,bi.tabiva from bi inner join bo on bi.bostamp = bo.bostamp where bi.bistamp = 'rp24071735925,492000005 ' 
20240717@103549.6279 r7te62pipud8dt8hbqqfd3pk3a Query : use flama_phc
20240717@103549.6282 r7te62pipud8dt8hbqqfd3pk3a Query : select top 1 1 valor from ts where ts.ndos = 5
20240717@103549.6344 r7te62pipud8dt8hbqqfd3pk3a Query : use flama_phc
20240717@103549.6347 r7te62pipud8dt8hbqqfd3pk3a Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@103549.6365 r7te62pipud8dt8hbqqfd3pk3a Query : select top 1 assinadoc issigned ,ts.stocks ,ts.bdempresas origin ,case when (cmstocks between 1 and 50 or cm2stocks between 1 and 50 ) then 1 else 0 end entrada ,case when cmstocks>50 or (cm2stocks>50 and trfa =1) then 1 else 0 end saida ,stneg validatestock ,tiposaft ,veserie useserialnumber ,foserie assetin ,ftserie assetout ,veserie assets ,trfarm assetstransfer ,grelha usegridfields from ts inner join ts2 on ts.tsstamp=ts2.ts2stamp where ts.ndos =5
20240717@103549.6472 r7te62pipud8dt8hbqqfd3pk3a Query : use flama_phc
20240717@103549.6475 r7te62pipud8dt8hbqqfd3pk3a Query : select top 1 ~inactivo valor from fl where no = '100001' and estab = 0 order by inactivo desc
20240717@103549.6526 r7te62pipud8dt8hbqqfd3pk3a Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='988';
20240717@103549.6544 r7te62pipud8dt8hbqqfd3pk3a Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='988';

20240717@111649.6752 ljgcd784jucno2ngb97ufe6r5p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='989';
20240717@111649.6921 ljgcd784jucno2ngb97ufe6r5p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='989';
20240717@111649.7010 ljgcd784jucno2ngb97ufe6r5p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='989';
20240717@111649.7038 ljgcd784jucno2ngb97ufe6r5p Query : use flama_phc
20240717@111649.7137 ljgcd784jucno2ngb97ufe6r5p Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@111649.7341 ljgcd784jucno2ngb97ufe6r5p Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.692.00.01'
20240717@111649.8122 ljgcd784jucno2ngb97ufe6r5p Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =002 and bo.boano =2024 and bo.obrano = 2400210 and bi.ref ='324.692.00.01' and bi.lordem =10000
20240717@111649.9352 ljgcd784jucno2ngb97ufe6r5p Query : select bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.obranome ,bi.bostamp ,bo.moeda ,bi.vumoeda ,isnull(bi.vumoeda/nullif(bi.edebito,0),1) cambio ,bi.tabiva from bi inner join bo on bi.bostamp = bo.bostamp where bi.bistamp = 'cps24022736085,070000003 ' 
20240717@111650.4380 ljgcd784jucno2ngb97ufe6r5p Query : use flama_phc
20240717@111650.5360 ljgcd784jucno2ngb97ufe6r5p Query : select top 1 1 valor from ts where ts.ndos = 61
20240717@111650.1084 ljgcd784jucno2ngb97ufe6r5p Query : use flama_phc
20240717@111650.1087 ljgcd784jucno2ngb97ufe6r5p Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@111650.1352 ljgcd784jucno2ngb97ufe6r5p Query : select top 1 assinadoc issigned ,ts.stocks ,ts.bdempresas origin ,case when (cmstocks between 1 and 50 or cm2stocks between 1 and 50 ) then 1 else 0 end entrada ,case when cmstocks>50 or (cm2stocks>50 and trfa =1) then 1 else 0 end saida ,stneg validatestock ,tiposaft ,veserie useserialnumber ,foserie assetin ,ftserie assetout ,veserie assets ,trfarm assetstransfer ,grelha usegridfields from ts inner join ts2 on ts.tsstamp=ts2.ts2stamp where ts.ndos =61
20240717@111650.1722 ljgcd784jucno2ngb97ufe6r5p Query : use flama_phc
20240717@111650.1739 ljgcd784jucno2ngb97ufe6r5p Query : select top 1 ~inactivo valor from fl where no = '202532' and estab = 00 order by inactivo desc
20240717@111650.1922 ljgcd784jucno2ngb97ufe6r5p Query : use flama_phc
20240717@111650.1925 ljgcd784jucno2ngb97ufe6r5p Query : select 1 valor from ts where ndos = 61
20240717@111650.1938 ljgcd784jucno2ngb97ufe6r5p Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240717@111650.2084 ljgcd784jucno2ngb97ufe6r5p Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20240717@111650.2228 ljgcd784jucno2ngb97ufe6r5p Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240717@111650.2666 ljgcd784jucno2ngb97ufe6r5p Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20240717@111650.2784 ljgcd784jucno2ngb97ufe6r5p Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240717@111650.2908 ljgcd784jucno2ngb97ufe6r5p Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20240717@111650.2949 ljgcd784jucno2ngb97ufe6r5p Query : select top 1 ts2.manternumero, ts.tiposaft, ts.idserie,ts.nmdos,ts.bdempresas from ts inner join ts2 on ts.tsstamp=ts2.ts2stamp where ts.ndos = 61
20240717@111650.2962 ljgcd784jucno2ngb97ufe6r5p Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240717@111650.3148 ljgcd784jucno2ngb97ufe6r5p Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240717@111650.3571 ljgcd784jucno2ngb97ufe6r5p Query : use flama_phc
20240717@111650.3575 ljgcd784jucno2ngb97ufe6r5p Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202532' and estab=00
20240717@111650.3830 ljgcd784jucno2ngb97ufe6r5p Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240717@111650.3904 ljgcd784jucno2ngb97ufe6r5p Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20240717@111650.3911 ljgcd784jucno2ngb97ufe6r5p Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut669798903066979a1257',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240717@111650.4344 ljgcd784jucno2ngb97ufe6r5p Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240717@111650.5001 ljgcd784jucno2ngb97ufe6r5p Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20240717@111650.5060 ljgcd784jucno2ngb97ufe6r5p Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut669798903066979a1257','--','bo',1.0944466963923794081 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240717@111650.5099 ljgcd784jucno2ngb97ufe6r5p Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240717@111650.5445 ljgcd784jucno2ngb97ufe6r5p Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20240717@111650.5487 ljgcd784jucno2ngb97ufe6r5p Query : insert into bo (bostamp, nmdos, dataobra, ndos, obrano, no, estab, nome, ncont, morada, local, codpost, moeda, boano, memissao,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut669798903066979a1257','guia r. fornecedor','2024-07-17',61,2402109,?,?,?,?,?,?,?,?,2024, (select valor from para1 where descricao = 'ge_euro') ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240717@111650.8616 ljgcd784jucno2ngb97ufe6r5p Query : use flama_phc
20240717@111650.8716 ljgcd784jucno2ngb97ufe6r5p Query : select st.usalote valor from st where st.ref = '324.692.00.01'
20240717@111650.8793 ljgcd784jucno2ngb97ufe6r5p Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.692.00.01'
20240717@111650.9175 ljgcd784jucno2ngb97ufe6r5p Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240717@111650.9280 ljgcd784jucno2ngb97ufe6r5p Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20240717@111650.9600 ljgcd784jucno2ngb97ufe6r5p Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240717@111651.4000 ljgcd784jucno2ngb97ufe6r5p Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20240717@111651.4500 ljgcd784jucno2ngb97ufe6r5p Query : select sestamp valor from se where ref ='324.692.00.01' and lote = 'r2400210100a'
20240717@111651.9700 ljgcd784jucno2ngb97ufe6r5p Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240717@111651.1830 ljgcd784jucno2ngb97ufe6r5p Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20240717@111651.2286 ljgcd784jucno2ngb97ufe6r5p Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240717@111651.2886 ljgcd784jucno2ngb97ufe6r5p Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20240717@111651.3185 ljgcd784jucno2ngb97ufe6r5p Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut669791928666979a1337',?,?,'20240717',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20240717@111651.3530 ljgcd784jucno2ngb97ufe6r5p Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240717@111651.3769 ljgcd784jucno2ngb97ufe6r5p Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240717@111651.4047 ljgcd784jucno2ngb97ufe6r5p Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20240717@111651.4318 ljgcd784jucno2ngb97ufe6r5p Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut669795129066979a135c','aut669798903066979a1257',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from bo bo where bo.bostamp = 'aut669798903066979a1257'
20240717@111651.4709 ljgcd784jucno2ngb97ufe6r5p Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240717@111651.4984 ljgcd784jucno2ngb97ufe6r5p Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20240717@111651.5205 ljgcd784jucno2ngb97ufe6r5p Query : insert into bi (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,obistamp ,stipo) select 'aut669795129066979a135c',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1044, 1044*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,10000 ,24.67,24.67*200.48,24.67,24.67*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,24.67*1044,24.67*1044*200.48 ,29.613000,29.613000*200.48 ,29.613000,29.613000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,24.67,24.67*200.48,24.67*1044,24.67*1044*200.48,'cps24022736085,070000003 ',27,27*1044,27,27*1044,?,?,?,4 from bo bo where bo.bostamp = 'aut669798903066979a1257'
20240717@111651.7727 ljgcd784jucno2ngb97ufe6r5p Query : use flama_phc
20240717@111651.7790 ljgcd784jucno2ngb97ufe6r5p Query : declare @bostamp varchar(25) = 'aut669798903066979a1257' ,@bistamp varchar(25) = '' update bi set tecoval = qtt * ecoval ,etecoval = qtt * eecoval ,tecoval2 = qtt * ecoval2 ,etecoval2 = qtt * eecoval2 where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end -- se tiver classificação e não for normal, não calcula nada update bi set ttdeb = 0 ,ettdeb = 0 ,ttmoeda = 0 where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and bi.classifc <> '' and bi.classifc <> 'normal' -- no caso normal com moeda euro if exists ( select 1 from bo cross apply ( select valor moeda from para1 where descricao = 'ge_pteoueuro' ) par where bo.bostamp = @bostamp and bo.moeda = par.moeda ) begin -- sem ecovalores update bi set ettdeb = round(bi.qtt * ((bi.edebito * (1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100))), 6) ,ttdeb = round(bi.qtt * ((bi.debito * (1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100))), 6) ,ttmoeda = 0 from bi inner join bo on bi.bostamp = bo.bostamp where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) and bi.econotcalc = 1 -- com ecovalores update bi set ettdeb = round(bi.qtt * ( ( bi.edebito + ( iif(p.st_econotdesc = 1, - bi.eecoval2, bi.eecoval) * ( 1 + iif(bi.ivaincl = 1 and tiva.taxa <> 0, tiva.taxa / 100, 0) ) ) ) * (1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) ), 6) + ( bi.qtt * iif(p.st_econotdesc = 1, (bi.eecoval + bi.eecoval2) * ( 1 + iif(bi.ivaincl = 1 and tiva.taxa <> 0, tiva.taxa / 100, 0) ), 0) ) ,ttdeb = round(bi.qtt * ( ( bi.debito + ( iif(p.st_econotdesc = 1, - bi.ecoval2, bi.ecoval) * ( 1 + iif(bi.ivaincl = 1 and tiva.taxa <> 0, tiva.taxa / 100, 0) ) ) ) * (1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) ), 6) + ( bi.qtt * iif(p.st_econotdesc = 1, (bi.ecoval + bi.ecoval2) * ( 1 + iif(bi.ivaincl = 1 and tiva.taxa <> 0, tiva.taxa / 100, 0) ), 0) ) ,ttmoeda = 0 from bi inner join bo on bi.bostamp = bo.bostamp left join st on bi.ref = st.ref left join taxasiva tiva on bi.tabiva = tiva.codigo cross apply ( select max(valor) st_econotdesc from ( select case when valor = 's' then 1 else 0 end valor from para1 where descricao = 'st_econotdesc' union all select 0 ) a ) p where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) and bi.econotcalc = 0 --acrescenta os descontos em valor, caso existam: update bi set ettdeb = round(bi.ettdeb - (bi.qtt * bi.evaldesc), 2) ,ttdeb = round(bi.ttdeb - (bi.qtt * bi.valdesc), 2) ,ttmoeda = 0 from bi where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) and bi.valdesc <> 0 end else begin update bi set ttmoeda = round((1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) * bi.qtt * bi.vumoeda, 2) ,ettdeb = case when bo2.cambio <> 0 then round((round((1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) * bi.qtt * bi.vumoeda, 2)) / bo2.cambio, 2) else 0 end ,edebito = case when bi.qtt = 0 then 0 else round(abs(( case when bo2.cambio <> 0 then round((round((1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) * bi.qtt * bi.vumoeda, 2)) / bo2.cambio, 2) else 0 end ) / (1 - bi.desconto / 100) / (1 - bi.desc2 / 100) / (1 - bi.desc3 / 100) / (1 - bi.desc4 / 100) / (1 - bi.desc5 / 100) / (1 - bi.desc6 / 100) / bi.qtt), 2) end ,debito = case when bi.qtt = 0 then 0 else round(abs(( case when bo2.cambio <> 0 then round((round((1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) * bi.qtt * bi.vumoeda, 2)) / bo2.cambio, 2) else 0 end ) / (1 - bi.desconto / 100) / (1 - bi.desc2 / 100) / (1 - bi.desc3 / 100) / (1 - bi.desc4 / 100) / (1 - bi.desc5 / 100) / (1 - bi.desc6 / 100) / bi.qtt), 2) end * 200.482 from bi inner join bo2 on bi.bostamp = bo2.bo2stamp where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) update bi set ttdeb = round(bi.ttdeb - (bi.qtt * bi.valdesc), 2) ,ettdeb = round(bi.ettdeb - (bi.qtt * bi.evaldesc), 0) ,debito = round(bi.debito - (bi.qtt * bi.valdesc), 2) ,edebito = round(bi.edebito - (bi.qtt * bi.evaldesc), 2) where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) and bi.valdesc <> 0 end 
20240717@111652.2039 ljgcd784jucno2ngb97ufe6r5p Query : use flama_phc
20240717@111652.2128 ljgcd784jucno2ngb97ufe6r5p Query : select 1 valor from bo where bo.bostamp = 'aut669798903066979a1257'
20240717@111652.2356 ljgcd784jucno2ngb97ufe6r5p Query : declare @errno int ,@errmsg varchar(255) ,@prod bit ,@nrdec numeric(10, 0) ,@totaldeb numeric(18, 5) ,@etotaldeb numeric(19, 6) ,@total numeric(18, 5) ,@etotal numeric(19, 6) ,@custo numeric(18, 5) ,@ecusto numeric(19, 6) ,@bo_1iliq numeric(19, 6) ,@bo_2iliq numeric(19, 6) ,@base1 numeric(19, 6) ,@base2 numeric(19, 6) ,@moetotal numeric(13, 3) ,@smoe1 numeric(13, 3) ,@smoe2 numeric(13, 3) ,@smoe3 numeric(13, 3) ,@smoe4 numeric(13, 3) ,@bo11_bins numeric(18, 5) ,@bo21_bins numeric(18, 5) ,@bo31_bins numeric(18, 5) ,@bo41_bins numeric(18, 5) ,@bo51_bins numeric(18, 5) ,@bo61_bins numeric(18, 5) ,@bo71_bins numeric(18, 5) ,@bo81_bins numeric(18, 5) ,@bo91_bins numeric(18, 5) ,@bo12_bins numeric(18, 5) ,@bo22_bins numeric(18, 5) ,@bo32_bins numeric(18, 5) ,@bo42_bins numeric(18, 5) ,@bo52_bins numeric(18, 5) ,@bo62_bins numeric(18, 5) ,@bo72_bins numeric(18, 5) ,@bo82_bins numeric(18, 5) ,@bo92_bins numeric(18, 5) ,@ebo11_bins numeric(19, 6) ,@ebo21_bins numeric(19, 6) ,@ebo31_bins numeric(19, 6) ,@ebo41_bins numeric(19, 6) ,@ebo51_bins numeric(19, 6) ,@ebo61_bins numeric(19, 6) ,@ebo71_bins numeric(18, 5) ,@ebo81_bins numeric(18, 5) ,@ebo91_bins numeric(18, 5) ,@ebo12_bins numeric(19, 6) ,@ebo22_bins numeric(19, 6) ,@ebo32_bins numeric(19, 6) ,@ebo42_bins numeric(19, 6) ,@ebo52_bins numeric(19, 6) ,@ebo62_bins numeric(19, 6) ,@ebo72_bins numeric(18, 5) ,@ebo82_bins numeric(18, 5) ,@ebo92_bins numeric(18, 5) ,@bo11_iva numeric(18, 5) ,@bo21_iva numeric(18, 5) ,@bo31_iva numeric(18, 5) ,@bo41_iva numeric(18, 5) ,@bo51_iva numeric(18, 5) ,@bo61_iva numeric(18, 5) ,@bo71_iva numeric(18, 5) ,@bo81_iva numeric(18, 5) ,@bo91_iva numeric(18, 5) ,@bo12_iva numeric(18, 5) ,@bo22_iva numeric(18, 5) ,@bo32_iva numeric(18, 5) ,@bo42_iva numeric(18, 5) ,@bo52_iva numeric(18, 5) ,@bo62_iva numeric(18, 5) ,@bo72_iva numeric(18, 5) ,@bo82_iva numeric(18, 5) ,@bo92_iva numeric(18, 5) ,@ebo11_iva numeric(19, 6) ,@ebo21_iva numeric(19, 6) ,@ebo31_iva numeric(19, 6) ,@ebo41_iva numeric(19, 6) ,@ebo51_iva numeric(19, 6) ,@ebo61_iva numeric(19, 6) ,@ebo71_iva numeric(18, 5) ,@ebo81_iva numeric(18, 5) ,@ebo91_iva numeric(18, 5) ,@ebo12_iva numeric(19, 6) ,@ebo22_iva numeric(19, 6) ,@ebo32_iva numeric(19, 6) ,@ebo42_iva numeric(19, 6) ,@ebo52_iva numeric(19, 6) ,@ebo62_iva numeric(19, 6) ,@ebo72_iva numeric(18, 5) ,@ebo82_iva numeric(18, 5) ,@ebo92_iva numeric(18, 5) ,@esdeb1 numeric(19, 6) ,@esdeb2 numeric(19, 6) ,@esdeb3 numeric(19, 6) ,@esdeb4 numeric(19, 6) ,@sdeb1 numeric(18, 5) ,@sdeb2 numeric(18, 5) ,@sdeb3 numeric(18, 5) ,@sdeb4 numeric(18, 5) ,@estot1 numeric(19, 6) ,@estot2 numeric(19, 6) ,@estot3 numeric(19, 6) ,@estot4 numeric(19, 6) ,@stot1 numeric(18, 5) ,@stot2 numeric(18, 5) ,@stot3 numeric(18, 5) ,@stot4 numeric(18, 5) ,@ebo_1tvall numeric(19, 6) ,@ebo_2tvall numeric(19, 6) ,@bo_1tvall numeric(18, 5) ,@bo_2tvall numeric(18, 5) ,@ebo_totp1 numeric(19, 6) ,@ebo_totp2 numeric(19, 6) ,@bo_totp1 numeric(18, 5) ,@bo_totp2 numeric(18, 5) ,@sqtt11 numeric(13, 3) ,@sqtt21 numeric(13, 3) ,@sqtt12 numeric(13, 3) ,@sqtt22 numeric(13, 3) ,@sqtt13 numeric(13, 3) ,@sqtt23 numeric(13, 3) ,@sqtt14 numeric(13, 3) ,@sqtt24 numeric(13, 3) ,@userinis varchar (30) ,@mybostamp char(25) = 'aut669798903066979a1257' declare @totaisiva table ( bostamp varchar (25), codigo numeric(1), taxa numeric (5,2), ebaseinc numeric (19,6), baseinc numeric (18,5), evalor numeric (19,6), valor numeric (18,5) ) set @prod = ( select ts.producao from bo(nolock) inner join ts(nolock) on bo.ndos = ts.ndos and bo.bostamp = @mybostamp ) set @nrdec = ( select convert(numeric(10, 0), valor) from para1(nolock) where descricao = 'de_euro' ) --set @prod = 0 --set @nrdec = 2 select @ecusto = sum(bi.epcusto * bi.qtt) ,@custo = sum(bi.pcusto * bi.qtt) ,@bo11_bins = sum(case when bi.tabiva = 1 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo21_bins = sum(case when bi.tabiva = 2 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo31_bins = sum(case when bi.tabiva = 3 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo41_bins = sum(case when bi.tabiva = 4 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo51_bins = sum(case when bi.tabiva = 5 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo61_bins = sum(case when bi.tabiva = 6 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo71_bins = sum(case when bi.tabiva = 7 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo81_bins = sum(case when bi.tabiva = 8 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo91_bins = sum(case when bi.tabiva = 9 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo12_bins = sum(case when bi.tabiva = 1 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo22_bins = sum(case when bi.tabiva = 2 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo32_bins = sum(case when bi.tabiva = 3 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo42_bins = sum(case when bi.tabiva = 4 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo52_bins = sum(case when bi.tabiva = 5 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo62_bins = sum(case when bi.tabiva = 6 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo72_bins = sum(case when bi.tabiva = 7 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo82_bins = sum(case when bi.tabiva = 8 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo92_bins = sum(case when bi.tabiva = 9 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo11_bins = sum(case when bi.tabiva = 1 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo21_bins = sum(case when bi.tabiva = 2 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo31_bins = sum(case when bi.tabiva = 3 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo41_bins = sum(case when bi.tabiva = 4 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo51_bins = sum(case when bi.tabiva = 5 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo61_bins = sum(case when bi.tabiva = 6 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo71_bins = sum(case when bi.tabiva = 7 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo81_bins = sum(case when bi.tabiva = 8 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo91_bins = sum(case when bi.tabiva = 9 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo12_bins = sum(case when bi.tabiva = 1 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo22_bins = sum(case when bi.tabiva = 2 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo32_bins = sum(case when bi.tabiva = 3 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo42_bins = sum(case when bi.tabiva = 4 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo52_bins = sum(case when bi.tabiva = 5 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo62_bins = sum(case when bi.tabiva = 6 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo72_bins = sum(case when bi.tabiva = 7 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo82_bins = sum(case when bi.tabiva = 8 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo92_bins = sum(case when bi.tabiva = 9 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo_1iliq = round(sum(bi.qtt * bi.epu), @nrdec) ,@bo_2iliq = round(sum(bi.ettdeb), @nrdec) ,@bo11_iva = sum(case when bi.tabiva = 1 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo12_iva = sum(case when bi.tabiva = 1 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo21_iva = sum(case when bi.tabiva = 2 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo22_iva = sum(case when bi.tabiva = 2 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo31_iva = sum(case when bi.tabiva = 3 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo32_iva = sum(case when bi.tabiva = 3 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo41_iva = sum(case when bi.tabiva = 4 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo42_iva = sum(case when bi.tabiva = 4 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo51_iva = sum(case when bi.tabiva = 5 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo52_iva = sum(case when bi.tabiva = 5 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo61_iva = sum(case when bi.tabiva = 6 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo62_iva = sum(case when bi.tabiva = 6 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo71_iva = sum(case when bi.tabiva = 7 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo72_iva = sum(case when bi.tabiva = 7 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo81_iva = sum(case when bi.tabiva = 8 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo82_iva = sum(case when bi.tabiva = 8 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo91_iva = sum(case when bi.tabiva = 9 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo92_iva = sum(case when bi.tabiva = 9 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo11_iva = sum(case when bi.tabiva = 1 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo12_iva = sum(case when bi.tabiva = 1 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo21_iva = sum(case when bi.tabiva = 2 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo22_iva = sum(case when bi.tabiva = 2 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo31_iva = sum(case when bi.tabiva = 3 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo32_iva = sum(case when bi.tabiva = 3 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo41_iva = sum(case when bi.tabiva = 4 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo42_iva = sum(case when bi.tabiva = 4 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo51_iva = sum(case when bi.tabiva = 5 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo52_iva = sum(case when bi.tabiva = 5 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo61_iva = sum(case when bi.tabiva = 6 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo62_iva = sum(case when bi.tabiva = 6 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo71_iva = sum(case when bi.tabiva = 7 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo72_iva = sum(case when bi.tabiva = 7 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo81_iva = sum(case when bi.tabiva = 8 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo82_iva = sum(case when bi.tabiva = 8 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo91_iva = sum(case when bi.tabiva = 9 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else bi.ettdeb - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo92_iva = sum(case when bi.tabiva = 9 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@esdeb1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.ettdeb else bi.ettdeb - round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@esdeb2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.ettdeb else bi.ettdeb - round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@esdeb3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.ettdeb else bi.ettdeb - round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@esdeb4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) * bi.iva / 100, @nrdec) end else 0 end) ,@sdeb1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.ttdeb else bi.ttdeb - round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@sdeb2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.ttdeb else bi.ttdeb - round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@sdeb3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.ttdeb else bi.ttdeb - round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@sdeb4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) * bi.iva / 100, @nrdec) end else 0 end) ,@smoe1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.ttmoeda else round(bi.ttmoeda / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@smoe2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.ttmoeda else round(bi.ttmoeda / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@smoe3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.ttmoeda else round(bi.ttmoeda / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@smoe4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.ttmoeda else round(bi.ttmoeda / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@estot1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@estot2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@estot3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@estot4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@stot1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@stot2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@stot3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@stot4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@total = @stot1 + @stot2 + @stot3 + @stot4 ,@etotal = @estot1 + @estot2 + @estot3 + @estot4 ,@totaldeb = @sdeb1 + @sdeb2 + @sdeb3 + @sdeb4 ,@etotaldeb = @esdeb1 + @esdeb2 + @esdeb3 + @esdeb4 ,@moetotal = @smoe1 + @smoe2 + @smoe3 + @smoe4 ,@ebo_1tvall = @ebo11_bins + @ebo21_bins + @ebo31_bins + @ebo41_bins + @ebo51_bins + @ebo61_bins + @ebo71_bins + @ebo81_bins + @ebo91_bins ,@ebo_2tvall = @ebo12_bins + @ebo22_bins + @ebo32_bins + @ebo42_bins + @ebo52_bins + @ebo62_bins + @ebo72_bins + @ebo82_bins + @ebo92_bins ,@bo_1tvall = @bo11_bins + @bo21_bins + @bo31_bins + @bo41_bins + @bo51_bins + @bo61_bins + @bo71_bins + @bo81_bins + @bo91_bins ,@bo_2tvall = @bo12_bins + @bo22_bins + @bo32_bins + @bo42_bins + @bo52_bins + @bo62_bins + @bo72_bins + @bo82_bins + @bo92_bins ,@ebo_totp1 = sum(case when bi.ivaincl = 0 then (bi.epu * bi.qtt) else round((bi.epu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end) ,@ebo_totp2 = sum(case when bi.ivaincl = 0 then (bi.edebito * bi.qtt) else round((bi.edebito * bi.qtt) / (1 + bi.iva / 100), @nrdec) end) ,@bo_totp1 = sum(case when bi.ivaincl = 0 then (bi.pu * bi.qtt) else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end) ,@bo_totp2 = sum(case when bi.ivaincl = 0 then (bi.debito * bi.qtt) else round((bi.debito * bi.qtt) / (1 + bi.iva / 100), @nrdec) end) ,@sqtt11 = sum(case when bi.stipo = 1 then bi.qtt else 0 end) ,@sqtt21 = sum(case when bi.stipo = 1 then bi.qtt else 0 end) ,@sqtt12 = sum(case when bi.stipo = 2 then bi.qtt else 0 end) ,@sqtt22 = sum(case when bi.stipo = 2 then bi.qtt else 0 end) ,@sqtt13 = sum(case when bi.stipo = 3 then bi.qtt else 0 end) ,@sqtt23 = sum(case when bi.stipo = 3 then bi.qtt else 0 end) ,@sqtt14 = sum(case when bi.stipo = 4 then bi.qtt else 0 end) ,@sqtt24 = sum(case when bi.stipo = 5 then bi.qtt else 0 end) from bi(nolock) where bi.bostamp = @mybostamp and bi.producao = case when @prod = 1 then 1 else bi.producao end and bi.composto = 0 and bi.qtt <> 0 update bo set bo.totaldeb = isnull(@totaldeb, 0) ,bo.total = isnull(@total, 0) ,bo.etotaldeb = isnull(@etotaldeb, 0) ,bo.moetotal = isnull(@moetotal, 0) ,bo.etotal = isnull(@etotal, 0) ,bo.ecusto = isnull(@ecusto, 0) ,bo.custo = isnull(@custo, 0) ,bo.bo11_bins = isnull(@bo11_bins, 0) ,bo.bo12_bins = isnull(@bo12_bins, 0) ,bo.bo21_bins = isnull(@bo21_bins, 0) ,bo.bo22_bins = isnull(@bo22_bins, 0) ,bo.bo31_bins = isnull(@bo31_bins, 0) ,bo.bo32_bins = isnull(@bo32_bins, 0) ,bo.bo41_bins = isnull(@bo41_bins, 0) ,bo.bo42_bins = isnull(@bo42_bins, 0) ,bo.bo51_bins = isnull(@bo51_bins, 0) ,bo.bo52_bins = isnull(@bo52_bins, 0) ,bo.bo61_bins = isnull(@bo61_bins, 0) ,bo.bo62_bins = isnull(@bo62_bins, 0) ,bo.ebo11_bins = isnull(@ebo11_bins, 0) ,bo.ebo12_bins = isnull(@ebo12_bins, 0) ,bo.ebo21_bins = isnull(@ebo21_bins, 0) ,bo.ebo22_bins = isnull(@ebo22_bins, 0) ,bo.ebo31_bins = isnull(@ebo31_bins, 0) ,bo.ebo32_bins = isnull(@ebo32_bins, 0) ,bo.ebo41_bins = isnull(@ebo41_bins, 0) ,bo.ebo42_bins = isnull(@ebo42_bins, 0) ,bo.ebo51_bins = isnull(@ebo51_bins, 0) ,bo.ebo52_bins = isnull(@ebo52_bins, 0) ,bo.ebo61_bins = isnull(@ebo61_bins, 0) ,bo.ebo62_bins = isnull(@ebo62_bins, 0) ,bo.bo11_iva = isnull(@bo11_iva, 0) ,bo.bo12_iva = isnull(@bo12_iva, 0) ,bo.bo21_iva = isnull(@bo21_iva, 0) ,bo.bo22_iva = isnull(@bo22_iva, 0) ,bo.bo31_iva = isnull(@bo31_iva, 0) ,bo.bo32_iva = isnull(@bo32_iva, 0) ,bo.bo41_iva = isnull(@bo41_iva, 0) ,bo.bo42_iva = isnull(@bo42_iva, 0) ,bo.bo51_iva = isnull(@bo51_iva, 0) ,bo.bo52_iva = isnull(@bo52_iva, 0) ,bo.bo61_iva = isnull(@bo61_iva, 0) ,bo.bo62_iva = isnull(@bo62_iva, 0) ,bo.ebo11_iva = isnull(@ebo11_iva, 0) ,bo.ebo12_iva = isnull(@ebo12_iva, 0) ,bo.ebo21_iva = isnull(@ebo21_iva, 0) ,bo.ebo22_iva = isnull(@ebo22_iva, 0) ,bo.ebo31_iva = isnull(@ebo31_iva, 0) ,bo.ebo32_iva = isnull(@ebo32_iva, 0) ,bo.ebo41_iva = isnull(@ebo41_iva, 0) ,bo.ebo42_iva = isnull(@ebo42_iva, 0) ,bo.ebo51_iva = isnull(@ebo51_iva, 0) ,bo.ebo52_iva = isnull(@ebo52_iva, 0) ,bo.ebo61_iva = isnull(@ebo61_iva, 0) ,bo.ebo62_iva = isnull(@ebo62_iva, 0) ,bo.esdeb1 = isnull(@esdeb1, 0) ,bo.esdeb2 = isnull(@esdeb2, 0) ,bo.esdeb3 = isnull(@esdeb3, 0) ,bo.esdeb4 = isnull(@esdeb4, 0) ,bo.sdeb1 = isnull(@sdeb1, 0) ,bo.sdeb2 = isnull(@sdeb2, 0) ,bo.sdeb3 = isnull(@sdeb3, 0) ,bo.sdeb4 = isnull(@sdeb4, 0) ,bo.smoe1 = isnull(@smoe1, 0) ,bo.smoe2 = isnull(@smoe2, 0) ,bo.smoe3 = isnull(@smoe3, 0) ,bo.smoe4 = isnull(@smoe4, 0) ,bo.estot1 = isnull(@estot1, 0) ,bo.estot2 = isnull(@estot2, 0) ,bo.estot3 = isnull(@estot3, 0) ,bo.estot4 = isnull(@estot4, 0) ,bo.stot1 = isnull(@stot1, 0) ,bo.stot2 = isnull(@stot2, 0) ,bo.stot3 = isnull(@stot3, 0) ,bo.stot4 = isnull(@stot4, 0) ,bo.ebo_1tvall = isnull(@ebo_1tvall, 0) ,bo.ebo_2tvall = isnull(@ebo_2tvall, 0) ,bo.bo_1tvall = isnull(@bo_1tvall, 0) ,bo.bo_2tvall = isnull(@bo_2tvall, 0) ,bo.ebo_totp1 = isnull(@ebo_totp1, 0) ,bo.ebo_totp2 = isnull(@ebo_totp2, 0) ,bo.bo_totp1 = isnull(@bo_totp1, 0) ,bo.bo_totp2 = isnull(@bo_totp2, 0) ,bo.sqtt11 = isnull(@sqtt11, 0) ,bo.sqtt21 = isnull(@sqtt21, 0) ,bo.sqtt12 = isnull(@sqtt12, 0) ,bo.sqtt22 = isnull(@sqtt22, 0) ,bo.sqtt13 = isnull(@sqtt13, 0) ,bo.sqtt23 = isnull(@sqtt23, 0) ,bo.sqtt14 = isnull(@sqtt14, 0) ,bo.sqtt24 = isnull(@sqtt24, 0) where bostamp = @mybostamp update bo2 set bo2.bo71_bins = isnull(@bo71_bins, 0) ,bo2.bo72_bins = isnull(@bo72_bins, 0) ,bo2.bo81_bins = isnull(@bo81_bins, 0) ,bo2.bo82_bins = isnull(@bo82_bins, 0) ,bo2.bo91_bins = isnull(@bo91_bins, 0) ,bo2.bo92_bins = isnull(@bo92_bins, 0) ,bo2.ebo71_bins = isnull(@ebo71_bins, 0) ,bo2.ebo72_bins = isnull(@ebo72_bins, 0) ,bo2.ebo81_bins = isnull(@ebo81_bins, 0) ,bo2.ebo82_bins = isnull(@ebo82_bins, 0) ,bo2.ebo91_bins = isnull(@ebo91_bins, 0) ,bo2.ebo92_bins = isnull(@ebo92_bins, 0) ,bo2.bo71_iva = isnull(@bo71_iva, 0) ,bo2.bo72_iva = isnull(@bo72_iva, 0) ,bo2.bo81_iva = isnull(@bo81_iva, 0) ,bo2.bo82_iva = isnull(@bo82_iva, 0) ,bo2.bo91_iva = isnull(@bo91_iva, 0) ,bo2.bo92_iva = isnull(@bo92_iva, 0) ,bo2.ebo71_iva = isnull(@ebo71_iva, 0) ,bo2.ebo72_iva = isnull(@ebo72_iva, 0) ,bo2.ebo81_iva = isnull(@ebo81_iva, 0) ,bo2.ebo82_iva = isnull(@ebo82_iva, 0) ,bo2.ebo91_iva = isnull(@ebo91_iva, 0) ,bo2.ebo92_iva = isnull(@ebo92_iva, 0) ,bo2.etotalciva = isnull(@etotaldeb, 0) + isnull(@ebo12_iva, 0) +isnull(@ebo22_iva, 0) +isnull(@ebo32_iva, 0) +isnull(@ebo42_iva, 0) +isnull(@ebo52_iva, 0) +isnull(@ebo62_iva, 0) +isnull(@ebo72_iva, 0) +isnull(@ebo82_iva, 0) +isnull(@ebo92_iva, 0) --,bo2.mtotalciva =isnull(@moetotal, 0) where bo2stamp = @mybostamp -- trata os bot select @userinis = usrinis from bo where bo.bostamp=@mybostamp insert into @totaisiva ( bostamp, codigo, taxa, ebaseinc, baseinc, evalor, valor ) select @mybostamp,codigo,taxa ,case when (@ebo11_bins <>0) then @ebo11_bins else @ebo12_bins end ,case when (@ebo11_bins <>0) then @bo11_bins else @bo12_bins end ,case when (@ebo11_bins <>0) then @ebo11_iva else @ebo12_iva end ,case when (@ebo11_bins <>0) then @bo11_iva else @bo12_iva end from taxasiva where codigo = 1 union all select @mybostamp,codigo,taxa ,case when (@ebo21_bins <>0) then @ebo21_bins else @ebo22_bins end ,case when (@ebo21_bins <>0) then @bo21_bins else @bo22_bins end ,case when (@ebo21_bins <>0) then @ebo21_iva else @ebo22_iva end ,case when (@ebo21_bins <>0) then @bo21_iva else @bo22_iva end from taxasiva where codigo = 2 union all select @mybostamp,codigo,taxa ,case when (@ebo31_bins <>0) then @ebo31_bins else @ebo32_bins end ,case when (@ebo31_bins <>0) then @bo31_bins else @bo32_bins end ,case when (@ebo31_bins <>0) then @ebo31_iva else @ebo32_iva end ,case when (@ebo31_bins <>0) then @bo31_iva else @bo32_iva end from taxasiva where codigo = 3 union all select @mybostamp,codigo,taxa ,case when (@ebo41_bins <>0) then @ebo41_bins else @ebo42_bins end ,case when (@ebo41_bins <>0) then @bo41_bins else @bo42_bins end ,case when (@ebo41_bins <>0) then @ebo41_iva else @ebo42_iva end ,case when (@ebo41_bins <>0) then @bo41_iva else @bo42_iva end from taxasiva where codigo = 4 union all select @mybostamp,codigo,taxa ,case when (@ebo51_bins <>0) then @ebo51_bins else @ebo52_bins end ,case when (@ebo51_bins <>0) then @bo51_bins else @bo52_bins end ,case when (@ebo51_bins <>0) then @ebo51_iva else @ebo52_iva end ,case when (@ebo51_bins <>0) then @bo51_iva else @bo52_iva end from taxasiva where codigo = 5 union all select @mybostamp,codigo,taxa ,case when (@ebo61_bins <>0) then @ebo61_bins else @ebo62_bins end ,case when (@ebo61_bins <>0) then @bo61_bins else @bo62_bins end ,case when (@ebo61_bins <>0) then @ebo61_iva else @ebo62_iva end ,case when (@ebo61_bins <>0) then @bo61_iva else @bo62_iva end from taxasiva where codigo = 6 union all select @mybostamp,codigo,taxa ,case when (@ebo71_bins <>0) then @ebo71_bins else @ebo72_bins end ,case when (@ebo71_bins <>0) then @bo71_bins else @bo72_bins end ,case when (@ebo71_bins <>0) then @ebo71_iva else @ebo72_iva end ,case when (@ebo71_bins <>0) then @bo71_iva else @bo72_iva end from taxasiva where codigo = 7 union all select @mybostamp,codigo,taxa ,case when (@ebo81_bins <>0) then @ebo81_bins else @ebo82_bins end ,case when (@ebo81_bins <>0) then @bo81_bins else @bo82_bins end ,case when (@ebo81_bins <>0) then @ebo81_iva else @ebo82_iva end ,case when (@ebo81_bins <>0) then @bo81_iva else @bo82_iva end from taxasiva where codigo = 8 union all select @mybostamp,codigo,taxa ,case when (@ebo91_bins <>0) then @ebo91_bins else @ebo92_bins end ,case when (@ebo91_bins <>0) then @bo91_bins else @bo92_bins end ,case when (@ebo91_bins <>0) then @ebo91_iva else @ebo92_iva end ,case when (@ebo91_bins <>0) then @bo91_iva else @bo92_iva end from taxasiva where codigo = 9 update bot set ebaseinc = totiva.ebaseinc, baseinc = totiva.baseinc, evalor = totiva.evalor, valor = totiva.valor, usrinis = @userinis, usrdata = convert (date,getdate()), usrhora = convert (time,getdate()) from @totaisiva totiva inner join bot on totiva.bostamp = bot.bostamp and totiva.codigo = bot.codigo insert into bot ( botstamp ,bostamp ,codigo ,taxa ,ebaseinc ,baseinc ,evalor ,valor ,ousrinis ,ousrdata ,ousrhora ,usrinis ,usrdata ,usrhora ) select ( left(@userinis,3) + 'tt' + left(newid(),5) + right(newid(),5) + left(newid(),5) + right(newid(),5)) stamp ,@mybostamp stampbo ,totiva.codigo ,totiva.taxa ,totiva.ebaseinc ,totiva.baseinc ,totiva.evalor ,totiva.valor ,@userinis ,convert (date,getdate()) ,convert (time,getdate()) ,@userinis ,convert (date,getdate()) ,convert (time,getdate()) from @totaisiva totiva left join bot on totiva.bostamp = bot.bostamp and totiva.codigo = bot.codigo where bot.botstamp is null -- atualiza os campo bi.series e bi.series2, caso tenha equipamentos update bi set series = s1, series2=s2 from bi inner join ( select distinct bistamp,ser.s1, ser.s2 from boma cross apply (select stuff ( ( select ',' + rtrim(serie) from boma myboma where myboma.bistamp = boma.bistamp order by serie for xml path('') ), 1, 1, '' ) s1 , stuff ( ( select ',' + rtrim(serie2) from boma myboma where myboma.bistamp = boma.bistamp order by serie for xml path('') ), 1, 1, '' ) s2 ) ser where boma.bostamp = @mybostamp ) myboma on bi.bistamp = myboma.bistamp where bi.bostamp = @mybostamp 
20240717@111652.7521 ljgcd784jucno2ngb97ufe6r5p Query : use flama_phc
20240717@111652.7525 ljgcd784jucno2ngb97ufe6r5p Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240717@111652.7541 ljgcd784jucno2ngb97ufe6r5p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='989';
20240717@111652.7556 ljgcd784jucno2ngb97ufe6r5p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='989';

20240717@183915.4348 aqr0m9j3l7je72jqkabalkis15 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='990';
20240717@183915.4377 aqr0m9j3l7je72jqkabalkis15 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='990';
20240717@183915.4389 aqr0m9j3l7je72jqkabalkis15 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='990';
20240717@183915.4404 aqr0m9j3l7je72jqkabalkis15 Query : use flama_phc
20240717@183915.4407 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183915.4449 aqr0m9j3l7je72jqkabalkis15 Query : use flama_phc
20240717@183915.4452 aqr0m9j3l7je72jqkabalkis15 Query : select no, estab,szadrsdesc from szadrs where u_coddest=2459
20240717@183915.4515 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240717@183915.4639 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='324.1816.00.1' and bi.lordem =1
20240717@183915.5962 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240717@183915.5975 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='324.1816.00.1' and bi.lordem =1
20240717@183915.5982 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240717@183915.5991 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='324.1816.00.1' and bi.lordem =1
20240717@183915.5998 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240717@183915.6007 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='324.1816.00.1' and bi.lordem =1
20240717@183915.6013 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240717@183915.6022 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='324.1816.00.1' and bi.lordem =1
20240717@183915.6028 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240717@183915.6037 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='324.1816.00.1' and bi.lordem =1
20240717@183915.6043 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240717@183915.6052 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='324.1816.00.1' and bi.lordem =1
20240717@183915.6059 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240717@183915.6068 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='324.1816.00.1' and bi.lordem =1
20240717@183915.6074 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240717@183915.6083 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='324.1816.00.1' and bi.lordem =1
20240717@183915.6089 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240717@183915.6098 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='324.1816.00.1' and bi.lordem =1
20240717@183915.6104 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240717@183915.6113 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='324.1816.00.1' and bi.lordem =1
20240717@183915.6119 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240717@183915.6128 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='324.1816.00.1' and bi.lordem =1
20240717@183915.6134 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240717@183915.6143 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='324.1816.00.1' and bi.lordem =1
20240717@183915.6149 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240717@183915.6158 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='324.1816.00.1' and bi.lordem =1
20240717@183915.6164 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240717@183915.6173 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='324.1816.00.1' and bi.lordem =1
20240717@183915.6180 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1871.00.1'
20240717@183915.6276 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='324.1871.00.1' and bi.lordem =2
20240717@183915.6533 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1871.00.1'
20240717@183915.6543 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='324.1871.00.1' and bi.lordem =2
20240717@183915.6550 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1871.00.1'
20240717@183915.6559 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='324.1871.00.1' and bi.lordem =2
20240717@183915.6566 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8253.00.1'
20240717@183915.6657 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='327.8253.00.1' and bi.lordem =3
20240717@183915.6921 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8253.00.1'
20240717@183915.6931 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='327.8253.00.1' and bi.lordem =3
20240717@183915.6937 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8253.00.1'
20240717@183915.6947 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='327.8253.00.1' and bi.lordem =3
20240717@183915.6953 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8261.00.1'
20240717@183915.7046 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='327.8261.00.1' and bi.lordem =4
20240717@183915.7331 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8261.00.1'
20240717@183915.7341 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='327.8261.00.1' and bi.lordem =4
20240717@183915.7347 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8261.00.1'
20240717@183915.7357 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='327.8261.00.1' and bi.lordem =4
20240717@183915.7364 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1832.00.2'
20240717@183915.7584 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='324.1832.00.2' and bi.lordem =5
20240717@183915.7851 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1832.00.2'
20240717@183915.7861 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='324.1832.00.2' and bi.lordem =5
20240717@183915.7867 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1832.00.2'
20240717@183915.7877 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='324.1832.00.2' and bi.lordem =5
20240717@183915.7883 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1833.00.2'
20240717@183915.7977 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='324.1833.00.2' and bi.lordem =6
20240717@183915.8235 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240717@183915.8326 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='324.1884.00.1' and bi.lordem =7
20240717@183915.8586 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240717@183915.8597 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404683 and bi.ref ='324.1884.00.1' and bi.lordem =7
20240717@183915.8605 aqr0m9j3l7je72jqkabalkis15 Query : use flama_phc
20240717@183915.8609 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183915.8794 aqr0m9j3l7je72jqkabalkis15 Query : use flama_phc
20240717@183915.8797 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183915.8849 aqr0m9j3l7je72jqkabalkis15 Query : use flama_phc
20240717@183915.8852 aqr0m9j3l7je72jqkabalkis15 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183915.8904 aqr0m9j3l7je72jqkabalkis15 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183915.9007 aqr0m9j3l7je72jqkabalkis15 Query : use flama_phc
20240717@183915.9010 aqr0m9j3l7je72jqkabalkis15 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183916.8400 aqr0m9j3l7je72jqkabalkis15 Query : use flama_phc
20240717@183916.8700 aqr0m9j3l7je72jqkabalkis15 Query : select szadrsstamp valor from szadrs where szadrsdesc='eldisser, s.a.'
20240717@183916.9900 aqr0m9j3l7je72jqkabalkis15 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='990';
20240717@183916.1130 aqr0m9j3l7je72jqkabalkis15 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='990';
20240717@183916.6530 38qgnaptmr3r2vboi2or3shac9 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183916.6660 38qgnaptmr3r2vboi2or3shac9 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183916.7050 38qgnaptmr3r2vboi2or3shac9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='991';
20240717@183916.7480 38qgnaptmr3r2vboi2or3shac9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='991';
20240717@183916.7670 38qgnaptmr3r2vboi2or3shac9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='991';
20240717@183916.7800 38qgnaptmr3r2vboi2or3shac9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='991';
20240717@183916.7950 38qgnaptmr3r2vboi2or3shac9 Query : use flama_phc
20240717@183916.7980 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183916.8110 38qgnaptmr3r2vboi2or3shac9 Query : use flama_phc
20240717@183916.8140 38qgnaptmr3r2vboi2or3shac9 Query : select no, estab,szadrsdesc from szadrs where u_coddest=2427
20240717@183916.8760 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4521.00.1'
20240717@183916.9690 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.4521.00.1' and bi.lordem =1
20240717@183916.1265 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4521.00.1'
20240717@183916.1277 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.4521.00.1' and bi.lordem =1
20240717@183916.1283 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4521.00.1'
20240717@183916.1293 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.4521.00.1' and bi.lordem =1
20240717@183916.1300 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1803.00.1'
20240717@183916.1396 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.1803.00.1' and bi.lordem =2
20240717@183916.1667 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1803.00.1'
20240717@183916.1678 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.1803.00.1' and bi.lordem =2
20240717@183916.1685 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1803.00.1'
20240717@183916.1694 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.1803.00.1' and bi.lordem =2
20240717@183916.1701 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1803.00.1'
20240717@183916.1711 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.1803.00.1' and bi.lordem =2
20240717@183916.1718 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1803.00.1'
20240717@183916.1727 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.1803.00.1' and bi.lordem =2
20240717@183916.1734 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1803.00.1'
20240717@183916.1744 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.1803.00.1' and bi.lordem =2
20240717@183916.1751 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1803.00.1'
20240717@183916.1760 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.1803.00.1' and bi.lordem =2
20240717@183916.1767 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1803.00.1'
20240717@183916.1776 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.1803.00.1' and bi.lordem =2
20240717@183916.1783 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1803.00.1'
20240717@183916.1792 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.1803.00.1' and bi.lordem =2
20240717@183916.1799 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.948.00.01'
20240717@183916.1903 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.948.00.01' and bi.lordem =3
20240717@183916.2188 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4421.00.1'
20240717@183916.2279 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.4421.00.1' and bi.lordem =4
20240717@183916.2616 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.5343.00.1'
20240717@183916.2724 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.5343.00.1' and bi.lordem =5
20240717@183916.3021 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1805.00.1'
20240717@183916.3120 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.1805.00.1' and bi.lordem =6
20240717@183916.3391 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1805.00.1'
20240717@183916.3402 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.1805.00.1' and bi.lordem =6
20240717@183916.3408 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1805.00.1'
20240717@183916.3418 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.1805.00.1' and bi.lordem =6
20240717@183916.3424 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.646.00.01'
20240717@183916.3521 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.646.00.01' and bi.lordem =7
20240717@183916.3902 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.646.00.01'
20240717@183916.3911 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.646.00.01' and bi.lordem =7
20240717@183916.3918 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.646.00.01'
20240717@183916.3928 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.646.00.01' and bi.lordem =7
20240717@183916.3957 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.646.00.01'
20240717@183916.3966 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.646.00.01' and bi.lordem =7
20240717@183916.3973 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.646.00.01'
20240717@183916.3983 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.646.00.01' and bi.lordem =7
20240717@183916.3989 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240717@183916.4016 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.1884.00.1' and bi.lordem =8
20240717@183916.4351 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240717@183916.4361 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.1884.00.1' and bi.lordem =8
20240717@183916.4368 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240717@183916.4378 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.1884.00.1' and bi.lordem =8
20240717@183916.4384 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240717@183916.4394 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.1884.00.1' and bi.lordem =8
20240717@183916.4401 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240717@183916.4410 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.1884.00.1' and bi.lordem =8
20240717@183916.4416 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.691.00.01'
20240717@183916.4514 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.691.00.01' and bi.lordem =9
20240717@183916.4999 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.691.00.01'
20240717@183916.5888 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.691.00.01' and bi.lordem =9
20240717@183916.6552 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.691.00.01'
20240717@183916.6766 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.691.00.01' and bi.lordem =9
20240717@183916.6774 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1684.00.1'
20240717@183916.6873 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.1684.00.1' and bi.lordem =10
20240717@183916.7145 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1684.00.1'
20240717@183916.7156 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.1684.00.1' and bi.lordem =10
20240717@183916.7162 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1684.00.1'
20240717@183916.7172 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.1684.00.1' and bi.lordem =10
20240717@183916.7179 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2066.00.1'
20240717@183916.7277 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.2066.00.1' and bi.lordem =11
20240717@183916.7548 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2232.00.1'
20240717@183916.7657 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.2232.00.1' and bi.lordem =12
20240717@183916.7985 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4585.00.1'
20240717@183916.8084 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.4585.00.1' and bi.lordem =13
20240717@183916.8506 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1293.00.1'
20240717@183916.8597 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='324.1293.00.1' and bi.lordem =14
20240717@183916.8854 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8253.00.1'
20240717@183916.8864 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='327.8253.00.1' and bi.lordem =15
20240717@183916.9419 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8253.00.1'
20240717@183916.9590 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='327.8253.00.1' and bi.lordem =15
20240717@183916.9598 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8253.00.1'
20240717@183916.9607 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404747 and bi.ref ='327.8253.00.1' and bi.lordem =15
20240717@183916.9615 38qgnaptmr3r2vboi2or3shac9 Query : use flama_phc
20240717@183916.9618 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183916.9631 38qgnaptmr3r2vboi2or3shac9 Query : use flama_phc
20240717@183916.9634 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183916.9644 38qgnaptmr3r2vboi2or3shac9 Query : use flama_phc
20240717@183916.9647 38qgnaptmr3r2vboi2or3shac9 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183916.9665 38qgnaptmr3r2vboi2or3shac9 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183916.9681 38qgnaptmr3r2vboi2or3shac9 Query : use flama_phc
20240717@183916.9684 38qgnaptmr3r2vboi2or3shac9 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183916.9702 38qgnaptmr3r2vboi2or3shac9 Query : use flama_phc
20240717@183916.9783 38qgnaptmr3r2vboi2or3shac9 Query : select szadrsstamp valor from szadrs where szadrsdesc='electrodomesticos divelsa,s.a'
20240717@183916.9931 38qgnaptmr3r2vboi2or3shac9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='991';
20240717@183917.1110 38qgnaptmr3r2vboi2or3shac9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='991';
20240717@183917.1291 bekpuccq8h1ipr2dbee800hhpv Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183917.1305 bekpuccq8h1ipr2dbee800hhpv Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183917.1323 bekpuccq8h1ipr2dbee800hhpv Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='992';
20240717@183917.1363 bekpuccq8h1ipr2dbee800hhpv Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='992';
20240717@183917.1379 bekpuccq8h1ipr2dbee800hhpv Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='992';
20240717@183917.1395 bekpuccq8h1ipr2dbee800hhpv Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='992';
20240717@183917.1409 bekpuccq8h1ipr2dbee800hhpv Query : use flama_phc
20240717@183917.1412 bekpuccq8h1ipr2dbee800hhpv Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183917.1426 bekpuccq8h1ipr2dbee800hhpv Query : use flama_phc
20240717@183917.1429 bekpuccq8h1ipr2dbee800hhpv Query : select no, estab,szadrsdesc from szadrs where u_coddest=635
20240717@183917.1495 bekpuccq8h1ipr2dbee800hhpv Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1578.00.1'
20240717@183917.1590 bekpuccq8h1ipr2dbee800hhpv Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404762 and bi.ref ='324.1578.00.1' and bi.lordem =1
20240717@183917.1865 bekpuccq8h1ipr2dbee800hhpv Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2031.00.1'
20240717@183917.1976 bekpuccq8h1ipr2dbee800hhpv Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404762 and bi.ref ='324.2031.00.1' and bi.lordem =2
20240717@183917.2392 bekpuccq8h1ipr2dbee800hhpv Query : use flama_phc
20240717@183917.2395 bekpuccq8h1ipr2dbee800hhpv Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183917.2410 bekpuccq8h1ipr2dbee800hhpv Query : use flama_phc
20240717@183917.2413 bekpuccq8h1ipr2dbee800hhpv Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183917.2425 bekpuccq8h1ipr2dbee800hhpv Query : use flama_phc
20240717@183917.2427 bekpuccq8h1ipr2dbee800hhpv Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183917.2447 bekpuccq8h1ipr2dbee800hhpv Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183917.2462 bekpuccq8h1ipr2dbee800hhpv Query : use flama_phc
20240717@183917.2465 bekpuccq8h1ipr2dbee800hhpv Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183917.2477 bekpuccq8h1ipr2dbee800hhpv Query : use flama_phc
20240717@183917.2479 bekpuccq8h1ipr2dbee800hhpv Query : select szadrsstamp valor from szadrs where szadrsdesc='irmaos peixoto, s.a.'
20240717@183917.2493 bekpuccq8h1ipr2dbee800hhpv Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='992';
20240717@183917.2509 bekpuccq8h1ipr2dbee800hhpv Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='992';
20240717@183917.3243 hsfvhlqekio9gdg6l948dba1k2 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183917.3314 hsfvhlqekio9gdg6l948dba1k2 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183917.3468 hsfvhlqekio9gdg6l948dba1k2 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='993';
20240717@183917.3608 hsfvhlqekio9gdg6l948dba1k2 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='993';
20240717@183917.3627 hsfvhlqekio9gdg6l948dba1k2 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='993';
20240717@183917.3811 hsfvhlqekio9gdg6l948dba1k2 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='993';
20240717@183917.3905 hsfvhlqekio9gdg6l948dba1k2 Query : use flama_phc
20240717@183917.3940 hsfvhlqekio9gdg6l948dba1k2 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183917.4032 hsfvhlqekio9gdg6l948dba1k2 Query : use flama_phc
20240717@183917.4036 hsfvhlqekio9gdg6l948dba1k2 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240717@183917.4124 hsfvhlqekio9gdg6l948dba1k2 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1416.00.1'
20240717@183917.4223 hsfvhlqekio9gdg6l948dba1k2 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404763 and bi.ref ='324.1416.00.1' and bi.lordem =1
20240717@183917.4501 hsfvhlqekio9gdg6l948dba1k2 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1416.00.1'
20240717@183917.4512 hsfvhlqekio9gdg6l948dba1k2 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404763 and bi.ref ='324.1416.00.1' and bi.lordem =1
20240717@183917.4520 hsfvhlqekio9gdg6l948dba1k2 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1416.00.1'
20240717@183917.4530 hsfvhlqekio9gdg6l948dba1k2 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404763 and bi.ref ='324.1416.00.1' and bi.lordem =1
20240717@183917.4538 hsfvhlqekio9gdg6l948dba1k2 Query : use flama_phc
20240717@183917.4541 hsfvhlqekio9gdg6l948dba1k2 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183917.4555 hsfvhlqekio9gdg6l948dba1k2 Query : use flama_phc
20240717@183917.4558 hsfvhlqekio9gdg6l948dba1k2 Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183917.4570 hsfvhlqekio9gdg6l948dba1k2 Query : use flama_phc
20240717@183917.4573 hsfvhlqekio9gdg6l948dba1k2 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183917.4593 hsfvhlqekio9gdg6l948dba1k2 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183917.4609 hsfvhlqekio9gdg6l948dba1k2 Query : use flama_phc
20240717@183917.4611 hsfvhlqekio9gdg6l948dba1k2 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183917.4623 hsfvhlqekio9gdg6l948dba1k2 Query : use flama_phc
20240717@183917.4626 hsfvhlqekio9gdg6l948dba1k2 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240717@183917.4639 hsfvhlqekio9gdg6l948dba1k2 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='993';
20240717@183917.4653 hsfvhlqekio9gdg6l948dba1k2 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='993';
20240717@183917.5202 ta1j1cfqqfl41mflaukfb58h6l Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183917.5215 ta1j1cfqqfl41mflaukfb58h6l Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183917.5233 ta1j1cfqqfl41mflaukfb58h6l Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='994';
20240717@183917.5273 ta1j1cfqqfl41mflaukfb58h6l Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='994';
20240717@183917.5299 ta1j1cfqqfl41mflaukfb58h6l Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='994';
20240717@183917.5312 ta1j1cfqqfl41mflaukfb58h6l Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='994';
20240717@183917.5328 ta1j1cfqqfl41mflaukfb58h6l Query : use flama_phc
20240717@183917.5330 ta1j1cfqqfl41mflaukfb58h6l Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183917.5345 ta1j1cfqqfl41mflaukfb58h6l Query : use flama_phc
20240717@183917.5348 ta1j1cfqqfl41mflaukfb58h6l Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240717@183917.5378 ta1j1cfqqfl41mflaukfb58h6l Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4980.00.1'
20240717@183917.5478 ta1j1cfqqfl41mflaukfb58h6l Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404764 and bi.ref ='324.4980.00.1' and bi.lordem =1
20240717@183917.5765 ta1j1cfqqfl41mflaukfb58h6l Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4980.00.1'
20240717@183917.5776 ta1j1cfqqfl41mflaukfb58h6l Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404764 and bi.ref ='324.4980.00.1' and bi.lordem =1
20240717@183917.5786 ta1j1cfqqfl41mflaukfb58h6l Query : use flama_phc
20240717@183917.5789 ta1j1cfqqfl41mflaukfb58h6l Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183917.5802 ta1j1cfqqfl41mflaukfb58h6l Query : use flama_phc
20240717@183917.5805 ta1j1cfqqfl41mflaukfb58h6l Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183917.5817 ta1j1cfqqfl41mflaukfb58h6l Query : use flama_phc
20240717@183917.5824 ta1j1cfqqfl41mflaukfb58h6l Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183917.5843 ta1j1cfqqfl41mflaukfb58h6l Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183917.5858 ta1j1cfqqfl41mflaukfb58h6l Query : use flama_phc
20240717@183917.5861 ta1j1cfqqfl41mflaukfb58h6l Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183917.5872 ta1j1cfqqfl41mflaukfb58h6l Query : use flama_phc
20240717@183917.5875 ta1j1cfqqfl41mflaukfb58h6l Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240717@183917.5887 ta1j1cfqqfl41mflaukfb58h6l Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='994';
20240717@183917.5901 ta1j1cfqqfl41mflaukfb58h6l Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='994';
20240717@183917.6404 7c26t14711rbuff5th93haicfd Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183917.6418 7c26t14711rbuff5th93haicfd Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183917.6436 7c26t14711rbuff5th93haicfd Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='995';
20240717@183917.6482 7c26t14711rbuff5th93haicfd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='995';
20240717@183917.6498 7c26t14711rbuff5th93haicfd Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='995';
20240717@183917.6512 7c26t14711rbuff5th93haicfd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='995';
20240717@183917.7627 7c26t14711rbuff5th93haicfd Query : use flama_phc
20240717@183917.7631 7c26t14711rbuff5th93haicfd Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183917.7649 7c26t14711rbuff5th93haicfd Query : use flama_phc
20240717@183917.7652 7c26t14711rbuff5th93haicfd Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240717@183917.7683 7c26t14711rbuff5th93haicfd Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.711.00.01'
20240717@183917.7937 7c26t14711rbuff5th93haicfd Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404765 and bi.ref ='324.711.00.01' and bi.lordem =1
20240717@183917.8368 7c26t14711rbuff5th93haicfd Query : use flama_phc
20240717@183917.8404 7c26t14711rbuff5th93haicfd Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183917.8598 7c26t14711rbuff5th93haicfd Query : use flama_phc
20240717@183917.8602 7c26t14711rbuff5th93haicfd Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183917.8613 7c26t14711rbuff5th93haicfd Query : use flama_phc
20240717@183917.8616 7c26t14711rbuff5th93haicfd Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183917.8635 7c26t14711rbuff5th93haicfd Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183917.8650 7c26t14711rbuff5th93haicfd Query : use flama_phc
20240717@183917.8653 7c26t14711rbuff5th93haicfd Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183917.8664 7c26t14711rbuff5th93haicfd Query : use flama_phc
20240717@183917.8666 7c26t14711rbuff5th93haicfd Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240717@183917.8678 7c26t14711rbuff5th93haicfd Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='995';
20240717@183917.8700 7c26t14711rbuff5th93haicfd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='995';
20240717@183917.9328 f2hu5ru4btkdoo0hqr7o675grf Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183917.9343 f2hu5ru4btkdoo0hqr7o675grf Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183917.9360 f2hu5ru4btkdoo0hqr7o675grf Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='996';
20240717@183917.9398 f2hu5ru4btkdoo0hqr7o675grf Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='996';
20240717@183917.9415 f2hu5ru4btkdoo0hqr7o675grf Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='996';
20240717@183917.9427 f2hu5ru4btkdoo0hqr7o675grf Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='996';
20240717@183917.9441 f2hu5ru4btkdoo0hqr7o675grf Query : use flama_phc
20240717@183917.9444 f2hu5ru4btkdoo0hqr7o675grf Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183917.9458 f2hu5ru4btkdoo0hqr7o675grf Query : use flama_phc
20240717@183917.9461 f2hu5ru4btkdoo0hqr7o675grf Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240717@183917.9489 f2hu5ru4btkdoo0hqr7o675grf Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4910.00.1'
20240717@183917.9583 f2hu5ru4btkdoo0hqr7o675grf Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404766 and bi.ref ='324.4910.00.1' and bi.lordem =1
20240717@183917.9859 f2hu5ru4btkdoo0hqr7o675grf Query : use flama_phc
20240717@183917.9862 f2hu5ru4btkdoo0hqr7o675grf Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183917.9876 f2hu5ru4btkdoo0hqr7o675grf Query : use flama_phc
20240717@183917.9879 f2hu5ru4btkdoo0hqr7o675grf Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183917.9890 f2hu5ru4btkdoo0hqr7o675grf Query : use flama_phc
20240717@183917.9893 f2hu5ru4btkdoo0hqr7o675grf Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183917.9913 f2hu5ru4btkdoo0hqr7o675grf Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183917.9929 f2hu5ru4btkdoo0hqr7o675grf Query : use flama_phc
20240717@183917.9932 f2hu5ru4btkdoo0hqr7o675grf Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183917.9943 f2hu5ru4btkdoo0hqr7o675grf Query : use flama_phc
20240717@183917.9946 f2hu5ru4btkdoo0hqr7o675grf Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240717@183917.9958 f2hu5ru4btkdoo0hqr7o675grf Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='996';
20240717@183917.9972 f2hu5ru4btkdoo0hqr7o675grf Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='996';
20240717@183918.4290 dbr68nbt73hef9g5moqki4pps1 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183918.4420 dbr68nbt73hef9g5moqki4pps1 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183918.4610 dbr68nbt73hef9g5moqki4pps1 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='997';
20240717@183918.5000 dbr68nbt73hef9g5moqki4pps1 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='997';
20240717@183918.5180 dbr68nbt73hef9g5moqki4pps1 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='997';
20240717@183918.5310 dbr68nbt73hef9g5moqki4pps1 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='997';
20240717@183918.5450 dbr68nbt73hef9g5moqki4pps1 Query : use flama_phc
20240717@183918.5480 dbr68nbt73hef9g5moqki4pps1 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183918.5640 dbr68nbt73hef9g5moqki4pps1 Query : use flama_phc
20240717@183918.5670 dbr68nbt73hef9g5moqki4pps1 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240717@183918.5990 dbr68nbt73hef9g5moqki4pps1 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4966.00.1'
20240717@183918.7010 dbr68nbt73hef9g5moqki4pps1 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404767 and bi.ref ='324.4966.00.1' and bi.lordem =1
20240717@183918.9630 dbr68nbt73hef9g5moqki4pps1 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4966.00.1'
20240717@183918.9750 dbr68nbt73hef9g5moqki4pps1 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404767 and bi.ref ='324.4966.00.1' and bi.lordem =1
20240717@183918.9820 dbr68nbt73hef9g5moqki4pps1 Query : use flama_phc
20240717@183918.9850 dbr68nbt73hef9g5moqki4pps1 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183918.9990 dbr68nbt73hef9g5moqki4pps1 Query : use flama_phc
20240717@183918.1001 dbr68nbt73hef9g5moqki4pps1 Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183918.1012 dbr68nbt73hef9g5moqki4pps1 Query : use flama_phc
20240717@183918.1015 dbr68nbt73hef9g5moqki4pps1 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183918.1034 dbr68nbt73hef9g5moqki4pps1 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183918.1050 dbr68nbt73hef9g5moqki4pps1 Query : use flama_phc
20240717@183918.1053 dbr68nbt73hef9g5moqki4pps1 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183918.1064 dbr68nbt73hef9g5moqki4pps1 Query : use flama_phc
20240717@183918.1067 dbr68nbt73hef9g5moqki4pps1 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240717@183918.1078 dbr68nbt73hef9g5moqki4pps1 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='997';
20240717@183918.1093 dbr68nbt73hef9g5moqki4pps1 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='997';
20240717@183918.2717 hmm5jq2pu03m7pfo1fs0uf1vja Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183918.2732 hmm5jq2pu03m7pfo1fs0uf1vja Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183918.2751 hmm5jq2pu03m7pfo1fs0uf1vja Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='998';
20240717@183918.2789 hmm5jq2pu03m7pfo1fs0uf1vja Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='998';
20240717@183918.2806 hmm5jq2pu03m7pfo1fs0uf1vja Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='998';
20240717@183918.2818 hmm5jq2pu03m7pfo1fs0uf1vja Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='998';
20240717@183918.2833 hmm5jq2pu03m7pfo1fs0uf1vja Query : use flama_phc
20240717@183918.2836 hmm5jq2pu03m7pfo1fs0uf1vja Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183918.2851 hmm5jq2pu03m7pfo1fs0uf1vja Query : use flama_phc
20240717@183918.2854 hmm5jq2pu03m7pfo1fs0uf1vja Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240717@183918.2883 hmm5jq2pu03m7pfo1fs0uf1vja Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.682.00.01'
20240717@183918.2983 hmm5jq2pu03m7pfo1fs0uf1vja Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404768 and bi.ref ='324.682.00.01' and bi.lordem =1
20240717@183918.3241 hmm5jq2pu03m7pfo1fs0uf1vja Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.682.00.01'
20240717@183918.3251 hmm5jq2pu03m7pfo1fs0uf1vja Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404768 and bi.ref ='324.682.00.01' and bi.lordem =1
20240717@183918.3258 hmm5jq2pu03m7pfo1fs0uf1vja Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.682.00.01'
20240717@183918.3268 hmm5jq2pu03m7pfo1fs0uf1vja Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404768 and bi.ref ='324.682.00.01' and bi.lordem =1
20240717@183918.3275 hmm5jq2pu03m7pfo1fs0uf1vja Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.682.00.01'
20240717@183918.3285 hmm5jq2pu03m7pfo1fs0uf1vja Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404768 and bi.ref ='324.682.00.01' and bi.lordem =1
20240717@183918.3292 hmm5jq2pu03m7pfo1fs0uf1vja Query : use flama_phc
20240717@183918.3295 hmm5jq2pu03m7pfo1fs0uf1vja Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183918.3307 hmm5jq2pu03m7pfo1fs0uf1vja Query : use flama_phc
20240717@183918.3310 hmm5jq2pu03m7pfo1fs0uf1vja Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183918.3320 hmm5jq2pu03m7pfo1fs0uf1vja Query : use flama_phc
20240717@183918.3323 hmm5jq2pu03m7pfo1fs0uf1vja Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183918.3342 hmm5jq2pu03m7pfo1fs0uf1vja Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183918.3356 hmm5jq2pu03m7pfo1fs0uf1vja Query : use flama_phc
20240717@183918.3359 hmm5jq2pu03m7pfo1fs0uf1vja Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183918.3370 hmm5jq2pu03m7pfo1fs0uf1vja Query : use flama_phc
20240717@183918.3373 hmm5jq2pu03m7pfo1fs0uf1vja Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240717@183918.3384 hmm5jq2pu03m7pfo1fs0uf1vja Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='998';
20240717@183918.3398 hmm5jq2pu03m7pfo1fs0uf1vja Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='998';
20240717@183918.3866 sq3p2ijgtnvu8oj3naic8rkslv Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183918.3879 sq3p2ijgtnvu8oj3naic8rkslv Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183918.3899 sq3p2ijgtnvu8oj3naic8rkslv Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='999';
20240717@183918.3940 sq3p2ijgtnvu8oj3naic8rkslv Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='999';
20240717@183918.3956 sq3p2ijgtnvu8oj3naic8rkslv Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='999';
20240717@183918.3968 sq3p2ijgtnvu8oj3naic8rkslv Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='999';
20240717@183918.3982 sq3p2ijgtnvu8oj3naic8rkslv Query : use flama_phc
20240717@183918.3985 sq3p2ijgtnvu8oj3naic8rkslv Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183918.4000 sq3p2ijgtnvu8oj3naic8rkslv Query : use flama_phc
20240717@183918.4002 sq3p2ijgtnvu8oj3naic8rkslv Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240717@183918.4091 sq3p2ijgtnvu8oj3naic8rkslv Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.727.00.01'
20240717@183918.4216 sq3p2ijgtnvu8oj3naic8rkslv Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404769 and bi.ref ='324.727.00.01' and bi.lordem =1
20240717@183918.4475 sq3p2ijgtnvu8oj3naic8rkslv Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.727.00.01'
20240717@183918.4485 sq3p2ijgtnvu8oj3naic8rkslv Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404769 and bi.ref ='324.727.00.01' and bi.lordem =1
20240717@183918.4492 sq3p2ijgtnvu8oj3naic8rkslv Query : use flama_phc
20240717@183918.4495 sq3p2ijgtnvu8oj3naic8rkslv Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183918.4507 sq3p2ijgtnvu8oj3naic8rkslv Query : use flama_phc
20240717@183918.4510 sq3p2ijgtnvu8oj3naic8rkslv Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183918.4521 sq3p2ijgtnvu8oj3naic8rkslv Query : use flama_phc
20240717@183918.4542 sq3p2ijgtnvu8oj3naic8rkslv Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183918.4561 sq3p2ijgtnvu8oj3naic8rkslv Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183918.4578 sq3p2ijgtnvu8oj3naic8rkslv Query : use flama_phc
20240717@183918.4580 sq3p2ijgtnvu8oj3naic8rkslv Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183918.4591 sq3p2ijgtnvu8oj3naic8rkslv Query : use flama_phc
20240717@183918.4593 sq3p2ijgtnvu8oj3naic8rkslv Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240717@183918.4604 sq3p2ijgtnvu8oj3naic8rkslv Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='999';
20240717@183918.4618 sq3p2ijgtnvu8oj3naic8rkslv Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='999';
20240717@183918.5089 na19eelm2imfg27fq8s1bslpsv Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183918.5102 na19eelm2imfg27fq8s1bslpsv Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183918.5121 na19eelm2imfg27fq8s1bslpsv Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1000';
20240717@183918.5162 na19eelm2imfg27fq8s1bslpsv Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1000';
20240717@183918.5178 na19eelm2imfg27fq8s1bslpsv Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1000';
20240717@183918.5190 na19eelm2imfg27fq8s1bslpsv Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1000';
20240717@183918.5205 na19eelm2imfg27fq8s1bslpsv Query : use flama_phc
20240717@183918.5207 na19eelm2imfg27fq8s1bslpsv Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183918.5222 na19eelm2imfg27fq8s1bslpsv Query : use flama_phc
20240717@183918.5225 na19eelm2imfg27fq8s1bslpsv Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240717@183918.5257 na19eelm2imfg27fq8s1bslpsv Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.966.00.01'
20240717@183918.5361 na19eelm2imfg27fq8s1bslpsv Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404770 and bi.ref ='324.966.00.01' and bi.lordem =1
20240717@183918.5637 na19eelm2imfg27fq8s1bslpsv Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.966.00.01'
20240717@183918.5647 na19eelm2imfg27fq8s1bslpsv Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404770 and bi.ref ='324.966.00.01' and bi.lordem =1
20240717@183918.5653 na19eelm2imfg27fq8s1bslpsv Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.966.00.01'
20240717@183918.5664 na19eelm2imfg27fq8s1bslpsv Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404770 and bi.ref ='324.966.00.01' and bi.lordem =1
20240717@183918.5671 na19eelm2imfg27fq8s1bslpsv Query : use flama_phc
20240717@183918.5674 na19eelm2imfg27fq8s1bslpsv Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183918.5687 na19eelm2imfg27fq8s1bslpsv Query : use flama_phc
20240717@183918.5689 na19eelm2imfg27fq8s1bslpsv Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183918.5700 na19eelm2imfg27fq8s1bslpsv Query : use flama_phc
20240717@183918.5702 na19eelm2imfg27fq8s1bslpsv Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183918.5722 na19eelm2imfg27fq8s1bslpsv Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183918.5737 na19eelm2imfg27fq8s1bslpsv Query : use flama_phc
20240717@183918.5740 na19eelm2imfg27fq8s1bslpsv Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183918.5750 na19eelm2imfg27fq8s1bslpsv Query : use flama_phc
20240717@183918.5752 na19eelm2imfg27fq8s1bslpsv Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240717@183918.5763 na19eelm2imfg27fq8s1bslpsv Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1000';
20240717@183918.5777 na19eelm2imfg27fq8s1bslpsv Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1000';
20240717@183918.6234 dsdp7ui3ran9jnd1f6meamad5v Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183918.6246 dsdp7ui3ran9jnd1f6meamad5v Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183918.6265 dsdp7ui3ran9jnd1f6meamad5v Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1001';
20240717@183918.6304 dsdp7ui3ran9jnd1f6meamad5v Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1001';
20240717@183918.6321 dsdp7ui3ran9jnd1f6meamad5v Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1001';
20240717@183918.6333 dsdp7ui3ran9jnd1f6meamad5v Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1001';
20240717@183918.6348 dsdp7ui3ran9jnd1f6meamad5v Query : use flama_phc
20240717@183918.6351 dsdp7ui3ran9jnd1f6meamad5v Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183918.6365 dsdp7ui3ran9jnd1f6meamad5v Query : use flama_phc
20240717@183918.6368 dsdp7ui3ran9jnd1f6meamad5v Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240717@183918.6398 dsdp7ui3ran9jnd1f6meamad5v Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4965.00.1'
20240717@183918.6497 dsdp7ui3ran9jnd1f6meamad5v Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404771 and bi.ref ='324.4965.00.1' and bi.lordem =1
20240717@183918.7857 dsdp7ui3ran9jnd1f6meamad5v Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4965.00.1'
20240717@183918.7872 dsdp7ui3ran9jnd1f6meamad5v Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404771 and bi.ref ='324.4965.00.1' and bi.lordem =1
20240717@183918.8002 dsdp7ui3ran9jnd1f6meamad5v Query : use flama_phc
20240717@183918.8025 dsdp7ui3ran9jnd1f6meamad5v Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183918.8037 dsdp7ui3ran9jnd1f6meamad5v Query : use flama_phc
20240717@183918.8040 dsdp7ui3ran9jnd1f6meamad5v Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183918.8050 dsdp7ui3ran9jnd1f6meamad5v Query : use flama_phc
20240717@183918.8053 dsdp7ui3ran9jnd1f6meamad5v Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183918.8071 dsdp7ui3ran9jnd1f6meamad5v Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183918.8085 dsdp7ui3ran9jnd1f6meamad5v Query : use flama_phc
20240717@183918.8088 dsdp7ui3ran9jnd1f6meamad5v Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183918.8098 dsdp7ui3ran9jnd1f6meamad5v Query : use flama_phc
20240717@183918.8100 dsdp7ui3ran9jnd1f6meamad5v Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240717@183918.8110 dsdp7ui3ran9jnd1f6meamad5v Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1001';
20240717@183918.8124 dsdp7ui3ran9jnd1f6meamad5v Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1001';
20240717@183918.8619 e53j58vthiamue7p787vlqu4j3 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183918.8632 e53j58vthiamue7p787vlqu4j3 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183918.8650 e53j58vthiamue7p787vlqu4j3 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1002';
20240717@183918.8704 e53j58vthiamue7p787vlqu4j3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1002';
20240717@183918.8720 e53j58vthiamue7p787vlqu4j3 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1002';
20240717@183918.8782 e53j58vthiamue7p787vlqu4j3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1002';
20240717@183918.8798 e53j58vthiamue7p787vlqu4j3 Query : use flama_phc
20240717@183918.8805 e53j58vthiamue7p787vlqu4j3 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183918.8835 e53j58vthiamue7p787vlqu4j3 Query : use flama_phc
20240717@183918.8838 e53j58vthiamue7p787vlqu4j3 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240717@183918.8869 e53j58vthiamue7p787vlqu4j3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.692.00.01'
20240717@183918.9336 e53j58vthiamue7p787vlqu4j3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404772 and bi.ref ='324.692.00.01' and bi.lordem =1
20240717@183918.9829 e53j58vthiamue7p787vlqu4j3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.692.00.01'
20240717@183918.9841 e53j58vthiamue7p787vlqu4j3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404772 and bi.ref ='324.692.00.01' and bi.lordem =1
20240717@183918.9848 e53j58vthiamue7p787vlqu4j3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.692.00.01'
20240717@183918.9859 e53j58vthiamue7p787vlqu4j3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404772 and bi.ref ='324.692.00.01' and bi.lordem =1
20240717@183918.9867 e53j58vthiamue7p787vlqu4j3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.692.00.01'
20240717@183918.9884 e53j58vthiamue7p787vlqu4j3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404772 and bi.ref ='324.692.00.01' and bi.lordem =1
20240717@183918.9891 e53j58vthiamue7p787vlqu4j3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.692.00.01'
20240717@183918.9901 e53j58vthiamue7p787vlqu4j3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404772 and bi.ref ='324.692.00.01' and bi.lordem =1
20240717@183918.9907 e53j58vthiamue7p787vlqu4j3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.692.00.01'
20240717@183918.9917 e53j58vthiamue7p787vlqu4j3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404772 and bi.ref ='324.692.00.01' and bi.lordem =1
20240717@183918.9924 e53j58vthiamue7p787vlqu4j3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.692.00.01'
20240717@183918.9934 e53j58vthiamue7p787vlqu4j3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404772 and bi.ref ='324.692.00.01' and bi.lordem =1
20240717@183918.9941 e53j58vthiamue7p787vlqu4j3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.692.00.01'
20240717@183918.9950 e53j58vthiamue7p787vlqu4j3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404772 and bi.ref ='324.692.00.01' and bi.lordem =1
20240717@183918.9957 e53j58vthiamue7p787vlqu4j3 Query : use flama_phc
20240717@183918.9960 e53j58vthiamue7p787vlqu4j3 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183918.9973 e53j58vthiamue7p787vlqu4j3 Query : use flama_phc
20240717@183918.9977 e53j58vthiamue7p787vlqu4j3 Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183918.9989 e53j58vthiamue7p787vlqu4j3 Query : use flama_phc
20240717@183918.9992 e53j58vthiamue7p787vlqu4j3 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183919.1200 e53j58vthiamue7p787vlqu4j3 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183919.3000 e53j58vthiamue7p787vlqu4j3 Query : use flama_phc
20240717@183919.3300 e53j58vthiamue7p787vlqu4j3 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183919.4600 e53j58vthiamue7p787vlqu4j3 Query : use flama_phc
20240717@183919.4900 e53j58vthiamue7p787vlqu4j3 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240717@183919.6500 e53j58vthiamue7p787vlqu4j3 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1002';
20240717@183919.8000 e53j58vthiamue7p787vlqu4j3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1002';
20240717@183919.5760 0omakuf3odt89iscuo13q41d2d Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183919.5900 0omakuf3odt89iscuo13q41d2d Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183919.6090 0omakuf3odt89iscuo13q41d2d Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1003';
20240717@183919.6470 0omakuf3odt89iscuo13q41d2d Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1003';
20240717@183919.6680 0omakuf3odt89iscuo13q41d2d Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1003';
20240717@183919.6810 0omakuf3odt89iscuo13q41d2d Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1003';
20240717@183919.6940 0omakuf3odt89iscuo13q41d2d Query : use flama_phc
20240717@183919.6980 0omakuf3odt89iscuo13q41d2d Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183919.7130 0omakuf3odt89iscuo13q41d2d Query : use flama_phc
20240717@183919.7160 0omakuf3odt89iscuo13q41d2d Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240717@183919.7450 0omakuf3odt89iscuo13q41d2d Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4743.00.1'
20240717@183919.8450 0omakuf3odt89iscuo13q41d2d Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404773 and bi.ref ='324.4743.00.1' and bi.lordem =1
20240717@183919.1096 0omakuf3odt89iscuo13q41d2d Query : use flama_phc
20240717@183919.1099 0omakuf3odt89iscuo13q41d2d Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183919.1112 0omakuf3odt89iscuo13q41d2d Query : use flama_phc
20240717@183919.1115 0omakuf3odt89iscuo13q41d2d Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183919.1125 0omakuf3odt89iscuo13q41d2d Query : use flama_phc
20240717@183919.1128 0omakuf3odt89iscuo13q41d2d Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183919.1145 0omakuf3odt89iscuo13q41d2d Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183919.1160 0omakuf3odt89iscuo13q41d2d Query : use flama_phc
20240717@183919.1163 0omakuf3odt89iscuo13q41d2d Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183919.1173 0omakuf3odt89iscuo13q41d2d Query : use flama_phc
20240717@183919.1176 0omakuf3odt89iscuo13q41d2d Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240717@183919.1185 0omakuf3odt89iscuo13q41d2d Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1003';
20240717@183919.1199 0omakuf3odt89iscuo13q41d2d Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1003';
20240717@183919.1701 ucs8ri1l0jvrog0otimqk0slhg Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183919.1714 ucs8ri1l0jvrog0otimqk0slhg Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183919.1733 ucs8ri1l0jvrog0otimqk0slhg Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1004';
20240717@183919.1783 ucs8ri1l0jvrog0otimqk0slhg Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1004';
20240717@183919.1800 ucs8ri1l0jvrog0otimqk0slhg Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1004';
20240717@183919.1813 ucs8ri1l0jvrog0otimqk0slhg Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1004';
20240717@183919.1829 ucs8ri1l0jvrog0otimqk0slhg Query : use flama_phc
20240717@183919.1831 ucs8ri1l0jvrog0otimqk0slhg Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183919.1845 ucs8ri1l0jvrog0otimqk0slhg Query : use flama_phc
20240717@183919.1847 ucs8ri1l0jvrog0otimqk0slhg Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240717@183919.1876 ucs8ri1l0jvrog0otimqk0slhg Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4723.00.2'
20240717@183919.1973 ucs8ri1l0jvrog0otimqk0slhg Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404774 and bi.ref ='324.4723.00.2' and bi.lordem =1
20240717@183919.2225 ucs8ri1l0jvrog0otimqk0slhg Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4723.00.2'
20240717@183919.2235 ucs8ri1l0jvrog0otimqk0slhg Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404774 and bi.ref ='324.4723.00.2' and bi.lordem =1
20240717@183919.2242 ucs8ri1l0jvrog0otimqk0slhg Query : use flama_phc
20240717@183919.2245 ucs8ri1l0jvrog0otimqk0slhg Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183919.2257 ucs8ri1l0jvrog0otimqk0slhg Query : use flama_phc
20240717@183919.2260 ucs8ri1l0jvrog0otimqk0slhg Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183919.2271 ucs8ri1l0jvrog0otimqk0slhg Query : use flama_phc
20240717@183919.2273 ucs8ri1l0jvrog0otimqk0slhg Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183919.2290 ucs8ri1l0jvrog0otimqk0slhg Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183919.2305 ucs8ri1l0jvrog0otimqk0slhg Query : use flama_phc
20240717@183919.2307 ucs8ri1l0jvrog0otimqk0slhg Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183919.2317 ucs8ri1l0jvrog0otimqk0slhg Query : use flama_phc
20240717@183919.2320 ucs8ri1l0jvrog0otimqk0slhg Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240717@183919.2330 ucs8ri1l0jvrog0otimqk0slhg Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1004';
20240717@183919.2344 ucs8ri1l0jvrog0otimqk0slhg Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1004';
20240717@183919.2818 9lcs738bg8fqvf9dm9bvoglire Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183919.2830 9lcs738bg8fqvf9dm9bvoglire Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183919.2848 9lcs738bg8fqvf9dm9bvoglire Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1005';
20240717@183919.2889 9lcs738bg8fqvf9dm9bvoglire Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1005';
20240717@183919.2905 9lcs738bg8fqvf9dm9bvoglire Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1005';
20240717@183919.2917 9lcs738bg8fqvf9dm9bvoglire Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1005';
20240717@183919.2931 9lcs738bg8fqvf9dm9bvoglire Query : use flama_phc
20240717@183919.2934 9lcs738bg8fqvf9dm9bvoglire Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183919.2947 9lcs738bg8fqvf9dm9bvoglire Query : use flama_phc
20240717@183919.2950 9lcs738bg8fqvf9dm9bvoglire Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240717@183919.2979 9lcs738bg8fqvf9dm9bvoglire Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1405.00.1'
20240717@183919.3074 9lcs738bg8fqvf9dm9bvoglire Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404776 and bi.ref ='324.1405.00.1' and bi.lordem =1
20240717@183919.3349 9lcs738bg8fqvf9dm9bvoglire Query : use flama_phc
20240717@183919.3352 9lcs738bg8fqvf9dm9bvoglire Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183919.3365 9lcs738bg8fqvf9dm9bvoglire Query : use flama_phc
20240717@183919.3368 9lcs738bg8fqvf9dm9bvoglire Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183919.3378 9lcs738bg8fqvf9dm9bvoglire Query : use flama_phc
20240717@183919.3381 9lcs738bg8fqvf9dm9bvoglire Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183919.3399 9lcs738bg8fqvf9dm9bvoglire Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183919.3414 9lcs738bg8fqvf9dm9bvoglire Query : use flama_phc
20240717@183919.3417 9lcs738bg8fqvf9dm9bvoglire Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183919.3428 9lcs738bg8fqvf9dm9bvoglire Query : use flama_phc
20240717@183919.3431 9lcs738bg8fqvf9dm9bvoglire Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240717@183919.3441 9lcs738bg8fqvf9dm9bvoglire Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1005';
20240717@183919.3456 9lcs738bg8fqvf9dm9bvoglire Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1005';
20240717@183919.3934 20emlfne3o1pn9tc7s45a3m01s Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183919.3947 20emlfne3o1pn9tc7s45a3m01s Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183919.3967 20emlfne3o1pn9tc7s45a3m01s Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1006';
20240717@183919.4013 20emlfne3o1pn9tc7s45a3m01s Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1006';
20240717@183919.4029 20emlfne3o1pn9tc7s45a3m01s Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1006';
20240717@183919.4050 20emlfne3o1pn9tc7s45a3m01s Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1006';
20240717@183919.4077 20emlfne3o1pn9tc7s45a3m01s Query : use flama_phc
20240717@183919.4080 20emlfne3o1pn9tc7s45a3m01s Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183919.4094 20emlfne3o1pn9tc7s45a3m01s Query : use flama_phc
20240717@183919.4097 20emlfne3o1pn9tc7s45a3m01s Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240717@183919.4126 20emlfne3o1pn9tc7s45a3m01s Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.5347.00.1'
20240717@183919.4230 20emlfne3o1pn9tc7s45a3m01s Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404777 and bi.ref ='324.5347.00.1' and bi.lordem =1
20240717@183919.4497 20emlfne3o1pn9tc7s45a3m01s Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.5347.00.1'
20240717@183919.4508 20emlfne3o1pn9tc7s45a3m01s Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404777 and bi.ref ='324.5347.00.1' and bi.lordem =1
20240717@183919.4515 20emlfne3o1pn9tc7s45a3m01s Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.5342.00.1'
20240717@183919.4678 20emlfne3o1pn9tc7s45a3m01s Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404777 and bi.ref ='324.5342.00.1' and bi.lordem =2
20240717@183919.4940 20emlfne3o1pn9tc7s45a3m01s Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.5342.00.1'
20240717@183919.4951 20emlfne3o1pn9tc7s45a3m01s Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404777 and bi.ref ='324.5342.00.1' and bi.lordem =2
20240717@183919.4958 20emlfne3o1pn9tc7s45a3m01s Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '325.16901.001'
20240717@183919.6169 20emlfne3o1pn9tc7s45a3m01s Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404777 and bi.ref ='325.16901.001' and bi.lordem =3
20240717@183919.6431 20emlfne3o1pn9tc7s45a3m01s Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.5500.00.1'
20240717@183919.6521 20emlfne3o1pn9tc7s45a3m01s Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404777 and bi.ref ='324.5500.00.1' and bi.lordem =4
20240717@183919.6845 20emlfne3o1pn9tc7s45a3m01s Query : use flama_phc
20240717@183919.6848 20emlfne3o1pn9tc7s45a3m01s Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183919.6861 20emlfne3o1pn9tc7s45a3m01s Query : use flama_phc
20240717@183919.6864 20emlfne3o1pn9tc7s45a3m01s Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183919.6874 20emlfne3o1pn9tc7s45a3m01s Query : use flama_phc
20240717@183919.6877 20emlfne3o1pn9tc7s45a3m01s Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183919.6894 20emlfne3o1pn9tc7s45a3m01s Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183919.6909 20emlfne3o1pn9tc7s45a3m01s Query : use flama_phc
20240717@183919.6912 20emlfne3o1pn9tc7s45a3m01s Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183919.6922 20emlfne3o1pn9tc7s45a3m01s Query : use flama_phc
20240717@183919.6924 20emlfne3o1pn9tc7s45a3m01s Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240717@183919.6934 20emlfne3o1pn9tc7s45a3m01s Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1006';
20240717@183919.6950 20emlfne3o1pn9tc7s45a3m01s Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1006';
20240717@183919.7445 5k0hg8ukugb9851ksckop8ddmd Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183919.7460 5k0hg8ukugb9851ksckop8ddmd Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183919.7478 5k0hg8ukugb9851ksckop8ddmd Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1007';
20240717@183919.7519 5k0hg8ukugb9851ksckop8ddmd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1007';
20240717@183919.7535 5k0hg8ukugb9851ksckop8ddmd Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1007';
20240717@183919.7547 5k0hg8ukugb9851ksckop8ddmd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1007';
20240717@183919.7564 5k0hg8ukugb9851ksckop8ddmd Query : use flama_phc
20240717@183919.7566 5k0hg8ukugb9851ksckop8ddmd Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183919.7581 5k0hg8ukugb9851ksckop8ddmd Query : use flama_phc
20240717@183919.7584 5k0hg8ukugb9851ksckop8ddmd Query : select no, estab,szadrsdesc from szadrs where u_coddest=170
20240717@183919.7648 5k0hg8ukugb9851ksckop8ddmd Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.646.00.01'
20240717@183919.7658 5k0hg8ukugb9851ksckop8ddmd Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404778 and bi.ref ='324.646.00.01' and bi.lordem =1
20240717@183919.7921 5k0hg8ukugb9851ksckop8ddmd Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.646.00.01'
20240717@183919.7931 5k0hg8ukugb9851ksckop8ddmd Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404778 and bi.ref ='324.646.00.01' and bi.lordem =1
20240717@183919.7938 5k0hg8ukugb9851ksckop8ddmd Query : use flama_phc
20240717@183919.7940 5k0hg8ukugb9851ksckop8ddmd Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183919.7955 5k0hg8ukugb9851ksckop8ddmd Query : use flama_phc
20240717@183919.7958 5k0hg8ukugb9851ksckop8ddmd Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183919.7968 5k0hg8ukugb9851ksckop8ddmd Query : use flama_phc
20240717@183919.7971 5k0hg8ukugb9851ksckop8ddmd Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183919.7990 5k0hg8ukugb9851ksckop8ddmd Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183919.8005 5k0hg8ukugb9851ksckop8ddmd Query : use flama_phc
20240717@183919.8008 5k0hg8ukugb9851ksckop8ddmd Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183919.8019 5k0hg8ukugb9851ksckop8ddmd Query : use flama_phc
20240717@183919.8021 5k0hg8ukugb9851ksckop8ddmd Query : select szadrsstamp valor from szadrs where szadrsdesc='magalhÃes & vinha, lda.'
20240717@183919.8033 5k0hg8ukugb9851ksckop8ddmd Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1007';
20240717@183919.8047 5k0hg8ukugb9851ksckop8ddmd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1007';
20240717@183919.8499 neva6vg7oppqhaqaua5rhlnn73 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183919.8514 neva6vg7oppqhaqaua5rhlnn73 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183919.8596 neva6vg7oppqhaqaua5rhlnn73 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1008';
20240717@183919.8641 neva6vg7oppqhaqaua5rhlnn73 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1008';
20240717@183919.8657 neva6vg7oppqhaqaua5rhlnn73 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1008';
20240717@183919.8670 neva6vg7oppqhaqaua5rhlnn73 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1008';
20240717@183919.8684 neva6vg7oppqhaqaua5rhlnn73 Query : use flama_phc
20240717@183919.8686 neva6vg7oppqhaqaua5rhlnn73 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183919.8701 neva6vg7oppqhaqaua5rhlnn73 Query : use flama_phc
20240717@183919.8704 neva6vg7oppqhaqaua5rhlnn73 Query : select no, estab,szadrsdesc from szadrs where u_coddest=2881
20240717@183919.8766 neva6vg7oppqhaqaua5rhlnn73 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.421.00.04'
20240717@183919.8863 neva6vg7oppqhaqaua5rhlnn73 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404779 and bi.ref ='304.421.00.04' and bi.lordem =1
20240717@183919.9130 neva6vg7oppqhaqaua5rhlnn73 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.691.00.01'
20240717@183919.9140 neva6vg7oppqhaqaua5rhlnn73 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404779 and bi.ref ='324.691.00.01' and bi.lordem =2
20240717@183919.9446 neva6vg7oppqhaqaua5rhlnn73 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.692.00.01'
20240717@183919.9457 neva6vg7oppqhaqaua5rhlnn73 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404779 and bi.ref ='324.692.00.01' and bi.lordem =3
20240717@183919.9737 neva6vg7oppqhaqaua5rhlnn73 Query : use flama_phc
20240717@183919.9740 neva6vg7oppqhaqaua5rhlnn73 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183919.9752 neva6vg7oppqhaqaua5rhlnn73 Query : use flama_phc
20240717@183919.9755 neva6vg7oppqhaqaua5rhlnn73 Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183919.9766 neva6vg7oppqhaqaua5rhlnn73 Query : use flama_phc
20240717@183919.9769 neva6vg7oppqhaqaua5rhlnn73 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183919.9787 neva6vg7oppqhaqaua5rhlnn73 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183919.9801 neva6vg7oppqhaqaua5rhlnn73 Query : use flama_phc
20240717@183919.9804 neva6vg7oppqhaqaua5rhlnn73 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183919.9815 neva6vg7oppqhaqaua5rhlnn73 Query : use flama_phc
20240717@183919.9817 neva6vg7oppqhaqaua5rhlnn73 Query : select szadrsstamp valor from szadrs where szadrsdesc='carlos manuel garcia joao'
20240717@183919.9828 neva6vg7oppqhaqaua5rhlnn73 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1008';
20240717@183919.9844 neva6vg7oppqhaqaua5rhlnn73 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1008';
20240717@183920.3390 vkt0j0cf84m8t2su7rd8a2piqd Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183920.3530 vkt0j0cf84m8t2su7rd8a2piqd Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183920.3710 vkt0j0cf84m8t2su7rd8a2piqd Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1009';
20240717@183920.4090 vkt0j0cf84m8t2su7rd8a2piqd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1009';
20240717@183920.4260 vkt0j0cf84m8t2su7rd8a2piqd Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1009';
20240717@183920.4380 vkt0j0cf84m8t2su7rd8a2piqd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1009';
20240717@183920.4510 vkt0j0cf84m8t2su7rd8a2piqd Query : use flama_phc
20240717@183920.4540 vkt0j0cf84m8t2su7rd8a2piqd Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183920.4680 vkt0j0cf84m8t2su7rd8a2piqd Query : use flama_phc
20240717@183920.4710 vkt0j0cf84m8t2su7rd8a2piqd Query : select no, estab,szadrsdesc from szadrs where u_coddest=6562
20240717@183920.5330 vkt0j0cf84m8t2su7rd8a2piqd Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240717@183920.5430 vkt0j0cf84m8t2su7rd8a2piqd Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404780 and bi.ref ='324.1816.00.1' and bi.lordem =1
20240717@183920.8090 vkt0j0cf84m8t2su7rd8a2piqd Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.5501.00.1'
20240717@183920.9310 vkt0j0cf84m8t2su7rd8a2piqd Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404780 and bi.ref ='324.5501.00.1' and bi.lordem =2
20240717@183920.2297 vkt0j0cf84m8t2su7rd8a2piqd Query : use flama_phc
20240717@183920.2303 vkt0j0cf84m8t2su7rd8a2piqd Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183920.2317 vkt0j0cf84m8t2su7rd8a2piqd Query : use flama_phc
20240717@183920.2320 vkt0j0cf84m8t2su7rd8a2piqd Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183920.2330 vkt0j0cf84m8t2su7rd8a2piqd Query : use flama_phc
20240717@183920.2332 vkt0j0cf84m8t2su7rd8a2piqd Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183920.2350 vkt0j0cf84m8t2su7rd8a2piqd Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183920.2366 vkt0j0cf84m8t2su7rd8a2piqd Query : use flama_phc
20240717@183920.2368 vkt0j0cf84m8t2su7rd8a2piqd Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183920.2379 vkt0j0cf84m8t2su7rd8a2piqd Query : use flama_phc
20240717@183920.2381 vkt0j0cf84m8t2su7rd8a2piqd Query : select szadrsstamp valor from szadrs where szadrsdesc='manuel farinha antonio - 2'
20240717@183920.2393 vkt0j0cf84m8t2su7rd8a2piqd Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1009';
20240717@183920.2407 vkt0j0cf84m8t2su7rd8a2piqd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1009';
20240717@183920.2930 au3skrgaodj2nhn9mgnehc0kp3 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183920.2943 au3skrgaodj2nhn9mgnehc0kp3 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183920.2962 au3skrgaodj2nhn9mgnehc0kp3 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1010';
20240717@183920.3002 au3skrgaodj2nhn9mgnehc0kp3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1010';
20240717@183920.3018 au3skrgaodj2nhn9mgnehc0kp3 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1010';
20240717@183920.3032 au3skrgaodj2nhn9mgnehc0kp3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1010';
20240717@183920.3046 au3skrgaodj2nhn9mgnehc0kp3 Query : use flama_phc
20240717@183920.3049 au3skrgaodj2nhn9mgnehc0kp3 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183920.3064 au3skrgaodj2nhn9mgnehc0kp3 Query : use flama_phc
20240717@183920.3067 au3skrgaodj2nhn9mgnehc0kp3 Query : select no, estab,szadrsdesc from szadrs where u_coddest=805
20240717@183920.3178 au3skrgaodj2nhn9mgnehc0kp3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.4320.00.1'
20240717@183920.3278 au3skrgaodj2nhn9mgnehc0kp3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404781 and bi.ref ='304.4320.00.1' and bi.lordem =1
20240717@183920.3563 au3skrgaodj2nhn9mgnehc0kp3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2232.00.1'
20240717@183920.3574 au3skrgaodj2nhn9mgnehc0kp3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404781 and bi.ref ='324.2232.00.1' and bi.lordem =2
20240717@183920.3827 au3skrgaodj2nhn9mgnehc0kp3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1706.00.1'
20240717@183920.3923 au3skrgaodj2nhn9mgnehc0kp3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404781 and bi.ref ='324.1706.00.1' and bi.lordem =3
20240717@183920.4232 au3skrgaodj2nhn9mgnehc0kp3 Query : use flama_phc
20240717@183920.4235 au3skrgaodj2nhn9mgnehc0kp3 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183920.4248 au3skrgaodj2nhn9mgnehc0kp3 Query : use flama_phc
20240717@183920.4251 au3skrgaodj2nhn9mgnehc0kp3 Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183920.4261 au3skrgaodj2nhn9mgnehc0kp3 Query : use flama_phc
20240717@183920.4264 au3skrgaodj2nhn9mgnehc0kp3 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183920.4282 au3skrgaodj2nhn9mgnehc0kp3 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183920.4298 au3skrgaodj2nhn9mgnehc0kp3 Query : use flama_phc
20240717@183920.4301 au3skrgaodj2nhn9mgnehc0kp3 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183920.4312 au3skrgaodj2nhn9mgnehc0kp3 Query : use flama_phc
20240717@183920.4314 au3skrgaodj2nhn9mgnehc0kp3 Query : select szadrsstamp valor from szadrs where szadrsdesc='acacio domingues afonso'
20240717@183920.4326 au3skrgaodj2nhn9mgnehc0kp3 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1010';
20240717@183920.4341 au3skrgaodj2nhn9mgnehc0kp3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1010';
20240717@183920.4858 17pt2nhl7nn8949n5dnu0ktvnd Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183920.4884 17pt2nhl7nn8949n5dnu0ktvnd Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183920.4902 17pt2nhl7nn8949n5dnu0ktvnd Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1011';
20240717@183920.4941 17pt2nhl7nn8949n5dnu0ktvnd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1011';
20240717@183920.4958 17pt2nhl7nn8949n5dnu0ktvnd Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1011';
20240717@183920.4970 17pt2nhl7nn8949n5dnu0ktvnd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1011';
20240717@183920.4984 17pt2nhl7nn8949n5dnu0ktvnd Query : use flama_phc
20240717@183920.4987 17pt2nhl7nn8949n5dnu0ktvnd Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183920.5001 17pt2nhl7nn8949n5dnu0ktvnd Query : use flama_phc
20240717@183920.5004 17pt2nhl7nn8949n5dnu0ktvnd Query : select no, estab,szadrsdesc from szadrs where u_coddest=848
20240717@183920.5064 17pt2nhl7nn8949n5dnu0ktvnd Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4521.00.1'
20240717@183920.5075 17pt2nhl7nn8949n5dnu0ktvnd Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404782 and bi.ref ='324.4521.00.1' and bi.lordem =1
20240717@183920.5342 17pt2nhl7nn8949n5dnu0ktvnd Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1706.00.1'
20240717@183920.5353 17pt2nhl7nn8949n5dnu0ktvnd Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404782 and bi.ref ='324.1706.00.1' and bi.lordem =2
20240717@183920.5607 17pt2nhl7nn8949n5dnu0ktvnd Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1879.00.1'
20240717@183920.5697 17pt2nhl7nn8949n5dnu0ktvnd Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404782 and bi.ref ='324.1879.00.1' and bi.lordem =3
20240717@183920.6012 17pt2nhl7nn8949n5dnu0ktvnd Query : use flama_phc
20240717@183920.6015 17pt2nhl7nn8949n5dnu0ktvnd Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183920.6028 17pt2nhl7nn8949n5dnu0ktvnd Query : use flama_phc
20240717@183920.6031 17pt2nhl7nn8949n5dnu0ktvnd Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183920.6042 17pt2nhl7nn8949n5dnu0ktvnd Query : use flama_phc
20240717@183920.6044 17pt2nhl7nn8949n5dnu0ktvnd Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183920.6063 17pt2nhl7nn8949n5dnu0ktvnd Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183920.6078 17pt2nhl7nn8949n5dnu0ktvnd Query : use flama_phc
20240717@183920.6081 17pt2nhl7nn8949n5dnu0ktvnd Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183920.6092 17pt2nhl7nn8949n5dnu0ktvnd Query : use flama_phc
20240717@183920.6094 17pt2nhl7nn8949n5dnu0ktvnd Query : select szadrsstamp valor from szadrs where szadrsdesc='gil farinha garcia'
20240717@183920.6107 17pt2nhl7nn8949n5dnu0ktvnd Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1011';
20240717@183920.6121 17pt2nhl7nn8949n5dnu0ktvnd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1011';
20240717@183920.6603 c87t4vgs6p419m80j2fkatsk68 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183920.6617 c87t4vgs6p419m80j2fkatsk68 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183920.6635 c87t4vgs6p419m80j2fkatsk68 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1012';
20240717@183920.6674 c87t4vgs6p419m80j2fkatsk68 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1012';
20240717@183920.6690 c87t4vgs6p419m80j2fkatsk68 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1012';
20240717@183920.6703 c87t4vgs6p419m80j2fkatsk68 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1012';
20240717@183920.6717 c87t4vgs6p419m80j2fkatsk68 Query : use flama_phc
20240717@183920.6720 c87t4vgs6p419m80j2fkatsk68 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183920.6734 c87t4vgs6p419m80j2fkatsk68 Query : use flama_phc
20240717@183920.6737 c87t4vgs6p419m80j2fkatsk68 Query : select no, estab,szadrsdesc from szadrs where u_coddest=2945
20240717@183920.6798 c87t4vgs6p419m80j2fkatsk68 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1837.00.1'
20240717@183920.6895 c87t4vgs6p419m80j2fkatsk68 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404788 and bi.ref ='324.1837.00.1' and bi.lordem =1
20240717@183920.7169 c87t4vgs6p419m80j2fkatsk68 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240717@183920.7180 c87t4vgs6p419m80j2fkatsk68 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404788 and bi.ref ='324.1816.00.1' and bi.lordem =2
20240717@183920.7429 c87t4vgs6p419m80j2fkatsk68 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '328.9902.00.1'
20240717@183920.7524 c87t4vgs6p419m80j2fkatsk68 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404788 and bi.ref ='328.9902.00.1' and bi.lordem =3
20240717@183920.7792 c87t4vgs6p419m80j2fkatsk68 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1667.00.1'
20240717@183920.7888 c87t4vgs6p419m80j2fkatsk68 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404788 and bi.ref ='324.1667.00.1' and bi.lordem =4
20240717@183920.8244 c87t4vgs6p419m80j2fkatsk68 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1667.00.1'
20240717@183920.8257 c87t4vgs6p419m80j2fkatsk68 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404788 and bi.ref ='324.1667.00.1' and bi.lordem =5
20240717@183920.8719 c87t4vgs6p419m80j2fkatsk68 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1646.00.1'
20240717@183920.8842 c87t4vgs6p419m80j2fkatsk68 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404788 and bi.ref ='324.1646.00.1' and bi.lordem =6
20240717@183920.9242 c87t4vgs6p419m80j2fkatsk68 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1676.00.1'
20240717@183920.9462 c87t4vgs6p419m80j2fkatsk68 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404788 and bi.ref ='324.1676.00.1' and bi.lordem =7
20240717@183920.9925 c87t4vgs6p419m80j2fkatsk68 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.698.00.01'
20240717@183921.5100 c87t4vgs6p419m80j2fkatsk68 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404788 and bi.ref ='324.698.00.01' and bi.lordem =8
20240717@183921.4610 c87t4vgs6p419m80j2fkatsk68 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.698.00.01'
20240717@183921.4730 c87t4vgs6p419m80j2fkatsk68 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404788 and bi.ref ='324.698.00.01' and bi.lordem =9
20240717@183921.1135 c87t4vgs6p419m80j2fkatsk68 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1837.00.1'
20240717@183921.1148 c87t4vgs6p419m80j2fkatsk68 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404788 and bi.ref ='324.1837.00.1' and bi.lordem =10
20240717@183921.1500 c87t4vgs6p419m80j2fkatsk68 Query : use flama_phc
20240717@183921.1503 c87t4vgs6p419m80j2fkatsk68 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183921.1517 c87t4vgs6p419m80j2fkatsk68 Query : use flama_phc
20240717@183921.1519 c87t4vgs6p419m80j2fkatsk68 Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183921.1531 c87t4vgs6p419m80j2fkatsk68 Query : use flama_phc
20240717@183921.1534 c87t4vgs6p419m80j2fkatsk68 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183921.1552 c87t4vgs6p419m80j2fkatsk68 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183921.1568 c87t4vgs6p419m80j2fkatsk68 Query : use flama_phc
20240717@183921.1571 c87t4vgs6p419m80j2fkatsk68 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183921.1581 c87t4vgs6p419m80j2fkatsk68 Query : use flama_phc
20240717@183921.1584 c87t4vgs6p419m80j2fkatsk68 Query : select szadrsstamp valor from szadrs where szadrsdesc='casa freitas moveis e electrodomesticos, lda-entrega'
20240717@183921.1597 c87t4vgs6p419m80j2fkatsk68 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1012';
20240717@183921.1612 c87t4vgs6p419m80j2fkatsk68 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1012';
20240717@183921.2117 vhq0pvsufm2cnd1vrh93cka5fl Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183921.2130 vhq0pvsufm2cnd1vrh93cka5fl Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183921.2148 vhq0pvsufm2cnd1vrh93cka5fl Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1013';
20240717@183921.2188 vhq0pvsufm2cnd1vrh93cka5fl Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1013';
20240717@183921.2204 vhq0pvsufm2cnd1vrh93cka5fl Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1013';
20240717@183921.2218 vhq0pvsufm2cnd1vrh93cka5fl Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1013';
20240717@183921.2232 vhq0pvsufm2cnd1vrh93cka5fl Query : use flama_phc
20240717@183921.2235 vhq0pvsufm2cnd1vrh93cka5fl Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183921.2251 vhq0pvsufm2cnd1vrh93cka5fl Query : use flama_phc
20240717@183921.2254 vhq0pvsufm2cnd1vrh93cka5fl Query : select no, estab,szadrsdesc from szadrs where u_coddest=4743
20240717@183921.2320 vhq0pvsufm2cnd1vrh93cka5fl Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8261.00.1'
20240717@183921.2332 vhq0pvsufm2cnd1vrh93cka5fl Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404789 and bi.ref ='327.8261.00.1' and bi.lordem =1
20240717@183921.2614 vhq0pvsufm2cnd1vrh93cka5fl Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8261.00.1'
20240717@183921.2625 vhq0pvsufm2cnd1vrh93cka5fl Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404789 and bi.ref ='327.8261.00.1' and bi.lordem =1
20240717@183921.2632 vhq0pvsufm2cnd1vrh93cka5fl Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8261.00.1'
20240717@183921.2644 vhq0pvsufm2cnd1vrh93cka5fl Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404789 and bi.ref ='327.8261.00.1' and bi.lordem =1
20240717@183921.2650 vhq0pvsufm2cnd1vrh93cka5fl Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8261.00.1'
20240717@183921.2660 vhq0pvsufm2cnd1vrh93cka5fl Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404789 and bi.ref ='327.8261.00.1' and bi.lordem =1
20240717@183921.2668 vhq0pvsufm2cnd1vrh93cka5fl Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8261.00.1'
20240717@183921.2681 vhq0pvsufm2cnd1vrh93cka5fl Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404789 and bi.ref ='327.8261.00.1' and bi.lordem =1
20240717@183921.2689 vhq0pvsufm2cnd1vrh93cka5fl Query : use flama_phc
20240717@183921.2692 vhq0pvsufm2cnd1vrh93cka5fl Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183921.2705 vhq0pvsufm2cnd1vrh93cka5fl Query : use flama_phc
20240717@183921.2708 vhq0pvsufm2cnd1vrh93cka5fl Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183921.2720 vhq0pvsufm2cnd1vrh93cka5fl Query : use flama_phc
20240717@183921.2722 vhq0pvsufm2cnd1vrh93cka5fl Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183921.2742 vhq0pvsufm2cnd1vrh93cka5fl Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183921.2757 vhq0pvsufm2cnd1vrh93cka5fl Query : use flama_phc
20240717@183921.2760 vhq0pvsufm2cnd1vrh93cka5fl Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183921.2772 vhq0pvsufm2cnd1vrh93cka5fl Query : use flama_phc
20240717@183921.2775 vhq0pvsufm2cnd1vrh93cka5fl Query : select szadrsstamp valor from szadrs where szadrsdesc='101597 - auchan retail portugal , sa'
20240717@183921.2787 vhq0pvsufm2cnd1vrh93cka5fl Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1013';
20240717@183921.2802 vhq0pvsufm2cnd1vrh93cka5fl Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1013';
20240717@183921.3350 fmus0hivvrec40dcjhiv1tq4lr Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183921.3366 fmus0hivvrec40dcjhiv1tq4lr Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183921.3384 fmus0hivvrec40dcjhiv1tq4lr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1014';
20240717@183921.3423 fmus0hivvrec40dcjhiv1tq4lr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1014';
20240717@183921.3439 fmus0hivvrec40dcjhiv1tq4lr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1014';
20240717@183921.3451 fmus0hivvrec40dcjhiv1tq4lr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1014';
20240717@183921.3467 fmus0hivvrec40dcjhiv1tq4lr Query : use flama_phc
20240717@183921.3470 fmus0hivvrec40dcjhiv1tq4lr Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183921.3484 fmus0hivvrec40dcjhiv1tq4lr Query : use flama_phc
20240717@183921.3487 fmus0hivvrec40dcjhiv1tq4lr Query : select no, estab,szadrsdesc from szadrs where u_coddest=4790
20240717@183921.4648 fmus0hivvrec40dcjhiv1tq4lr Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4902.00.1'
20240717@183921.4746 fmus0hivvrec40dcjhiv1tq4lr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404790 and bi.ref ='324.4902.00.1' and bi.lordem =1
20240717@183921.5006 fmus0hivvrec40dcjhiv1tq4lr Query : use flama_phc
20240717@183921.5009 fmus0hivvrec40dcjhiv1tq4lr Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183921.5024 fmus0hivvrec40dcjhiv1tq4lr Query : use flama_phc
20240717@183921.5027 fmus0hivvrec40dcjhiv1tq4lr Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183921.5037 fmus0hivvrec40dcjhiv1tq4lr Query : use flama_phc
20240717@183921.5040 fmus0hivvrec40dcjhiv1tq4lr Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183921.5058 fmus0hivvrec40dcjhiv1tq4lr Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183921.5073 fmus0hivvrec40dcjhiv1tq4lr Query : use flama_phc
20240717@183921.5076 fmus0hivvrec40dcjhiv1tq4lr Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183921.5086 fmus0hivvrec40dcjhiv1tq4lr Query : use flama_phc
20240717@183921.5089 fmus0hivvrec40dcjhiv1tq4lr Query : select szadrsstamp valor from szadrs where szadrsdesc='199510 - cdnogueira regedoura'
20240717@183921.5100 fmus0hivvrec40dcjhiv1tq4lr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1014';
20240717@183921.5115 fmus0hivvrec40dcjhiv1tq4lr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1014';
20240717@183921.5594 tbebmqhnhglr3h57uovqncvv2p Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183921.5608 tbebmqhnhglr3h57uovqncvv2p Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183921.5633 tbebmqhnhglr3h57uovqncvv2p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1015';
20240717@183921.5682 tbebmqhnhglr3h57uovqncvv2p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1015';
20240717@183921.5699 tbebmqhnhglr3h57uovqncvv2p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1015';
20240717@183921.5712 tbebmqhnhglr3h57uovqncvv2p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1015';
20240717@183921.5726 tbebmqhnhglr3h57uovqncvv2p Query : use flama_phc
20240717@183921.5729 tbebmqhnhglr3h57uovqncvv2p Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183921.5744 tbebmqhnhglr3h57uovqncvv2p Query : use flama_phc
20240717@183921.5747 tbebmqhnhglr3h57uovqncvv2p Query : select no, estab,szadrsdesc from szadrs where u_coddest=4790
20240717@183921.5778 tbebmqhnhglr3h57uovqncvv2p Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.421.00.04'
20240717@183921.5790 tbebmqhnhglr3h57uovqncvv2p Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404791 and bi.ref ='304.421.00.04' and bi.lordem =1
20240717@183921.6866 tbebmqhnhglr3h57uovqncvv2p Query : use flama_phc
20240717@183921.6989 tbebmqhnhglr3h57uovqncvv2p Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183921.7153 tbebmqhnhglr3h57uovqncvv2p Query : use flama_phc
20240717@183921.7157 tbebmqhnhglr3h57uovqncvv2p Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183921.7168 tbebmqhnhglr3h57uovqncvv2p Query : use flama_phc
20240717@183921.7170 tbebmqhnhglr3h57uovqncvv2p Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183921.7189 tbebmqhnhglr3h57uovqncvv2p Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183921.7204 tbebmqhnhglr3h57uovqncvv2p Query : use flama_phc
20240717@183921.7207 tbebmqhnhglr3h57uovqncvv2p Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183921.7218 tbebmqhnhglr3h57uovqncvv2p Query : use flama_phc
20240717@183921.7221 tbebmqhnhglr3h57uovqncvv2p Query : select szadrsstamp valor from szadrs where szadrsdesc='199510 - cdnogueira regedoura'
20240717@183921.7232 tbebmqhnhglr3h57uovqncvv2p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1015';
20240717@183921.7247 tbebmqhnhglr3h57uovqncvv2p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1015';
20240717@183921.7768 p1r8sb0s0tofm2pahkvifpiop1 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183921.7781 p1r8sb0s0tofm2pahkvifpiop1 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183921.7800 p1r8sb0s0tofm2pahkvifpiop1 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1016';
20240717@183921.7840 p1r8sb0s0tofm2pahkvifpiop1 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1016';
20240717@183921.7857 p1r8sb0s0tofm2pahkvifpiop1 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1016';
20240717@183921.7933 p1r8sb0s0tofm2pahkvifpiop1 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1016';
20240717@183921.7951 p1r8sb0s0tofm2pahkvifpiop1 Query : use flama_phc
20240717@183921.7954 p1r8sb0s0tofm2pahkvifpiop1 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183921.7990 p1r8sb0s0tofm2pahkvifpiop1 Query : use flama_phc
20240717@183921.7992 p1r8sb0s0tofm2pahkvifpiop1 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4790
20240717@183921.8021 p1r8sb0s0tofm2pahkvifpiop1 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2066.00.1'
20240717@183921.8032 p1r8sb0s0tofm2pahkvifpiop1 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404792 and bi.ref ='324.2066.00.1' and bi.lordem =1
20240717@183921.8350 p1r8sb0s0tofm2pahkvifpiop1 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.969.00.01'
20240717@183921.8449 p1r8sb0s0tofm2pahkvifpiop1 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404792 and bi.ref ='324.969.00.01' and bi.lordem =2
20240717@183921.8727 p1r8sb0s0tofm2pahkvifpiop1 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.969.00.01'
20240717@183921.8739 p1r8sb0s0tofm2pahkvifpiop1 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404792 and bi.ref ='324.969.00.01' and bi.lordem =2
20240717@183921.8746 p1r8sb0s0tofm2pahkvifpiop1 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4980.00.1'
20240717@183921.8756 p1r8sb0s0tofm2pahkvifpiop1 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404792 and bi.ref ='324.4980.00.1' and bi.lordem =3
20240717@183921.9095 p1r8sb0s0tofm2pahkvifpiop1 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4585.00.1'
20240717@183921.9106 p1r8sb0s0tofm2pahkvifpiop1 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404792 and bi.ref ='324.4585.00.1' and bi.lordem =4
20240717@183921.9462 p1r8sb0s0tofm2pahkvifpiop1 Query : use flama_phc
20240717@183921.9504 p1r8sb0s0tofm2pahkvifpiop1 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183921.9571 p1r8sb0s0tofm2pahkvifpiop1 Query : use flama_phc
20240717@183921.9575 p1r8sb0s0tofm2pahkvifpiop1 Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183921.9585 p1r8sb0s0tofm2pahkvifpiop1 Query : use flama_phc
20240717@183921.9589 p1r8sb0s0tofm2pahkvifpiop1 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183921.9611 p1r8sb0s0tofm2pahkvifpiop1 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183921.9626 p1r8sb0s0tofm2pahkvifpiop1 Query : use flama_phc
20240717@183921.9629 p1r8sb0s0tofm2pahkvifpiop1 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183921.9640 p1r8sb0s0tofm2pahkvifpiop1 Query : use flama_phc
20240717@183921.9643 p1r8sb0s0tofm2pahkvifpiop1 Query : select szadrsstamp valor from szadrs where szadrsdesc='199510 - cdnogueira regedoura'
20240717@183921.9654 p1r8sb0s0tofm2pahkvifpiop1 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1016';
20240717@183921.9669 p1r8sb0s0tofm2pahkvifpiop1 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1016';
20240717@183922.1470 uk3jh3e77alf9a0hrgta463a2d Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183922.1600 uk3jh3e77alf9a0hrgta463a2d Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183922.1780 uk3jh3e77alf9a0hrgta463a2d Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1017';
20240717@183922.2180 uk3jh3e77alf9a0hrgta463a2d Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1017';
20240717@183922.2340 uk3jh3e77alf9a0hrgta463a2d Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1017';
20240717@183922.2470 uk3jh3e77alf9a0hrgta463a2d Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1017';
20240717@183922.2610 uk3jh3e77alf9a0hrgta463a2d Query : use flama_phc
20240717@183922.2650 uk3jh3e77alf9a0hrgta463a2d Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183922.2790 uk3jh3e77alf9a0hrgta463a2d Query : use flama_phc
20240717@183922.2820 uk3jh3e77alf9a0hrgta463a2d Query : select no, estab,szadrsdesc from szadrs where u_coddest=6737
20240717@183922.3460 uk3jh3e77alf9a0hrgta463a2d Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '328.9326.00.1'
20240717@183922.4420 uk3jh3e77alf9a0hrgta463a2d Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404793 and bi.ref ='328.9326.00.1' and bi.lordem =1
20240717@183922.7180 uk3jh3e77alf9a0hrgta463a2d Query : use flama_phc
20240717@183922.7210 uk3jh3e77alf9a0hrgta463a2d Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183922.7340 uk3jh3e77alf9a0hrgta463a2d Query : use flama_phc
20240717@183922.7370 uk3jh3e77alf9a0hrgta463a2d Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183922.7470 uk3jh3e77alf9a0hrgta463a2d Query : use flama_phc
20240717@183922.7500 uk3jh3e77alf9a0hrgta463a2d Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183922.7700 uk3jh3e77alf9a0hrgta463a2d Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183922.7850 uk3jh3e77alf9a0hrgta463a2d Query : use flama_phc
20240717@183922.7880 uk3jh3e77alf9a0hrgta463a2d Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183922.7980 uk3jh3e77alf9a0hrgta463a2d Query : use flama_phc
20240717@183922.8010 uk3jh3e77alf9a0hrgta463a2d Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-plaza large formats rainha'
20240717@183922.8140 uk3jh3e77alf9a0hrgta463a2d Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1017';
20240717@183922.8280 uk3jh3e77alf9a0hrgta463a2d Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1017';
20240717@183922.1318 hf7isbc3tj8su97ki8od2krngq Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240717@183922.1330 hf7isbc3tj8su97ki8od2krngq Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240717@183922.1348 hf7isbc3tj8su97ki8od2krngq Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1018';
20240717@183922.1390 hf7isbc3tj8su97ki8od2krngq Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1018';
20240717@183922.1408 hf7isbc3tj8su97ki8od2krngq Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1018';
20240717@183922.1421 hf7isbc3tj8su97ki8od2krngq Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1018';
20240717@183922.1437 hf7isbc3tj8su97ki8od2krngq Query : use flama_phc
20240717@183922.1440 hf7isbc3tj8su97ki8od2krngq Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240717@183922.1454 hf7isbc3tj8su97ki8od2krngq Query : use flama_phc
20240717@183922.1457 hf7isbc3tj8su97ki8od2krngq Query : select no, estab,szadrsdesc from szadrs where u_coddest=2227
20240717@183922.1522 hf7isbc3tj8su97ki8od2krngq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.4320.00.1'
20240717@183922.1532 hf7isbc3tj8su97ki8od2krngq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404794 and bi.ref ='304.4320.00.1' and bi.lordem =1
20240717@183922.3062 hf7isbc3tj8su97ki8od2krngq Query : use flama_phc
20240717@183922.3098 hf7isbc3tj8su97ki8od2krngq Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240717@183922.3113 hf7isbc3tj8su97ki8od2krngq Query : use flama_phc
20240717@183922.3119 hf7isbc3tj8su97ki8od2krngq Query : select top 1 1 valor from td where td.ndoc = 39
20240717@183922.3131 hf7isbc3tj8su97ki8od2krngq Query : use flama_phc
20240717@183922.3134 hf7isbc3tj8su97ki8od2krngq Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240717@183922.3156 hf7isbc3tj8su97ki8od2krngq Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240717@183922.3174 hf7isbc3tj8su97ki8od2krngq Query : use flama_phc
20240717@183922.3179 hf7isbc3tj8su97ki8od2krngq Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240717@183922.3190 hf7isbc3tj8su97ki8od2krngq Query : use flama_phc
20240717@183922.3193 hf7isbc3tj8su97ki8od2krngq Query : select szadrsstamp valor from szadrs where szadrsdesc='el corte inglês - alcochete'
20240717@183922.3207 hf7isbc3tj8su97ki8od2krngq Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1018';
20240717@183922.3223 hf7isbc3tj8su97ki8od2krngq Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1018';

20240718@080522.4322 2ctnvmi6aq5mt3n9v1irr0ia61 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1019';
20240718@080522.4352 2ctnvmi6aq5mt3n9v1irr0ia61 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1019';
20240718@080522.4381 2ctnvmi6aq5mt3n9v1irr0ia61 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1019';

20240718@114124.1774 1ghbqrhebc030hiqh0ccgpg1vl Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1020';
20240718@114124.1805 1ghbqrhebc030hiqh0ccgpg1vl Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1020';
20240718@114124.1819 1ghbqrhebc030hiqh0ccgpg1vl Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1020';
20240718@114124.1835 1ghbqrhebc030hiqh0ccgpg1vl Query : use flama_phc
20240718@114124.1839 1ghbqrhebc030hiqh0ccgpg1vl Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240718@114124.1895 1ghbqrhebc030hiqh0ccgpg1vl Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1805.00.1'
20240718@114124.1972 1ghbqrhebc030hiqh0ccgpg1vl Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =002 and bo.boano =2024 and bo.obrano = 2400290 and bi.ref ='324.1805.00.1' and bi.lordem =20000
20240718@114124.2261 1ghbqrhebc030hiqh0ccgpg1vl Query : select bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.obranome ,bi.bostamp ,bo.moeda ,bi.vumoeda ,isnull(bi.vumoeda/nullif(bi.edebito,0),1) cambio ,bi.tabiva from bi inner join bo on bi.bostamp = bo.bostamp where bi.bistamp = 'cps24031443798,575000002 ' 
20240718@114124.2532 1ghbqrhebc030hiqh0ccgpg1vl Query : use flama_phc
20240718@114124.2536 1ghbqrhebc030hiqh0ccgpg1vl Query : select top 1 1 valor from ts where ts.ndos = 61
20240718@114124.2607 1ghbqrhebc030hiqh0ccgpg1vl Query : use flama_phc
20240718@114124.2611 1ghbqrhebc030hiqh0ccgpg1vl Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240718@114124.2675 1ghbqrhebc030hiqh0ccgpg1vl Query : select top 1 assinadoc issigned ,ts.stocks ,ts.bdempresas origin ,case when (cmstocks between 1 and 50 or cm2stocks between 1 and 50 ) then 1 else 0 end entrada ,case when cmstocks>50 or (cm2stocks>50 and trfa =1) then 1 else 0 end saida ,stneg validatestock ,tiposaft ,veserie useserialnumber ,foserie assetin ,ftserie assetout ,veserie assets ,trfarm assetstransfer ,grelha usegridfields from ts inner join ts2 on ts.tsstamp=ts2.ts2stamp where ts.ndos =61
20240718@114124.2802 1ghbqrhebc030hiqh0ccgpg1vl Query : use flama_phc
20240718@114124.2805 1ghbqrhebc030hiqh0ccgpg1vl Query : select top 1 ~inactivo valor from fl where no = '202241' and estab = 00 order by inactivo desc
20240718@114124.2873 1ghbqrhebc030hiqh0ccgpg1vl Query : use flama_phc
20240718@114124.2877 1ghbqrhebc030hiqh0ccgpg1vl Query : select 1 valor from ts where ndos = 61
20240718@114124.2945 1ghbqrhebc030hiqh0ccgpg1vl Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240718@114124.3254 1ghbqrhebc030hiqh0ccgpg1vl Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20240718@114124.3324 1ghbqrhebc030hiqh0ccgpg1vl Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240718@114124.3338 1ghbqrhebc030hiqh0ccgpg1vl Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20240718@114124.3347 1ghbqrhebc030hiqh0ccgpg1vl Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240718@114124.3361 1ghbqrhebc030hiqh0ccgpg1vl Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20240718@114124.3368 1ghbqrhebc030hiqh0ccgpg1vl Query : select top 1 ts2.manternumero, ts.tiposaft, ts.idserie,ts.nmdos,ts.bdempresas from ts inner join ts2 on ts.tsstamp=ts2.ts2stamp where ts.ndos = 61
20240718@114124.3509 1ghbqrhebc030hiqh0ccgpg1vl Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240718@114124.3592 1ghbqrhebc030hiqh0ccgpg1vl Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240718@114124.3611 1ghbqrhebc030hiqh0ccgpg1vl Query : use flama_phc
20240718@114124.3620 1ghbqrhebc030hiqh0ccgpg1vl Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202241' and estab=00
20240718@114124.3687 1ghbqrhebc030hiqh0ccgpg1vl Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240718@114124.3703 1ghbqrhebc030hiqh0ccgpg1vl Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20240718@114124.3736 1ghbqrhebc030hiqh0ccgpg1vl Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6698f215636698f15458',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240718@114124.3806 1ghbqrhebc030hiqh0ccgpg1vl Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240718@114124.3823 1ghbqrhebc030hiqh0ccgpg1vl Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20240718@114124.3832 1ghbqrhebc030hiqh0ccgpg1vl Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6698f215636698f15458','--','bo',7.9741735537190082644 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240718@114124.3992 1ghbqrhebc030hiqh0ccgpg1vl Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240718@114124.4010 1ghbqrhebc030hiqh0ccgpg1vl Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20240718@114124.4019 1ghbqrhebc030hiqh0ccgpg1vl Query : insert into bo (bostamp, nmdos, dataobra, ndos, obrano, no, estab, nome, ncont, morada, local, codpost, moeda, boano, memissao,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6698f215636698f15458','guia r. fornecedor','2024-07-18',61,2402125,?,?,?,?,?,?,?,?,2024, (select valor from para1 where descricao = 'ge_euro') ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240718@114124.6303 1ghbqrhebc030hiqh0ccgpg1vl Query : use flama_phc
20240718@114124.6308 1ghbqrhebc030hiqh0ccgpg1vl Query : select st.usalote valor from st where st.ref = '324.1805.00.1'
20240718@114124.6474 1ghbqrhebc030hiqh0ccgpg1vl Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1805.00.1'
20240718@114124.6687 1ghbqrhebc030hiqh0ccgpg1vl Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240718@114124.6849 1ghbqrhebc030hiqh0ccgpg1vl Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20240718@114124.6960 1ghbqrhebc030hiqh0ccgpg1vl Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240718@114124.6977 1ghbqrhebc030hiqh0ccgpg1vl Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20240718@114124.6986 1ghbqrhebc030hiqh0ccgpg1vl Query : select sestamp valor from se where ref ='324.1805.00.1' and lote = 'r2400290200a'
20240718@114124.7040 1ghbqrhebc030hiqh0ccgpg1vl Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240718@114124.7057 1ghbqrhebc030hiqh0ccgpg1vl Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20240718@114124.7065 1ghbqrhebc030hiqh0ccgpg1vl Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240718@114124.7081 1ghbqrhebc030hiqh0ccgpg1vl Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20240718@114124.7090 1ghbqrhebc030hiqh0ccgpg1vl Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6698f107136698f154ac',?,?,'20240718',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20240718@114124.7612 1ghbqrhebc030hiqh0ccgpg1vl Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240718@114124.7655 1ghbqrhebc030hiqh0ccgpg1vl Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240718@114124.7674 1ghbqrhebc030hiqh0ccgpg1vl Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20240718@114124.7684 1ghbqrhebc030hiqh0ccgpg1vl Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6698f688616698f154ba','aut6698f215636698f15458',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from bo bo where bo.bostamp = 'aut6698f215636698f15458'
20240718@114124.7838 1ghbqrhebc030hiqh0ccgpg1vl Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240718@114124.7857 1ghbqrhebc030hiqh0ccgpg1vl Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20240718@114124.7873 1ghbqrhebc030hiqh0ccgpg1vl Query : insert into bi (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,obistamp ,stipo) select 'aut6698f688616698f154ba',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 917, 917*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,10000 ,29.04,29.04*200.48,29.04,29.04*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,29.04*917,29.04*917*200.48 ,32.722000,32.722000*200.48 ,32.722000,32.722000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,29.04,29.04*200.48,29.04*917,29.04*917*200.48,'cps24031443798,575000002 ',231.57,231.57*917,231.57,231.57*917,?,?,?,4 from bo bo where bo.bostamp = 'aut6698f215636698f15458'
20240718@114131.4025 1ghbqrhebc030hiqh0ccgpg1vl Query : use flama_phc
20240718@114131.4030 1ghbqrhebc030hiqh0ccgpg1vl Query : declare @bostamp varchar(25) = 'aut6698f215636698f15458' ,@bistamp varchar(25) = '' update bi set tecoval = qtt * ecoval ,etecoval = qtt * eecoval ,tecoval2 = qtt * ecoval2 ,etecoval2 = qtt * eecoval2 where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end -- se tiver classificação e não for normal, não calcula nada update bi set ttdeb = 0 ,ettdeb = 0 ,ttmoeda = 0 where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and bi.classifc <> '' and bi.classifc <> 'normal' -- no caso normal com moeda euro if exists ( select 1 from bo cross apply ( select valor moeda from para1 where descricao = 'ge_pteoueuro' ) par where bo.bostamp = @bostamp and bo.moeda = par.moeda ) begin -- sem ecovalores update bi set ettdeb = round(bi.qtt * ((bi.edebito * (1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100))), 6) ,ttdeb = round(bi.qtt * ((bi.debito * (1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100))), 6) ,ttmoeda = 0 from bi inner join bo on bi.bostamp = bo.bostamp where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) and bi.econotcalc = 1 -- com ecovalores update bi set ettdeb = round(bi.qtt * ( ( bi.edebito + ( iif(p.st_econotdesc = 1, - bi.eecoval2, bi.eecoval) * ( 1 + iif(bi.ivaincl = 1 and tiva.taxa <> 0, tiva.taxa / 100, 0) ) ) ) * (1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) ), 6) + ( bi.qtt * iif(p.st_econotdesc = 1, (bi.eecoval + bi.eecoval2) * ( 1 + iif(bi.ivaincl = 1 and tiva.taxa <> 0, tiva.taxa / 100, 0) ), 0) ) ,ttdeb = round(bi.qtt * ( ( bi.debito + ( iif(p.st_econotdesc = 1, - bi.ecoval2, bi.ecoval) * ( 1 + iif(bi.ivaincl = 1 and tiva.taxa <> 0, tiva.taxa / 100, 0) ) ) ) * (1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) ), 6) + ( bi.qtt * iif(p.st_econotdesc = 1, (bi.ecoval + bi.ecoval2) * ( 1 + iif(bi.ivaincl = 1 and tiva.taxa <> 0, tiva.taxa / 100, 0) ), 0) ) ,ttmoeda = 0 from bi inner join bo on bi.bostamp = bo.bostamp left join st on bi.ref = st.ref left join taxasiva tiva on bi.tabiva = tiva.codigo cross apply ( select max(valor) st_econotdesc from ( select case when valor = 's' then 1 else 0 end valor from para1 where descricao = 'st_econotdesc' union all select 0 ) a ) p where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) and bi.econotcalc = 0 --acrescenta os descontos em valor, caso existam: update bi set ettdeb = round(bi.ettdeb - (bi.qtt * bi.evaldesc), 2) ,ttdeb = round(bi.ttdeb - (bi.qtt * bi.valdesc), 2) ,ttmoeda = 0 from bi where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) and bi.valdesc <> 0 end else begin update bi set ttmoeda = round((1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) * bi.qtt * bi.vumoeda, 2) ,ettdeb = case when bo2.cambio <> 0 then round((round((1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) * bi.qtt * bi.vumoeda, 2)) / bo2.cambio, 2) else 0 end ,edebito = case when bi.qtt = 0 then 0 else round(abs(( case when bo2.cambio <> 0 then round((round((1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) * bi.qtt * bi.vumoeda, 2)) / bo2.cambio, 2) else 0 end ) / (1 - bi.desconto / 100) / (1 - bi.desc2 / 100) / (1 - bi.desc3 / 100) / (1 - bi.desc4 / 100) / (1 - bi.desc5 / 100) / (1 - bi.desc6 / 100) / bi.qtt), 2) end ,debito = case when bi.qtt = 0 then 0 else round(abs(( case when bo2.cambio <> 0 then round((round((1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) * bi.qtt * bi.vumoeda, 2)) / bo2.cambio, 2) else 0 end ) / (1 - bi.desconto / 100) / (1 - bi.desc2 / 100) / (1 - bi.desc3 / 100) / (1 - bi.desc4 / 100) / (1 - bi.desc5 / 100) / (1 - bi.desc6 / 100) / bi.qtt), 2) end * 200.482 from bi inner join bo2 on bi.bostamp = bo2.bo2stamp where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) update bi set ttdeb = round(bi.ttdeb - (bi.qtt * bi.valdesc), 2) ,ettdeb = round(bi.ettdeb - (bi.qtt * bi.evaldesc), 0) ,debito = round(bi.debito - (bi.qtt * bi.valdesc), 2) ,edebito = round(bi.edebito - (bi.qtt * bi.evaldesc), 2) where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) and bi.valdesc <> 0 end 
20240718@114140.7171 1ghbqrhebc030hiqh0ccgpg1vl Query : use flama_phc
20240718@114140.7177 1ghbqrhebc030hiqh0ccgpg1vl Query : select 1 valor from bo where bo.bostamp = 'aut6698f215636698f15458'
20240718@114140.7256 1ghbqrhebc030hiqh0ccgpg1vl Query : declare @errno int ,@errmsg varchar(255) ,@prod bit ,@nrdec numeric(10, 0) ,@totaldeb numeric(18, 5) ,@etotaldeb numeric(19, 6) ,@total numeric(18, 5) ,@etotal numeric(19, 6) ,@custo numeric(18, 5) ,@ecusto numeric(19, 6) ,@bo_1iliq numeric(19, 6) ,@bo_2iliq numeric(19, 6) ,@base1 numeric(19, 6) ,@base2 numeric(19, 6) ,@moetotal numeric(13, 3) ,@smoe1 numeric(13, 3) ,@smoe2 numeric(13, 3) ,@smoe3 numeric(13, 3) ,@smoe4 numeric(13, 3) ,@bo11_bins numeric(18, 5) ,@bo21_bins numeric(18, 5) ,@bo31_bins numeric(18, 5) ,@bo41_bins numeric(18, 5) ,@bo51_bins numeric(18, 5) ,@bo61_bins numeric(18, 5) ,@bo71_bins numeric(18, 5) ,@bo81_bins numeric(18, 5) ,@bo91_bins numeric(18, 5) ,@bo12_bins numeric(18, 5) ,@bo22_bins numeric(18, 5) ,@bo32_bins numeric(18, 5) ,@bo42_bins numeric(18, 5) ,@bo52_bins numeric(18, 5) ,@bo62_bins numeric(18, 5) ,@bo72_bins numeric(18, 5) ,@bo82_bins numeric(18, 5) ,@bo92_bins numeric(18, 5) ,@ebo11_bins numeric(19, 6) ,@ebo21_bins numeric(19, 6) ,@ebo31_bins numeric(19, 6) ,@ebo41_bins numeric(19, 6) ,@ebo51_bins numeric(19, 6) ,@ebo61_bins numeric(19, 6) ,@ebo71_bins numeric(18, 5) ,@ebo81_bins numeric(18, 5) ,@ebo91_bins numeric(18, 5) ,@ebo12_bins numeric(19, 6) ,@ebo22_bins numeric(19, 6) ,@ebo32_bins numeric(19, 6) ,@ebo42_bins numeric(19, 6) ,@ebo52_bins numeric(19, 6) ,@ebo62_bins numeric(19, 6) ,@ebo72_bins numeric(18, 5) ,@ebo82_bins numeric(18, 5) ,@ebo92_bins numeric(18, 5) ,@bo11_iva numeric(18, 5) ,@bo21_iva numeric(18, 5) ,@bo31_iva numeric(18, 5) ,@bo41_iva numeric(18, 5) ,@bo51_iva numeric(18, 5) ,@bo61_iva numeric(18, 5) ,@bo71_iva numeric(18, 5) ,@bo81_iva numeric(18, 5) ,@bo91_iva numeric(18, 5) ,@bo12_iva numeric(18, 5) ,@bo22_iva numeric(18, 5) ,@bo32_iva numeric(18, 5) ,@bo42_iva numeric(18, 5) ,@bo52_iva numeric(18, 5) ,@bo62_iva numeric(18, 5) ,@bo72_iva numeric(18, 5) ,@bo82_iva numeric(18, 5) ,@bo92_iva numeric(18, 5) ,@ebo11_iva numeric(19, 6) ,@ebo21_iva numeric(19, 6) ,@ebo31_iva numeric(19, 6) ,@ebo41_iva numeric(19, 6) ,@ebo51_iva numeric(19, 6) ,@ebo61_iva numeric(19, 6) ,@ebo71_iva numeric(18, 5) ,@ebo81_iva numeric(18, 5) ,@ebo91_iva numeric(18, 5) ,@ebo12_iva numeric(19, 6) ,@ebo22_iva numeric(19, 6) ,@ebo32_iva numeric(19, 6) ,@ebo42_iva numeric(19, 6) ,@ebo52_iva numeric(19, 6) ,@ebo62_iva numeric(19, 6) ,@ebo72_iva numeric(18, 5) ,@ebo82_iva numeric(18, 5) ,@ebo92_iva numeric(18, 5) ,@esdeb1 numeric(19, 6) ,@esdeb2 numeric(19, 6) ,@esdeb3 numeric(19, 6) ,@esdeb4 numeric(19, 6) ,@sdeb1 numeric(18, 5) ,@sdeb2 numeric(18, 5) ,@sdeb3 numeric(18, 5) ,@sdeb4 numeric(18, 5) ,@estot1 numeric(19, 6) ,@estot2 numeric(19, 6) ,@estot3 numeric(19, 6) ,@estot4 numeric(19, 6) ,@stot1 numeric(18, 5) ,@stot2 numeric(18, 5) ,@stot3 numeric(18, 5) ,@stot4 numeric(18, 5) ,@ebo_1tvall numeric(19, 6) ,@ebo_2tvall numeric(19, 6) ,@bo_1tvall numeric(18, 5) ,@bo_2tvall numeric(18, 5) ,@ebo_totp1 numeric(19, 6) ,@ebo_totp2 numeric(19, 6) ,@bo_totp1 numeric(18, 5) ,@bo_totp2 numeric(18, 5) ,@sqtt11 numeric(13, 3) ,@sqtt21 numeric(13, 3) ,@sqtt12 numeric(13, 3) ,@sqtt22 numeric(13, 3) ,@sqtt13 numeric(13, 3) ,@sqtt23 numeric(13, 3) ,@sqtt14 numeric(13, 3) ,@sqtt24 numeric(13, 3) ,@userinis varchar (30) ,@mybostamp char(25) = 'aut6698f215636698f15458' declare @totaisiva table ( bostamp varchar (25), codigo numeric(1), taxa numeric (5,2), ebaseinc numeric (19,6), baseinc numeric (18,5), evalor numeric (19,6), valor numeric (18,5) ) set @prod = ( select ts.producao from bo(nolock) inner join ts(nolock) on bo.ndos = ts.ndos and bo.bostamp = @mybostamp ) set @nrdec = ( select convert(numeric(10, 0), valor) from para1(nolock) where descricao = 'de_euro' ) --set @prod = 0 --set @nrdec = 2 select @ecusto = sum(bi.epcusto * bi.qtt) ,@custo = sum(bi.pcusto * bi.qtt) ,@bo11_bins = sum(case when bi.tabiva = 1 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo21_bins = sum(case when bi.tabiva = 2 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo31_bins = sum(case when bi.tabiva = 3 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo41_bins = sum(case when bi.tabiva = 4 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo51_bins = sum(case when bi.tabiva = 5 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo61_bins = sum(case when bi.tabiva = 6 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo71_bins = sum(case when bi.tabiva = 7 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo81_bins = sum(case when bi.tabiva = 8 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo91_bins = sum(case when bi.tabiva = 9 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo12_bins = sum(case when bi.tabiva = 1 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo22_bins = sum(case when bi.tabiva = 2 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo32_bins = sum(case when bi.tabiva = 3 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo42_bins = sum(case when bi.tabiva = 4 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo52_bins = sum(case when bi.tabiva = 5 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo62_bins = sum(case when bi.tabiva = 6 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo72_bins = sum(case when bi.tabiva = 7 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo82_bins = sum(case when bi.tabiva = 8 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo92_bins = sum(case when bi.tabiva = 9 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo11_bins = sum(case when bi.tabiva = 1 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo21_bins = sum(case when bi.tabiva = 2 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo31_bins = sum(case when bi.tabiva = 3 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo41_bins = sum(case when bi.tabiva = 4 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo51_bins = sum(case when bi.tabiva = 5 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo61_bins = sum(case when bi.tabiva = 6 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo71_bins = sum(case when bi.tabiva = 7 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo81_bins = sum(case when bi.tabiva = 8 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo91_bins = sum(case when bi.tabiva = 9 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo12_bins = sum(case when bi.tabiva = 1 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo22_bins = sum(case when bi.tabiva = 2 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo32_bins = sum(case when bi.tabiva = 3 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo42_bins = sum(case when bi.tabiva = 4 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo52_bins = sum(case when bi.tabiva = 5 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo62_bins = sum(case when bi.tabiva = 6 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo72_bins = sum(case when bi.tabiva = 7 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo82_bins = sum(case when bi.tabiva = 8 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo92_bins = sum(case when bi.tabiva = 9 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo_1iliq = round(sum(bi.qtt * bi.epu), @nrdec) ,@bo_2iliq = round(sum(bi.ettdeb), @nrdec) ,@bo11_iva = sum(case when bi.tabiva = 1 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo12_iva = sum(case when bi.tabiva = 1 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo21_iva = sum(case when bi.tabiva = 2 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo22_iva = sum(case when bi.tabiva = 2 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo31_iva = sum(case when bi.tabiva = 3 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo32_iva = sum(case when bi.tabiva = 3 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo41_iva = sum(case when bi.tabiva = 4 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo42_iva = sum(case when bi.tabiva = 4 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo51_iva = sum(case when bi.tabiva = 5 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo52_iva = sum(case when bi.tabiva = 5 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo61_iva = sum(case when bi.tabiva = 6 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo62_iva = sum(case when bi.tabiva = 6 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo71_iva = sum(case when bi.tabiva = 7 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo72_iva = sum(case when bi.tabiva = 7 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo81_iva = sum(case when bi.tabiva = 8 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo82_iva = sum(case when bi.tabiva = 8 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo91_iva = sum(case when bi.tabiva = 9 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo92_iva = sum(case when bi.tabiva = 9 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo11_iva = sum(case when bi.tabiva = 1 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo12_iva = sum(case when bi.tabiva = 1 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo21_iva = sum(case when bi.tabiva = 2 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo22_iva = sum(case when bi.tabiva = 2 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo31_iva = sum(case when bi.tabiva = 3 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo32_iva = sum(case when bi.tabiva = 3 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo41_iva = sum(case when bi.tabiva = 4 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo42_iva = sum(case when bi.tabiva = 4 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo51_iva = sum(case when bi.tabiva = 5 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo52_iva = sum(case when bi.tabiva = 5 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo61_iva = sum(case when bi.tabiva = 6 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo62_iva = sum(case when bi.tabiva = 6 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo71_iva = sum(case when bi.tabiva = 7 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo72_iva = sum(case when bi.tabiva = 7 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo81_iva = sum(case when bi.tabiva = 8 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo82_iva = sum(case when bi.tabiva = 8 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo91_iva = sum(case when bi.tabiva = 9 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else bi.ettdeb - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo92_iva = sum(case when bi.tabiva = 9 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@esdeb1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.ettdeb else bi.ettdeb - round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@esdeb2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.ettdeb else bi.ettdeb - round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@esdeb3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.ettdeb else bi.ettdeb - round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@esdeb4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) * bi.iva / 100, @nrdec) end else 0 end) ,@sdeb1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.ttdeb else bi.ttdeb - round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@sdeb2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.ttdeb else bi.ttdeb - round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@sdeb3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.ttdeb else bi.ttdeb - round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@sdeb4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) * bi.iva / 100, @nrdec) end else 0 end) ,@smoe1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.ttmoeda else round(bi.ttmoeda / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@smoe2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.ttmoeda else round(bi.ttmoeda / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@smoe3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.ttmoeda else round(bi.ttmoeda / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@smoe4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.ttmoeda else round(bi.ttmoeda / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@estot1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@estot2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@estot3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@estot4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@stot1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@stot2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@stot3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@stot4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@total = @stot1 + @stot2 + @stot3 + @stot4 ,@etotal = @estot1 + @estot2 + @estot3 + @estot4 ,@totaldeb = @sdeb1 + @sdeb2 + @sdeb3 + @sdeb4 ,@etotaldeb = @esdeb1 + @esdeb2 + @esdeb3 + @esdeb4 ,@moetotal = @smoe1 + @smoe2 + @smoe3 + @smoe4 ,@ebo_1tvall = @ebo11_bins + @ebo21_bins + @ebo31_bins + @ebo41_bins + @ebo51_bins + @ebo61_bins + @ebo71_bins + @ebo81_bins + @ebo91_bins ,@ebo_2tvall = @ebo12_bins + @ebo22_bins + @ebo32_bins + @ebo42_bins + @ebo52_bins + @ebo62_bins + @ebo72_bins + @ebo82_bins + @ebo92_bins ,@bo_1tvall = @bo11_bins + @bo21_bins + @bo31_bins + @bo41_bins + @bo51_bins + @bo61_bins + @bo71_bins + @bo81_bins + @bo91_bins ,@bo_2tvall = @bo12_bins + @bo22_bins + @bo32_bins + @bo42_bins + @bo52_bins + @bo62_bins + @bo72_bins + @bo82_bins + @bo92_bins ,@ebo_totp1 = sum(case when bi.ivaincl = 0 then (bi.epu * bi.qtt) else round((bi.epu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end) ,@ebo_totp2 = sum(case when bi.ivaincl = 0 then (bi.edebito * bi.qtt) else round((bi.edebito * bi.qtt) / (1 + bi.iva / 100), @nrdec) end) ,@bo_totp1 = sum(case when bi.ivaincl = 0 then (bi.pu * bi.qtt) else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end) ,@bo_totp2 = sum(case when bi.ivaincl = 0 then (bi.debito * bi.qtt) else round((bi.debito * bi.qtt) / (1 + bi.iva / 100), @nrdec) end) ,@sqtt11 = sum(case when bi.stipo = 1 then bi.qtt else 0 end) ,@sqtt21 = sum(case when bi.stipo = 1 then bi.qtt else 0 end) ,@sqtt12 = sum(case when bi.stipo = 2 then bi.qtt else 0 end) ,@sqtt22 = sum(case when bi.stipo = 2 then bi.qtt else 0 end) ,@sqtt13 = sum(case when bi.stipo = 3 then bi.qtt else 0 end) ,@sqtt23 = sum(case when bi.stipo = 3 then bi.qtt else 0 end) ,@sqtt14 = sum(case when bi.stipo = 4 then bi.qtt else 0 end) ,@sqtt24 = sum(case when bi.stipo = 5 then bi.qtt else 0 end) from bi(nolock) where bi.bostamp = @mybostamp and bi.producao = case when @prod = 1 then 1 else bi.producao end and bi.composto = 0 and bi.qtt <> 0 update bo set bo.totaldeb = isnull(@totaldeb, 0) ,bo.total = isnull(@total, 0) ,bo.etotaldeb = isnull(@etotaldeb, 0) ,bo.moetotal = isnull(@moetotal, 0) ,bo.etotal = isnull(@etotal, 0) ,bo.ecusto = isnull(@ecusto, 0) ,bo.custo = isnull(@custo, 0) ,bo.bo11_bins = isnull(@bo11_bins, 0) ,bo.bo12_bins = isnull(@bo12_bins, 0) ,bo.bo21_bins = isnull(@bo21_bins, 0) ,bo.bo22_bins = isnull(@bo22_bins, 0) ,bo.bo31_bins = isnull(@bo31_bins, 0) ,bo.bo32_bins = isnull(@bo32_bins, 0) ,bo.bo41_bins = isnull(@bo41_bins, 0) ,bo.bo42_bins = isnull(@bo42_bins, 0) ,bo.bo51_bins = isnull(@bo51_bins, 0) ,bo.bo52_bins = isnull(@bo52_bins, 0) ,bo.bo61_bins = isnull(@bo61_bins, 0) ,bo.bo62_bins = isnull(@bo62_bins, 0) ,bo.ebo11_bins = isnull(@ebo11_bins, 0) ,bo.ebo12_bins = isnull(@ebo12_bins, 0) ,bo.ebo21_bins = isnull(@ebo21_bins, 0) ,bo.ebo22_bins = isnull(@ebo22_bins, 0) ,bo.ebo31_bins = isnull(@ebo31_bins, 0) ,bo.ebo32_bins = isnull(@ebo32_bins, 0) ,bo.ebo41_bins = isnull(@ebo41_bins, 0) ,bo.ebo42_bins = isnull(@ebo42_bins, 0) ,bo.ebo51_bins = isnull(@ebo51_bins, 0) ,bo.ebo52_bins = isnull(@ebo52_bins, 0) ,bo.ebo61_bins = isnull(@ebo61_bins, 0) ,bo.ebo62_bins = isnull(@ebo62_bins, 0) ,bo.bo11_iva = isnull(@bo11_iva, 0) ,bo.bo12_iva = isnull(@bo12_iva, 0) ,bo.bo21_iva = isnull(@bo21_iva, 0) ,bo.bo22_iva = isnull(@bo22_iva, 0) ,bo.bo31_iva = isnull(@bo31_iva, 0) ,bo.bo32_iva = isnull(@bo32_iva, 0) ,bo.bo41_iva = isnull(@bo41_iva, 0) ,bo.bo42_iva = isnull(@bo42_iva, 0) ,bo.bo51_iva = isnull(@bo51_iva, 0) ,bo.bo52_iva = isnull(@bo52_iva, 0) ,bo.bo61_iva = isnull(@bo61_iva, 0) ,bo.bo62_iva = isnull(@bo62_iva, 0) ,bo.ebo11_iva = isnull(@ebo11_iva, 0) ,bo.ebo12_iva = isnull(@ebo12_iva, 0) ,bo.ebo21_iva = isnull(@ebo21_iva, 0) ,bo.ebo22_iva = isnull(@ebo22_iva, 0) ,bo.ebo31_iva = isnull(@ebo31_iva, 0) ,bo.ebo32_iva = isnull(@ebo32_iva, 0) ,bo.ebo41_iva = isnull(@ebo41_iva, 0) ,bo.ebo42_iva = isnull(@ebo42_iva, 0) ,bo.ebo51_iva = isnull(@ebo51_iva, 0) ,bo.ebo52_iva = isnull(@ebo52_iva, 0) ,bo.ebo61_iva = isnull(@ebo61_iva, 0) ,bo.ebo62_iva = isnull(@ebo62_iva, 0) ,bo.esdeb1 = isnull(@esdeb1, 0) ,bo.esdeb2 = isnull(@esdeb2, 0) ,bo.esdeb3 = isnull(@esdeb3, 0) ,bo.esdeb4 = isnull(@esdeb4, 0) ,bo.sdeb1 = isnull(@sdeb1, 0) ,bo.sdeb2 = isnull(@sdeb2, 0) ,bo.sdeb3 = isnull(@sdeb3, 0) ,bo.sdeb4 = isnull(@sdeb4, 0) ,bo.smoe1 = isnull(@smoe1, 0) ,bo.smoe2 = isnull(@smoe2, 0) ,bo.smoe3 = isnull(@smoe3, 0) ,bo.smoe4 = isnull(@smoe4, 0) ,bo.estot1 = isnull(@estot1, 0) ,bo.estot2 = isnull(@estot2, 0) ,bo.estot3 = isnull(@estot3, 0) ,bo.estot4 = isnull(@estot4, 0) ,bo.stot1 = isnull(@stot1, 0) ,bo.stot2 = isnull(@stot2, 0) ,bo.stot3 = isnull(@stot3, 0) ,bo.stot4 = isnull(@stot4, 0) ,bo.ebo_1tvall = isnull(@ebo_1tvall, 0) ,bo.ebo_2tvall = isnull(@ebo_2tvall, 0) ,bo.bo_1tvall = isnull(@bo_1tvall, 0) ,bo.bo_2tvall = isnull(@bo_2tvall, 0) ,bo.ebo_totp1 = isnull(@ebo_totp1, 0) ,bo.ebo_totp2 = isnull(@ebo_totp2, 0) ,bo.bo_totp1 = isnull(@bo_totp1, 0) ,bo.bo_totp2 = isnull(@bo_totp2, 0) ,bo.sqtt11 = isnull(@sqtt11, 0) ,bo.sqtt21 = isnull(@sqtt21, 0) ,bo.sqtt12 = isnull(@sqtt12, 0) ,bo.sqtt22 = isnull(@sqtt22, 0) ,bo.sqtt13 = isnull(@sqtt13, 0) ,bo.sqtt23 = isnull(@sqtt23, 0) ,bo.sqtt14 = isnull(@sqtt14, 0) ,bo.sqtt24 = isnull(@sqtt24, 0) where bostamp = @mybostamp update bo2 set bo2.bo71_bins = isnull(@bo71_bins, 0) ,bo2.bo72_bins = isnull(@bo72_bins, 0) ,bo2.bo81_bins = isnull(@bo81_bins, 0) ,bo2.bo82_bins = isnull(@bo82_bins, 0) ,bo2.bo91_bins = isnull(@bo91_bins, 0) ,bo2.bo92_bins = isnull(@bo92_bins, 0) ,bo2.ebo71_bins = isnull(@ebo71_bins, 0) ,bo2.ebo72_bins = isnull(@ebo72_bins, 0) ,bo2.ebo81_bins = isnull(@ebo81_bins, 0) ,bo2.ebo82_bins = isnull(@ebo82_bins, 0) ,bo2.ebo91_bins = isnull(@ebo91_bins, 0) ,bo2.ebo92_bins = isnull(@ebo92_bins, 0) ,bo2.bo71_iva = isnull(@bo71_iva, 0) ,bo2.bo72_iva = isnull(@bo72_iva, 0) ,bo2.bo81_iva = isnull(@bo81_iva, 0) ,bo2.bo82_iva = isnull(@bo82_iva, 0) ,bo2.bo91_iva = isnull(@bo91_iva, 0) ,bo2.bo92_iva = isnull(@bo92_iva, 0) ,bo2.ebo71_iva = isnull(@ebo71_iva, 0) ,bo2.ebo72_iva = isnull(@ebo72_iva, 0) ,bo2.ebo81_iva = isnull(@ebo81_iva, 0) ,bo2.ebo82_iva = isnull(@ebo82_iva, 0) ,bo2.ebo91_iva = isnull(@ebo91_iva, 0) ,bo2.ebo92_iva = isnull(@ebo92_iva, 0) ,bo2.etotalciva = isnull(@etotaldeb, 0) + isnull(@ebo12_iva, 0) +isnull(@ebo22_iva, 0) +isnull(@ebo32_iva, 0) +isnull(@ebo42_iva, 0) +isnull(@ebo52_iva, 0) +isnull(@ebo62_iva, 0) +isnull(@ebo72_iva, 0) +isnull(@ebo82_iva, 0) +isnull(@ebo92_iva, 0) --,bo2.mtotalciva =isnull(@moetotal, 0) where bo2stamp = @mybostamp -- trata os bot select @userinis = usrinis from bo where bo.bostamp=@mybostamp insert into @totaisiva ( bostamp, codigo, taxa, ebaseinc, baseinc, evalor, valor ) select @mybostamp,codigo,taxa ,case when (@ebo11_bins <>0) then @ebo11_bins else @ebo12_bins end ,case when (@ebo11_bins <>0) then @bo11_bins else @bo12_bins end ,case when (@ebo11_bins <>0) then @ebo11_iva else @ebo12_iva end ,case when (@ebo11_bins <>0) then @bo11_iva else @bo12_iva end from taxasiva where codigo = 1 union all select @mybostamp,codigo,taxa ,case when (@ebo21_bins <>0) then @ebo21_bins else @ebo22_bins end ,case when (@ebo21_bins <>0) then @bo21_bins else @bo22_bins end ,case when (@ebo21_bins <>0) then @ebo21_iva else @ebo22_iva end ,case when (@ebo21_bins <>0) then @bo21_iva else @bo22_iva end from taxasiva where codigo = 2 union all select @mybostamp,codigo,taxa ,case when (@ebo31_bins <>0) then @ebo31_bins else @ebo32_bins end ,case when (@ebo31_bins <>0) then @bo31_bins else @bo32_bins end ,case when (@ebo31_bins <>0) then @ebo31_iva else @ebo32_iva end ,case when (@ebo31_bins <>0) then @bo31_iva else @bo32_iva end from taxasiva where codigo = 3 union all select @mybostamp,codigo,taxa ,case when (@ebo41_bins <>0) then @ebo41_bins else @ebo42_bins end ,case when (@ebo41_bins <>0) then @bo41_bins else @bo42_bins end ,case when (@ebo41_bins <>0) then @ebo41_iva else @ebo42_iva end ,case when (@ebo41_bins <>0) then @bo41_iva else @bo42_iva end from taxasiva where codigo = 4 union all select @mybostamp,codigo,taxa ,case when (@ebo51_bins <>0) then @ebo51_bins else @ebo52_bins end ,case when (@ebo51_bins <>0) then @bo51_bins else @bo52_bins end ,case when (@ebo51_bins <>0) then @ebo51_iva else @ebo52_iva end ,case when (@ebo51_bins <>0) then @bo51_iva else @bo52_iva end from taxasiva where codigo = 5 union all select @mybostamp,codigo,taxa ,case when (@ebo61_bins <>0) then @ebo61_bins else @ebo62_bins end ,case when (@ebo61_bins <>0) then @bo61_bins else @bo62_bins end ,case when (@ebo61_bins <>0) then @ebo61_iva else @ebo62_iva end ,case when (@ebo61_bins <>0) then @bo61_iva else @bo62_iva end from taxasiva where codigo = 6 union all select @mybostamp,codigo,taxa ,case when (@ebo71_bins <>0) then @ebo71_bins else @ebo72_bins end ,case when (@ebo71_bins <>0) then @bo71_bins else @bo72_bins end ,case when (@ebo71_bins <>0) then @ebo71_iva else @ebo72_iva end ,case when (@ebo71_bins <>0) then @bo71_iva else @bo72_iva end from taxasiva where codigo = 7 union all select @mybostamp,codigo,taxa ,case when (@ebo81_bins <>0) then @ebo81_bins else @ebo82_bins end ,case when (@ebo81_bins <>0) then @bo81_bins else @bo82_bins end ,case when (@ebo81_bins <>0) then @ebo81_iva else @ebo82_iva end ,case when (@ebo81_bins <>0) then @bo81_iva else @bo82_iva end from taxasiva where codigo = 8 union all select @mybostamp,codigo,taxa ,case when (@ebo91_bins <>0) then @ebo91_bins else @ebo92_bins end ,case when (@ebo91_bins <>0) then @bo91_bins else @bo92_bins end ,case when (@ebo91_bins <>0) then @ebo91_iva else @ebo92_iva end ,case when (@ebo91_bins <>0) then @bo91_iva else @bo92_iva end from taxasiva where codigo = 9 update bot set ebaseinc = totiva.ebaseinc, baseinc = totiva.baseinc, evalor = totiva.evalor, valor = totiva.valor, usrinis = @userinis, usrdata = convert (date,getdate()), usrhora = convert (time,getdate()) from @totaisiva totiva inner join bot on totiva.bostamp = bot.bostamp and totiva.codigo = bot.codigo insert into bot ( botstamp ,bostamp ,codigo ,taxa ,ebaseinc ,baseinc ,evalor ,valor ,ousrinis ,ousrdata ,ousrhora ,usrinis ,usrdata ,usrhora ) select ( left(@userinis,3) + 'tt' + left(newid(),5) + right(newid(),5) + left(newid(),5) + right(newid(),5)) stamp ,@mybostamp stampbo ,totiva.codigo ,totiva.taxa ,totiva.ebaseinc ,totiva.baseinc ,totiva.evalor ,totiva.valor ,@userinis ,convert (date,getdate()) ,convert (time,getdate()) ,@userinis ,convert (date,getdate()) ,convert (time,getdate()) from @totaisiva totiva left join bot on totiva.bostamp = bot.bostamp and totiva.codigo = bot.codigo where bot.botstamp is null -- atualiza os campo bi.series e bi.series2, caso tenha equipamentos update bi set series = s1, series2=s2 from bi inner join ( select distinct bistamp,ser.s1, ser.s2 from boma cross apply (select stuff ( ( select ',' + rtrim(serie) from boma myboma where myboma.bistamp = boma.bistamp order by serie for xml path('') ), 1, 1, '' ) s1 , stuff ( ( select ',' + rtrim(serie2) from boma myboma where myboma.bistamp = boma.bistamp order by serie for xml path('') ), 1, 1, '' ) s2 ) ser where boma.bostamp = @mybostamp ) myboma on bi.bistamp = myboma.bistamp where bi.bostamp = @mybostamp 
20240718@114140.9631 1ghbqrhebc030hiqh0ccgpg1vl Query : use flama_phc
20240718@114140.9636 1ghbqrhebc030hiqh0ccgpg1vl Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240718@114140.9651 1ghbqrhebc030hiqh0ccgpg1vl Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1020';
20240718@114140.9670 1ghbqrhebc030hiqh0ccgpg1vl Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1020';

20240718@175028.6490 pr62v7bf3m5ek6o1744aanfcgh Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1021';
20240718@175028.6700 pr62v7bf3m5ek6o1744aanfcgh Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1021';
20240718@175028.6850 pr62v7bf3m5ek6o1744aanfcgh Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1021';
20240718@175028.7010 pr62v7bf3m5ek6o1744aanfcgh Query : use flama_phc
20240718@175028.7040 pr62v7bf3m5ek6o1744aanfcgh Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240718@175028.7290 pr62v7bf3m5ek6o1744aanfcgh Query : use flama_phc
20240718@175028.7330 pr62v7bf3m5ek6o1744aanfcgh Query : select no, estab,szadrsdesc from szadrs where u_coddest=2459
20240718@175028.8030 pr62v7bf3m5ek6o1744aanfcgh Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1608.00.1'
20240718@175028.9130 pr62v7bf3m5ek6o1744aanfcgh Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.421.00.04'
20240718@175028.1016 pr62v7bf3m5ek6o1744aanfcgh Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.421.00.04'
20240718@175028.1027 pr62v7bf3m5ek6o1744aanfcgh Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1528.00.1'
20240718@175028.1127 pr62v7bf3m5ek6o1744aanfcgh Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1536.00.1'
20240718@175028.1231 pr62v7bf3m5ek6o1744aanfcgh Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1536.00.1'
20240718@175028.1242 pr62v7bf3m5ek6o1744aanfcgh Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1578.00.1'
20240718@175028.1359 pr62v7bf3m5ek6o1744aanfcgh Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1578.00.1'
20240718@175028.1370 pr62v7bf3m5ek6o1744aanfcgh Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1461.00.1'
20240718@175028.1474 pr62v7bf3m5ek6o1744aanfcgh Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1667.00.1'
20240718@175028.1574 pr62v7bf3m5ek6o1744aanfcgh Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1667.00.1'
20240718@175028.1585 pr62v7bf3m5ek6o1744aanfcgh Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1667.00.1'
20240718@175028.1599 pr62v7bf3m5ek6o1744aanfcgh Query : use flama_phc
20240718@175028.1602 pr62v7bf3m5ek6o1744aanfcgh Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240718@175028.1750 pr62v7bf3m5ek6o1744aanfcgh Query : use flama_phc
20240718@175028.1754 pr62v7bf3m5ek6o1744aanfcgh Query : select top 1 1 valor from td where td.ndoc = 39
20240718@175028.1805 pr62v7bf3m5ek6o1744aanfcgh Query : use flama_phc
20240718@175028.1809 pr62v7bf3m5ek6o1744aanfcgh Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240718@175028.1848 pr62v7bf3m5ek6o1744aanfcgh Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240718@175028.1946 pr62v7bf3m5ek6o1744aanfcgh Query : use flama_phc
20240718@175028.1949 pr62v7bf3m5ek6o1744aanfcgh Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240718@175028.1990 pr62v7bf3m5ek6o1744aanfcgh Query : use flama_phc
20240718@175028.1993 pr62v7bf3m5ek6o1744aanfcgh Query : select szadrsstamp valor from szadrs where szadrsdesc='eldisser, s.a.'
20240718@175028.2008 pr62v7bf3m5ek6o1744aanfcgh Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1021';
20240718@175028.2101 pr62v7bf3m5ek6o1744aanfcgh Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1021';
20240718@175028.2661 jrf7b4hbvt0qtq8olul0qbhrmg Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240718@175028.2675 jrf7b4hbvt0qtq8olul0qbhrmg Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240718@175028.2697 jrf7b4hbvt0qtq8olul0qbhrmg Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1022';
20240718@175028.2750 jrf7b4hbvt0qtq8olul0qbhrmg Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1022';
20240718@175028.2770 jrf7b4hbvt0qtq8olul0qbhrmg Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1022';
20240718@175028.2784 jrf7b4hbvt0qtq8olul0qbhrmg Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1022';
20240718@175028.2798 jrf7b4hbvt0qtq8olul0qbhrmg Query : use flama_phc
20240718@175028.2802 jrf7b4hbvt0qtq8olul0qbhrmg Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240718@175028.2819 jrf7b4hbvt0qtq8olul0qbhrmg Query : use flama_phc
20240718@175028.2822 jrf7b4hbvt0qtq8olul0qbhrmg Query : select no, estab,szadrsdesc from szadrs where u_coddest=2459
20240718@175028.2853 jrf7b4hbvt0qtq8olul0qbhrmg Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1608.00.1'
20240718@175028.2866 jrf7b4hbvt0qtq8olul0qbhrmg Query : use flama_phc
20240718@175028.2869 jrf7b4hbvt0qtq8olul0qbhrmg Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240718@175028.2885 jrf7b4hbvt0qtq8olul0qbhrmg Query : use flama_phc
20240718@175028.2889 jrf7b4hbvt0qtq8olul0qbhrmg Query : select top 1 1 valor from td where td.ndoc = 39
20240718@175028.2902 jrf7b4hbvt0qtq8olul0qbhrmg Query : use flama_phc
20240718@175028.2920 jrf7b4hbvt0qtq8olul0qbhrmg Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240718@175028.2955 jrf7b4hbvt0qtq8olul0qbhrmg Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240718@175028.2974 jrf7b4hbvt0qtq8olul0qbhrmg Query : use flama_phc
20240718@175028.2978 jrf7b4hbvt0qtq8olul0qbhrmg Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240718@175028.2992 jrf7b4hbvt0qtq8olul0qbhrmg Query : use flama_phc
20240718@175028.2997 jrf7b4hbvt0qtq8olul0qbhrmg Query : select szadrsstamp valor from szadrs where szadrsdesc='eldisser, s.a.'
20240718@175028.3010 jrf7b4hbvt0qtq8olul0qbhrmg Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1022';
20240718@175028.3027 jrf7b4hbvt0qtq8olul0qbhrmg Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1022';
20240718@175028.3561 1dk00m3tl8l4u794jpjnud7t1a Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240718@175028.3576 1dk00m3tl8l4u794jpjnud7t1a Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240718@175028.3599 1dk00m3tl8l4u794jpjnud7t1a Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1023';
20240718@175028.3643 1dk00m3tl8l4u794jpjnud7t1a Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1023';
20240718@175028.3665 1dk00m3tl8l4u794jpjnud7t1a Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1023';
20240718@175028.3683 1dk00m3tl8l4u794jpjnud7t1a Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1023';
20240718@175028.3701 1dk00m3tl8l4u794jpjnud7t1a Query : use flama_phc
20240718@175028.3705 1dk00m3tl8l4u794jpjnud7t1a Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240718@175028.3723 1dk00m3tl8l4u794jpjnud7t1a Query : use flama_phc
20240718@175028.3726 1dk00m3tl8l4u794jpjnud7t1a Query : select no, estab,szadrsdesc from szadrs where u_coddest=201
20240718@175028.3797 1dk00m3tl8l4u794jpjnud7t1a Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1676.00.1'
20240718@175028.3907 1dk00m3tl8l4u794jpjnud7t1a Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1675.00.2'
20240718@175028.4038 1dk00m3tl8l4u794jpjnud7t1a Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1528.00.1'
20240718@175028.4050 1dk00m3tl8l4u794jpjnud7t1a Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.4020.00.1'
20240718@175028.4160 1dk00m3tl8l4u794jpjnud7t1a Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.422.00.07'
20240718@175028.4281 1dk00m3tl8l4u794jpjnud7t1a Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.4320.00.1'
20240718@175028.4385 1dk00m3tl8l4u794jpjnud7t1a Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.421.00.04'
20240718@175028.4398 1dk00m3tl8l4u794jpjnud7t1a Query : use flama_phc
20240718@175028.4401 1dk00m3tl8l4u794jpjnud7t1a Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240718@175028.4424 1dk00m3tl8l4u794jpjnud7t1a Query : use flama_phc
20240718@175028.4427 1dk00m3tl8l4u794jpjnud7t1a Query : select top 1 1 valor from td where td.ndoc = 39
20240718@175028.4441 1dk00m3tl8l4u794jpjnud7t1a Query : use flama_phc
20240718@175028.4444 1dk00m3tl8l4u794jpjnud7t1a Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240718@175028.4493 1dk00m3tl8l4u794jpjnud7t1a Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240718@175028.4513 1dk00m3tl8l4u794jpjnud7t1a Query : use flama_phc
20240718@175028.4518 1dk00m3tl8l4u794jpjnud7t1a Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240718@175028.4534 1dk00m3tl8l4u794jpjnud7t1a Query : use flama_phc
20240718@175028.4538 1dk00m3tl8l4u794jpjnud7t1a Query : select szadrsstamp valor from szadrs where szadrsdesc='sorefoz - electrod. e equipamentos, s.a.'
20240718@175028.4554 1dk00m3tl8l4u794jpjnud7t1a Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1023';
20240718@175028.4573 1dk00m3tl8l4u794jpjnud7t1a Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1023';
20240718@175028.5097 e29opc322qbp65jjcpj7jvn0jo Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240718@175028.5112 e29opc322qbp65jjcpj7jvn0jo Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240718@175028.5134 e29opc322qbp65jjcpj7jvn0jo Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1024';
20240718@175028.5181 e29opc322qbp65jjcpj7jvn0jo Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1024';
20240718@175028.5208 e29opc322qbp65jjcpj7jvn0jo Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1024';
20240718@175028.5222 e29opc322qbp65jjcpj7jvn0jo Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1024';
20240718@175028.5240 e29opc322qbp65jjcpj7jvn0jo Query : use flama_phc
20240718@175028.5243 e29opc322qbp65jjcpj7jvn0jo Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240718@175028.5260 e29opc322qbp65jjcpj7jvn0jo Query : use flama_phc
20240718@175028.5263 e29opc322qbp65jjcpj7jvn0jo Query : select no, estab,szadrsdesc from szadrs where u_coddest=435
20240718@175028.5336 e29opc322qbp65jjcpj7jvn0jo Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.4320.00.1'
20240718@175028.5353 e29opc322qbp65jjcpj7jvn0jo Query : use flama_phc
20240718@175028.5356 e29opc322qbp65jjcpj7jvn0jo Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240718@175028.5372 e29opc322qbp65jjcpj7jvn0jo Query : use flama_phc
20240718@175028.5375 e29opc322qbp65jjcpj7jvn0jo Query : select top 1 1 valor from td where td.ndoc = 39
20240718@175028.5387 e29opc322qbp65jjcpj7jvn0jo Query : use flama_phc
20240718@175028.5390 e29opc322qbp65jjcpj7jvn0jo Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240718@175028.5411 e29opc322qbp65jjcpj7jvn0jo Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240718@175028.5428 e29opc322qbp65jjcpj7jvn0jo Query : use flama_phc
20240718@175028.5431 e29opc322qbp65jjcpj7jvn0jo Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240718@175028.5444 e29opc322qbp65jjcpj7jvn0jo Query : use flama_phc
20240718@175028.5448 e29opc322qbp65jjcpj7jvn0jo Query : select szadrsstamp valor from szadrs where szadrsdesc='normendes-equipamento domesticos,lda'
20240718@175028.5662 e29opc322qbp65jjcpj7jvn0jo Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1024';
20240718@175028.5680 e29opc322qbp65jjcpj7jvn0jo Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1024';
20240718@175028.6194 q5tjmuf4t6l9hak6mh6ukm6me2 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240718@175028.6209 q5tjmuf4t6l9hak6mh6ukm6me2 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240718@175028.6233 q5tjmuf4t6l9hak6mh6ukm6me2 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1025';
20240718@175028.6282 q5tjmuf4t6l9hak6mh6ukm6me2 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1025';
20240718@175028.6301 q5tjmuf4t6l9hak6mh6ukm6me2 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1025';
20240718@175028.6320 q5tjmuf4t6l9hak6mh6ukm6me2 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1025';
20240718@175028.6336 q5tjmuf4t6l9hak6mh6ukm6me2 Query : use flama_phc
20240718@175028.6340 q5tjmuf4t6l9hak6mh6ukm6me2 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240718@175028.6358 q5tjmuf4t6l9hak6mh6ukm6me2 Query : use flama_phc
20240718@175028.6362 q5tjmuf4t6l9hak6mh6ukm6me2 Query : select no, estab,szadrsdesc from szadrs where u_coddest=224
20240718@175028.6438 q5tjmuf4t6l9hak6mh6ukm6me2 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.4320.00.1'
20240718@175028.6455 q5tjmuf4t6l9hak6mh6ukm6me2 Query : use flama_phc
20240718@175028.6458 q5tjmuf4t6l9hak6mh6ukm6me2 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240718@175028.6475 q5tjmuf4t6l9hak6mh6ukm6me2 Query : use flama_phc
20240718@175028.6478 q5tjmuf4t6l9hak6mh6ukm6me2 Query : select top 1 1 valor from td where td.ndoc = 39
20240718@175028.6489 q5tjmuf4t6l9hak6mh6ukm6me2 Query : use flama_phc
20240718@175028.6492 q5tjmuf4t6l9hak6mh6ukm6me2 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240718@175028.6514 q5tjmuf4t6l9hak6mh6ukm6me2 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240718@175028.6535 q5tjmuf4t6l9hak6mh6ukm6me2 Query : use flama_phc
20240718@175028.6538 q5tjmuf4t6l9hak6mh6ukm6me2 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240718@175028.6551 q5tjmuf4t6l9hak6mh6ukm6me2 Query : use flama_phc
20240718@175028.6555 q5tjmuf4t6l9hak6mh6ukm6me2 Query : select szadrsstamp valor from szadrs where szadrsdesc='carlos manuel mateus nunes antonio'
20240718@175028.6569 q5tjmuf4t6l9hak6mh6ukm6me2 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1025';
20240718@175028.6586 q5tjmuf4t6l9hak6mh6ukm6me2 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1025';
20240718@175028.7142 amfv019ftjeltlpseucf6tv9g9 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240718@175028.7157 amfv019ftjeltlpseucf6tv9g9 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240718@175028.7179 amfv019ftjeltlpseucf6tv9g9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1026';
20240718@175028.7282 amfv019ftjeltlpseucf6tv9g9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1026';
20240718@175028.7306 amfv019ftjeltlpseucf6tv9g9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1026';
20240718@175028.7327 amfv019ftjeltlpseucf6tv9g9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1026';
20240718@175028.7348 amfv019ftjeltlpseucf6tv9g9 Query : use flama_phc
20240718@175028.7351 amfv019ftjeltlpseucf6tv9g9 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240718@175028.7381 amfv019ftjeltlpseucf6tv9g9 Query : use flama_phc
20240718@175028.7384 amfv019ftjeltlpseucf6tv9g9 Query : select no, estab,szadrsdesc from szadrs where u_coddest=3155
20240718@175028.7458 amfv019ftjeltlpseucf6tv9g9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1667.00.1'
20240718@175028.7471 amfv019ftjeltlpseucf6tv9g9 Query : use flama_phc
20240718@175028.7476 amfv019ftjeltlpseucf6tv9g9 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240718@175028.7494 amfv019ftjeltlpseucf6tv9g9 Query : use flama_phc
20240718@175028.7497 amfv019ftjeltlpseucf6tv9g9 Query : select top 1 1 valor from td where td.ndoc = 39
20240718@175028.7509 amfv019ftjeltlpseucf6tv9g9 Query : use flama_phc
20240718@175028.7512 amfv019ftjeltlpseucf6tv9g9 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240718@175028.7532 amfv019ftjeltlpseucf6tv9g9 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240718@175028.7553 amfv019ftjeltlpseucf6tv9g9 Query : use flama_phc
20240718@175028.7556 amfv019ftjeltlpseucf6tv9g9 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240718@175028.7569 amfv019ftjeltlpseucf6tv9g9 Query : use flama_phc
20240718@175028.7572 amfv019ftjeltlpseucf6tv9g9 Query : select szadrsstamp valor from szadrs where szadrsdesc='soares & filhos, lda.-entrega'
20240718@175028.7586 amfv019ftjeltlpseucf6tv9g9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1026';
20240718@175028.7602 amfv019ftjeltlpseucf6tv9g9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1026';
20240718@175028.8106 4jmhab4vu2oppb5t99t9uhcd0p Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240718@175028.8122 4jmhab4vu2oppb5t99t9uhcd0p Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240718@175028.8145 4jmhab4vu2oppb5t99t9uhcd0p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1027';
20240718@175028.8191 4jmhab4vu2oppb5t99t9uhcd0p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1027';
20240718@175028.8214 4jmhab4vu2oppb5t99t9uhcd0p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1027';
20240718@175028.8231 4jmhab4vu2oppb5t99t9uhcd0p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1027';
20240718@175028.8246 4jmhab4vu2oppb5t99t9uhcd0p Query : use flama_phc
20240718@175028.8250 4jmhab4vu2oppb5t99t9uhcd0p Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240718@175028.8270 4jmhab4vu2oppb5t99t9uhcd0p Query : use flama_phc
20240718@175028.8273 4jmhab4vu2oppb5t99t9uhcd0p Query : select no, estab,szadrsdesc from szadrs where u_coddest=433
20240718@175028.8349 4jmhab4vu2oppb5t99t9uhcd0p Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1405.00.1'
20240718@175028.8464 4jmhab4vu2oppb5t99t9uhcd0p Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1406.00.1'
20240718@175028.8569 4jmhab4vu2oppb5t99t9uhcd0p Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.422.00.07'
20240718@175028.8583 4jmhab4vu2oppb5t99t9uhcd0p Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.421.00.04'
20240718@175028.8596 4jmhab4vu2oppb5t99t9uhcd0p Query : use flama_phc
20240718@175028.8601 4jmhab4vu2oppb5t99t9uhcd0p Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240718@175028.8618 4jmhab4vu2oppb5t99t9uhcd0p Query : use flama_phc
20240718@175028.8621 4jmhab4vu2oppb5t99t9uhcd0p Query : select top 1 1 valor from td where td.ndoc = 39
20240718@175028.8633 4jmhab4vu2oppb5t99t9uhcd0p Query : use flama_phc
20240718@175028.8636 4jmhab4vu2oppb5t99t9uhcd0p Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240718@175028.8660 4jmhab4vu2oppb5t99t9uhcd0p Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240718@175028.8679 4jmhab4vu2oppb5t99t9uhcd0p Query : use flama_phc
20240718@175028.8682 4jmhab4vu2oppb5t99t9uhcd0p Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240718@175028.8696 4jmhab4vu2oppb5t99t9uhcd0p Query : use flama_phc
20240718@175028.8699 4jmhab4vu2oppb5t99t9uhcd0p Query : select szadrsstamp valor from szadrs where szadrsdesc='jose martins dias'
20240718@175028.8713 4jmhab4vu2oppb5t99t9uhcd0p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1027';
20240718@175028.8731 4jmhab4vu2oppb5t99t9uhcd0p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1027';
20240718@175028.9316 8ohp2l2i8g44jth6kphvjgso3t Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240718@175028.9330 8ohp2l2i8g44jth6kphvjgso3t Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240718@175028.9353 8ohp2l2i8g44jth6kphvjgso3t Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1028';
20240718@175028.9397 8ohp2l2i8g44jth6kphvjgso3t Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1028';
20240718@175028.9416 8ohp2l2i8g44jth6kphvjgso3t Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1028';
20240718@175028.9440 8ohp2l2i8g44jth6kphvjgso3t Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1028';
20240718@175028.9456 8ohp2l2i8g44jth6kphvjgso3t Query : use flama_phc
20240718@175028.9479 8ohp2l2i8g44jth6kphvjgso3t Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240718@175028.9497 8ohp2l2i8g44jth6kphvjgso3t Query : use flama_phc
20240718@175028.9500 8ohp2l2i8g44jth6kphvjgso3t Query : select no, estab,szadrsdesc from szadrs where u_coddest=2410
20240718@175028.9573 8ohp2l2i8g44jth6kphvjgso3t Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.4005.00.2'
20240718@175028.9672 8ohp2l2i8g44jth6kphvjgso3t Query : use flama_phc
20240718@175028.9676 8ohp2l2i8g44jth6kphvjgso3t Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240718@175028.9693 8ohp2l2i8g44jth6kphvjgso3t Query : use flama_phc
20240718@175028.9697 8ohp2l2i8g44jth6kphvjgso3t Query : select top 1 1 valor from td where td.ndoc = 39
20240718@175028.9714 8ohp2l2i8g44jth6kphvjgso3t Query : use flama_phc
20240718@175028.9719 8ohp2l2i8g44jth6kphvjgso3t Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240718@175028.9743 8ohp2l2i8g44jth6kphvjgso3t Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240718@175028.9762 8ohp2l2i8g44jth6kphvjgso3t Query : use flama_phc
20240718@175028.9767 8ohp2l2i8g44jth6kphvjgso3t Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240718@175028.9780 8ohp2l2i8g44jth6kphvjgso3t Query : use flama_phc
20240718@175028.9783 8ohp2l2i8g44jth6kphvjgso3t Query : select szadrsstamp valor from szadrs where szadrsdesc='tanqueluz - importaÇÃo, exportaÇÃo e comÉrcio de materi'
20240718@175028.9808 8ohp2l2i8g44jth6kphvjgso3t Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1028';
20240718@175028.9826 8ohp2l2i8g44jth6kphvjgso3t Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1028';
20240718@180509.6502 iitk5fiqplnhvoq2h6ugjsh9q9 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240718@180509.6518 iitk5fiqplnhvoq2h6ugjsh9q9 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240718@180509.6539 iitk5fiqplnhvoq2h6ugjsh9q9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1029';
20240718@180509.6587 iitk5fiqplnhvoq2h6ugjsh9q9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1029';
20240718@180509.6607 iitk5fiqplnhvoq2h6ugjsh9q9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1029';
20240718@180509.6626 iitk5fiqplnhvoq2h6ugjsh9q9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1029';
20240718@180509.6663 iitk5fiqplnhvoq2h6ugjsh9q9 Query : use flama_phc
20240718@180509.6666 iitk5fiqplnhvoq2h6ugjsh9q9 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240718@180509.6686 iitk5fiqplnhvoq2h6ugjsh9q9 Query : use flama_phc
20240718@180509.6689 iitk5fiqplnhvoq2h6ugjsh9q9 Query : select no, estab,szadrsdesc from szadrs where u_coddest=1179
20240718@180509.6960 iitk5fiqplnhvoq2h6ugjsh9q9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1824.00.1'
20240718@180509.7093 iitk5fiqplnhvoq2h6ugjsh9q9 Query : use flama_phc
20240718@180509.7096 iitk5fiqplnhvoq2h6ugjsh9q9 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240718@180509.7113 iitk5fiqplnhvoq2h6ugjsh9q9 Query : use flama_phc
20240718@180509.7116 iitk5fiqplnhvoq2h6ugjsh9q9 Query : select top 1 1 valor from td where td.ndoc = 39
20240718@180509.7128 iitk5fiqplnhvoq2h6ugjsh9q9 Query : use flama_phc
20240718@180509.7131 iitk5fiqplnhvoq2h6ugjsh9q9 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240718@180509.7150 iitk5fiqplnhvoq2h6ugjsh9q9 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240718@180509.7170 iitk5fiqplnhvoq2h6ugjsh9q9 Query : use flama_phc
20240718@180509.7173 iitk5fiqplnhvoq2h6ugjsh9q9 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240718@180509.7188 iitk5fiqplnhvoq2h6ugjsh9q9 Query : use flama_phc
20240718@180509.7191 iitk5fiqplnhvoq2h6ugjsh9q9 Query : select szadrsstamp valor from szadrs where szadrsdesc='o varandÃo,lda (grijÓ)'
20240718@180509.7205 iitk5fiqplnhvoq2h6ugjsh9q9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1029';
20240718@180509.7222 iitk5fiqplnhvoq2h6ugjsh9q9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1029';
20240718@180509.7735 nomk5fln0of09vpcvi634erc6c Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240718@180509.7749 nomk5fln0of09vpcvi634erc6c Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240718@180509.7768 nomk5fln0of09vpcvi634erc6c Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1030';
20240718@180509.7815 nomk5fln0of09vpcvi634erc6c Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1030';
20240718@180509.7832 nomk5fln0of09vpcvi634erc6c Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1030';
20240718@180509.7851 nomk5fln0of09vpcvi634erc6c Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1030';
20240718@180509.7866 nomk5fln0of09vpcvi634erc6c Query : use flama_phc
20240718@180509.7869 nomk5fln0of09vpcvi634erc6c Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240718@180509.7903 nomk5fln0of09vpcvi634erc6c Query : use flama_phc
20240718@180509.7906 nomk5fln0of09vpcvi634erc6c Query : select no, estab,szadrsdesc from szadrs where u_coddest=2945
20240718@180509.7974 nomk5fln0of09vpcvi634erc6c Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1896.00.1'
20240718@180509.8079 nomk5fln0of09vpcvi634erc6c Query : use flama_phc
20240718@180509.8084 nomk5fln0of09vpcvi634erc6c Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240718@180509.8099 nomk5fln0of09vpcvi634erc6c Query : use flama_phc
20240718@180509.8102 nomk5fln0of09vpcvi634erc6c Query : select top 1 1 valor from td where td.ndoc = 39
20240718@180509.8115 nomk5fln0of09vpcvi634erc6c Query : use flama_phc
20240718@180509.8118 nomk5fln0of09vpcvi634erc6c Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240718@180509.8140 nomk5fln0of09vpcvi634erc6c Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240718@180509.8166 nomk5fln0of09vpcvi634erc6c Query : use flama_phc
20240718@180509.8170 nomk5fln0of09vpcvi634erc6c Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240718@180509.8182 nomk5fln0of09vpcvi634erc6c Query : use flama_phc
20240718@180509.8184 nomk5fln0of09vpcvi634erc6c Query : select szadrsstamp valor from szadrs where szadrsdesc='casa freitas moveis e electrodomesticos, lda-entrega'
20240718@180509.8197 nomk5fln0of09vpcvi634erc6c Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1030';
20240718@180509.8214 nomk5fln0of09vpcvi634erc6c Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1030';
20240718@180509.8678 jr7jvmpoqbg7ik7qsltu464uhd Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240718@180509.8730 jr7jvmpoqbg7ik7qsltu464uhd Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240718@180509.8771 jr7jvmpoqbg7ik7qsltu464uhd Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1031';
20240718@180509.8818 jr7jvmpoqbg7ik7qsltu464uhd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1031';
20240718@180509.8836 jr7jvmpoqbg7ik7qsltu464uhd Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1031';
20240718@180509.8864 jr7jvmpoqbg7ik7qsltu464uhd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1031';
20240718@180509.8879 jr7jvmpoqbg7ik7qsltu464uhd Query : use flama_phc
20240718@180509.8883 jr7jvmpoqbg7ik7qsltu464uhd Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240718@180509.8899 jr7jvmpoqbg7ik7qsltu464uhd Query : use flama_phc
20240718@180509.8902 jr7jvmpoqbg7ik7qsltu464uhd Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240718@180509.8977 jr7jvmpoqbg7ik7qsltu464uhd Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.686.00.01'
20240718@180509.9089 jr7jvmpoqbg7ik7qsltu464uhd Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.686.00.01'
20240718@180509.9099 jr7jvmpoqbg7ik7qsltu464uhd Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.686.00.01'
20240718@180509.9110 jr7jvmpoqbg7ik7qsltu464uhd Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.686.00.01'
20240718@180509.9120 jr7jvmpoqbg7ik7qsltu464uhd Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.686.00.01'
20240718@180509.9135 jr7jvmpoqbg7ik7qsltu464uhd Query : use flama_phc
20240718@180509.9138 jr7jvmpoqbg7ik7qsltu464uhd Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240718@180509.9153 jr7jvmpoqbg7ik7qsltu464uhd Query : use flama_phc
20240718@180509.9156 jr7jvmpoqbg7ik7qsltu464uhd Query : select top 1 1 valor from td where td.ndoc = 39
20240718@180509.9171 jr7jvmpoqbg7ik7qsltu464uhd Query : use flama_phc
20240718@180509.9174 jr7jvmpoqbg7ik7qsltu464uhd Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240718@180509.9198 jr7jvmpoqbg7ik7qsltu464uhd Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240718@180509.9215 jr7jvmpoqbg7ik7qsltu464uhd Query : use flama_phc
20240718@180509.9218 jr7jvmpoqbg7ik7qsltu464uhd Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240718@180509.9230 jr7jvmpoqbg7ik7qsltu464uhd Query : use flama_phc
20240718@180509.9233 jr7jvmpoqbg7ik7qsltu464uhd Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240718@180509.9246 jr7jvmpoqbg7ik7qsltu464uhd Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1031';
20240718@180509.9263 jr7jvmpoqbg7ik7qsltu464uhd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1031';
20240718@180509.9735 viau60libuv8djobivtp4seb3n Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240718@180509.9749 viau60libuv8djobivtp4seb3n Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240718@180509.9770 viau60libuv8djobivtp4seb3n Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1032';
20240718@180509.9816 viau60libuv8djobivtp4seb3n Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1032';
20240718@180509.9833 viau60libuv8djobivtp4seb3n Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1032';
20240718@180509.9847 viau60libuv8djobivtp4seb3n Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1032';
20240718@180509.9862 viau60libuv8djobivtp4seb3n Query : use flama_phc
20240718@180509.9865 viau60libuv8djobivtp4seb3n Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240718@180509.9892 viau60libuv8djobivtp4seb3n Query : use flama_phc
20240718@180509.9895 viau60libuv8djobivtp4seb3n Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240718@180509.9926 viau60libuv8djobivtp4seb3n Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.675.00.01'
20240718@180510.3600 viau60libuv8djobivtp4seb3n Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.675.00.01'
20240718@180510.4800 viau60libuv8djobivtp4seb3n Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.675.00.01'
20240718@180510.5900 viau60libuv8djobivtp4seb3n Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.675.00.01'
20240718@180510.7000 viau60libuv8djobivtp4seb3n Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.675.00.01'
20240718@180510.7900 viau60libuv8djobivtp4seb3n Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.675.00.01'
20240718@180510.9200 viau60libuv8djobivtp4seb3n Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.675.00.01'
20240718@180510.1010 viau60libuv8djobivtp4seb3n Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.675.00.01'
20240718@180510.1290 viau60libuv8djobivtp4seb3n Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.675.00.01'
20240718@180510.1390 viau60libuv8djobivtp4seb3n Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.675.00.01'
20240718@180510.1480 viau60libuv8djobivtp4seb3n Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.675.00.01'
20240718@180510.1580 viau60libuv8djobivtp4seb3n Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.675.00.01'
20240718@180510.1690 viau60libuv8djobivtp4seb3n Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.675.00.01'
20240718@180510.1940 viau60libuv8djobivtp4seb3n Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.675.00.01'
20240718@180510.2040 viau60libuv8djobivtp4seb3n Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.675.00.01'
20240718@180510.2150 viau60libuv8djobivtp4seb3n Query : use flama_phc
20240718@180510.2180 viau60libuv8djobivtp4seb3n Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240718@180510.2330 viau60libuv8djobivtp4seb3n Query : use flama_phc
20240718@180510.2360 viau60libuv8djobivtp4seb3n Query : select top 1 1 valor from td where td.ndoc = 39
20240718@180510.2460 viau60libuv8djobivtp4seb3n Query : use flama_phc
20240718@180510.2500 viau60libuv8djobivtp4seb3n Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240718@180510.2690 viau60libuv8djobivtp4seb3n Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240718@180510.2890 viau60libuv8djobivtp4seb3n Query : use flama_phc
20240718@180510.2920 viau60libuv8djobivtp4seb3n Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240718@180510.3050 viau60libuv8djobivtp4seb3n Query : use flama_phc
20240718@180510.3100 viau60libuv8djobivtp4seb3n Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240718@180510.3230 viau60libuv8djobivtp4seb3n Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1032';
20240718@180510.3390 viau60libuv8djobivtp4seb3n Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1032';
20240718@180510.8110 j2s1i43r4af7b7jim8dvenr9e8 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240718@180510.8640 j2s1i43r4af7b7jim8dvenr9e8 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240718@180510.1052 j2s1i43r4af7b7jim8dvenr9e8 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1033';
20240718@180510.1095 j2s1i43r4af7b7jim8dvenr9e8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1033';
20240718@180510.1114 j2s1i43r4af7b7jim8dvenr9e8 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1033';
20240718@180510.1128 j2s1i43r4af7b7jim8dvenr9e8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1033';
20240718@180510.1143 j2s1i43r4af7b7jim8dvenr9e8 Query : use flama_phc
20240718@180510.1147 j2s1i43r4af7b7jim8dvenr9e8 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240718@180510.1162 j2s1i43r4af7b7jim8dvenr9e8 Query : use flama_phc
20240718@180510.1165 j2s1i43r4af7b7jim8dvenr9e8 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240718@180510.1195 j2s1i43r4af7b7jim8dvenr9e8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.679.00.01'
20240718@180510.1308 j2s1i43r4af7b7jim8dvenr9e8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.679.00.01'
20240718@180510.1318 j2s1i43r4af7b7jim8dvenr9e8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.679.00.01'
20240718@180510.1328 j2s1i43r4af7b7jim8dvenr9e8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.679.00.01'
20240718@180510.1338 j2s1i43r4af7b7jim8dvenr9e8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.679.00.01'
20240718@180510.1348 j2s1i43r4af7b7jim8dvenr9e8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.679.00.01'
20240718@180510.1357 j2s1i43r4af7b7jim8dvenr9e8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.679.00.01'
20240718@180510.1376 j2s1i43r4af7b7jim8dvenr9e8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.679.00.01'
20240718@180510.1386 j2s1i43r4af7b7jim8dvenr9e8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.679.00.01'
20240718@180510.1396 j2s1i43r4af7b7jim8dvenr9e8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.679.00.01'
20240718@180510.1608 j2s1i43r4af7b7jim8dvenr9e8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.679.00.01'
20240718@180510.1619 j2s1i43r4af7b7jim8dvenr9e8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.679.00.01'
20240718@180510.1629 j2s1i43r4af7b7jim8dvenr9e8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.679.00.01'
20240718@180510.1639 j2s1i43r4af7b7jim8dvenr9e8 Query : use flama_phc
20240718@180510.1642 j2s1i43r4af7b7jim8dvenr9e8 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240718@180510.1657 j2s1i43r4af7b7jim8dvenr9e8 Query : use flama_phc
20240718@180510.1660 j2s1i43r4af7b7jim8dvenr9e8 Query : select top 1 1 valor from td where td.ndoc = 39
20240718@180510.1671 j2s1i43r4af7b7jim8dvenr9e8 Query : use flama_phc
20240718@180510.1674 j2s1i43r4af7b7jim8dvenr9e8 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240718@180510.1693 j2s1i43r4af7b7jim8dvenr9e8 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240718@180510.1709 j2s1i43r4af7b7jim8dvenr9e8 Query : use flama_phc
20240718@180510.1712 j2s1i43r4af7b7jim8dvenr9e8 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240718@180510.1724 j2s1i43r4af7b7jim8dvenr9e8 Query : use flama_phc
20240718@180510.1727 j2s1i43r4af7b7jim8dvenr9e8 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240718@180510.1738 j2s1i43r4af7b7jim8dvenr9e8 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1033';
20240718@180510.1755 j2s1i43r4af7b7jim8dvenr9e8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1033';
20240718@180510.2210 1n7krqiuf8c0b3nhrsli1qtf8f Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240718@180510.2224 1n7krqiuf8c0b3nhrsli1qtf8f Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240718@180510.2242 1n7krqiuf8c0b3nhrsli1qtf8f Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1034';
20240718@180510.2287 1n7krqiuf8c0b3nhrsli1qtf8f Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1034';
20240718@180510.2304 1n7krqiuf8c0b3nhrsli1qtf8f Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1034';
20240718@180510.2321 1n7krqiuf8c0b3nhrsli1qtf8f Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1034';
20240718@180510.2336 1n7krqiuf8c0b3nhrsli1qtf8f Query : use flama_phc
20240718@180510.2339 1n7krqiuf8c0b3nhrsli1qtf8f Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240718@180510.2376 1n7krqiuf8c0b3nhrsli1qtf8f Query : use flama_phc
20240718@180510.2380 1n7krqiuf8c0b3nhrsli1qtf8f Query : select no, estab,szadrsdesc from szadrs where u_coddest=1334
20240718@180510.2466 1n7krqiuf8c0b3nhrsli1qtf8f Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240718@180510.2578 1n7krqiuf8c0b3nhrsli1qtf8f Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.938.00.01'
20240718@180510.2700 1n7krqiuf8c0b3nhrsli1qtf8f Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240718@180510.2711 1n7krqiuf8c0b3nhrsli1qtf8f Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240718@180510.2732 1n7krqiuf8c0b3nhrsli1qtf8f Query : use flama_phc
20240718@180510.2735 1n7krqiuf8c0b3nhrsli1qtf8f Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240718@180510.2753 1n7krqiuf8c0b3nhrsli1qtf8f Query : use flama_phc
20240718@180510.2756 1n7krqiuf8c0b3nhrsli1qtf8f Query : select top 1 1 valor from td where td.ndoc = 39
20240718@180510.2767 1n7krqiuf8c0b3nhrsli1qtf8f Query : use flama_phc
20240718@180510.2770 1n7krqiuf8c0b3nhrsli1qtf8f Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240718@180510.2792 1n7krqiuf8c0b3nhrsli1qtf8f Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240718@180510.2811 1n7krqiuf8c0b3nhrsli1qtf8f Query : use flama_phc
20240718@180510.2814 1n7krqiuf8c0b3nhrsli1qtf8f Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240718@180510.2828 1n7krqiuf8c0b3nhrsli1qtf8f Query : use flama_phc
20240718@180510.2831 1n7krqiuf8c0b3nhrsli1qtf8f Query : select szadrsstamp valor from szadrs where szadrsdesc='jose manuel simoes nascimento, lda.'
20240718@180510.2844 1n7krqiuf8c0b3nhrsli1qtf8f Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1034';
20240718@180510.2865 1n7krqiuf8c0b3nhrsli1qtf8f Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1034';
20240718@180510.4239 orihb4rm5aftt3cno9ufoq9ba1 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240718@180510.4253 orihb4rm5aftt3cno9ufoq9ba1 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240718@180510.4293 orihb4rm5aftt3cno9ufoq9ba1 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1035';
20240718@180510.4335 orihb4rm5aftt3cno9ufoq9ba1 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1035';
20240718@180510.4355 orihb4rm5aftt3cno9ufoq9ba1 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1035';
20240718@180510.4369 orihb4rm5aftt3cno9ufoq9ba1 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1035';
20240718@180510.4386 orihb4rm5aftt3cno9ufoq9ba1 Query : use flama_phc
20240718@180510.4407 orihb4rm5aftt3cno9ufoq9ba1 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240718@180510.4425 orihb4rm5aftt3cno9ufoq9ba1 Query : use flama_phc
20240718@180510.4428 orihb4rm5aftt3cno9ufoq9ba1 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240718@180510.4460 orihb4rm5aftt3cno9ufoq9ba1 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.966.00.01'
20240718@180510.4580 orihb4rm5aftt3cno9ufoq9ba1 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4980.00.1'
20240718@180510.4696 orihb4rm5aftt3cno9ufoq9ba1 Query : use flama_phc
20240718@180510.4699 orihb4rm5aftt3cno9ufoq9ba1 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240718@180510.4713 orihb4rm5aftt3cno9ufoq9ba1 Query : use flama_phc
20240718@180510.4716 orihb4rm5aftt3cno9ufoq9ba1 Query : select top 1 1 valor from td where td.ndoc = 39
20240718@180510.4727 orihb4rm5aftt3cno9ufoq9ba1 Query : use flama_phc
20240718@180510.4729 orihb4rm5aftt3cno9ufoq9ba1 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240718@180510.4748 orihb4rm5aftt3cno9ufoq9ba1 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240718@180510.4765 orihb4rm5aftt3cno9ufoq9ba1 Query : use flama_phc
20240718@180510.4767 orihb4rm5aftt3cno9ufoq9ba1 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240718@180510.4779 orihb4rm5aftt3cno9ufoq9ba1 Query : use flama_phc
20240718@180510.4781 orihb4rm5aftt3cno9ufoq9ba1 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240718@180510.4838 orihb4rm5aftt3cno9ufoq9ba1 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1035';
20240718@180510.4854 orihb4rm5aftt3cno9ufoq9ba1 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1035';
20240718@180510.5434 8p9u453dje5c39u8f7ckinrj2i Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240718@180510.5448 8p9u453dje5c39u8f7ckinrj2i Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240718@180510.5467 8p9u453dje5c39u8f7ckinrj2i Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1036';
20240718@180510.5524 8p9u453dje5c39u8f7ckinrj2i Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1036';
20240718@180510.5542 8p9u453dje5c39u8f7ckinrj2i Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1036';
20240718@180510.5556 8p9u453dje5c39u8f7ckinrj2i Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1036';
20240718@180510.5570 8p9u453dje5c39u8f7ckinrj2i Query : use flama_phc
20240718@180510.5573 8p9u453dje5c39u8f7ckinrj2i Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240718@180510.5588 8p9u453dje5c39u8f7ckinrj2i Query : use flama_phc
20240718@180510.5592 8p9u453dje5c39u8f7ckinrj2i Query : select no, estab,szadrsdesc from szadrs where u_coddest=8748
20240718@180510.5665 8p9u453dje5c39u8f7ckinrj2i Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.727.00.01'
20240718@180510.5783 8p9u453dje5c39u8f7ckinrj2i Query : use flama_phc
20240718@180510.5787 8p9u453dje5c39u8f7ckinrj2i Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240718@180510.5801 8p9u453dje5c39u8f7ckinrj2i Query : use flama_phc
20240718@180510.5804 8p9u453dje5c39u8f7ckinrj2i Query : select top 1 1 valor from td where td.ndoc = 39
20240718@180510.5817 8p9u453dje5c39u8f7ckinrj2i Query : use flama_phc
20240718@180510.5820 8p9u453dje5c39u8f7ckinrj2i Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240718@180510.5839 8p9u453dje5c39u8f7ckinrj2i Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240718@180510.5855 8p9u453dje5c39u8f7ckinrj2i Query : use flama_phc
20240718@180510.5859 8p9u453dje5c39u8f7ckinrj2i Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240718@180510.5871 8p9u453dje5c39u8f7ckinrj2i Query : use flama_phc
20240718@180510.5873 8p9u453dje5c39u8f7ckinrj2i Query : select szadrsstamp valor from szadrs where szadrsdesc='fnac - entrega'
20240718@180510.5909 8p9u453dje5c39u8f7ckinrj2i Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1036';
20240718@180510.5926 8p9u453dje5c39u8f7ckinrj2i Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1036';
20240718@180510.6412 8peu2fa64q7gks07ahmgr3boul Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240718@180510.6425 8peu2fa64q7gks07ahmgr3boul Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240718@180510.6444 8peu2fa64q7gks07ahmgr3boul Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1037';
20240718@180510.6506 8peu2fa64q7gks07ahmgr3boul Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1037';
20240718@180510.6524 8peu2fa64q7gks07ahmgr3boul Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1037';
20240718@180510.6538 8peu2fa64q7gks07ahmgr3boul Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1037';
20240718@180510.6559 8peu2fa64q7gks07ahmgr3boul Query : use flama_phc
20240718@180510.6562 8peu2fa64q7gks07ahmgr3boul Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240718@180510.6577 8peu2fa64q7gks07ahmgr3boul Query : use flama_phc
20240718@180510.6580 8peu2fa64q7gks07ahmgr3boul Query : select no, estab,szadrsdesc from szadrs where u_coddest=8748
20240718@180510.6625 8peu2fa64q7gks07ahmgr3boul Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4751.00.1'
20240718@180510.6740 8peu2fa64q7gks07ahmgr3boul Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4751.00.1'
20240718@180510.6752 8peu2fa64q7gks07ahmgr3boul Query : use flama_phc
20240718@180510.6755 8peu2fa64q7gks07ahmgr3boul Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240718@180510.6771 8peu2fa64q7gks07ahmgr3boul Query : use flama_phc
20240718@180510.6774 8peu2fa64q7gks07ahmgr3boul Query : select top 1 1 valor from td where td.ndoc = 39
20240718@180510.6784 8peu2fa64q7gks07ahmgr3boul Query : use flama_phc
20240718@180510.6787 8peu2fa64q7gks07ahmgr3boul Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240718@180510.6806 8peu2fa64q7gks07ahmgr3boul Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240718@180510.6823 8peu2fa64q7gks07ahmgr3boul Query : use flama_phc
20240718@180510.6826 8peu2fa64q7gks07ahmgr3boul Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240718@180510.6837 8peu2fa64q7gks07ahmgr3boul Query : use flama_phc
20240718@180510.6840 8peu2fa64q7gks07ahmgr3boul Query : select szadrsstamp valor from szadrs where szadrsdesc='fnac - entrega'
20240718@180510.6851 8peu2fa64q7gks07ahmgr3boul Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1037';
20240718@180510.6880 8peu2fa64q7gks07ahmgr3boul Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1037';
20240718@180510.7641 0v7q7barqoc9b5k0a6ng1f14b9 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240718@180510.7655 0v7q7barqoc9b5k0a6ng1f14b9 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240718@180510.7686 0v7q7barqoc9b5k0a6ng1f14b9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1038';
20240718@180510.7730 0v7q7barqoc9b5k0a6ng1f14b9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1038';
20240718@180510.7747 0v7q7barqoc9b5k0a6ng1f14b9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1038';
20240718@180510.7761 0v7q7barqoc9b5k0a6ng1f14b9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1038';
20240718@180510.7776 0v7q7barqoc9b5k0a6ng1f14b9 Query : use flama_phc
20240718@180510.7779 0v7q7barqoc9b5k0a6ng1f14b9 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240718@180510.7797 0v7q7barqoc9b5k0a6ng1f14b9 Query : use flama_phc
20240718@180510.7801 0v7q7barqoc9b5k0a6ng1f14b9 Query : select no, estab,szadrsdesc from szadrs where u_coddest=3145
20240718@180510.7869 0v7q7barqoc9b5k0a6ng1f14b9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8253.00.1'
20240718@180510.7991 0v7q7barqoc9b5k0a6ng1f14b9 Query : use flama_phc
20240718@180510.7994 0v7q7barqoc9b5k0a6ng1f14b9 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240718@180510.8011 0v7q7barqoc9b5k0a6ng1f14b9 Query : use flama_phc
20240718@180510.8024 0v7q7barqoc9b5k0a6ng1f14b9 Query : select top 1 1 valor from td where td.ndoc = 39
20240718@180510.8040 0v7q7barqoc9b5k0a6ng1f14b9 Query : use flama_phc
20240718@180510.8043 0v7q7barqoc9b5k0a6ng1f14b9 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240718@180510.8065 0v7q7barqoc9b5k0a6ng1f14b9 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240718@180510.8081 0v7q7barqoc9b5k0a6ng1f14b9 Query : use flama_phc
20240718@180510.8085 0v7q7barqoc9b5k0a6ng1f14b9 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240718@180510.8112 0v7q7barqoc9b5k0a6ng1f14b9 Query : use flama_phc
20240718@180510.8116 0v7q7barqoc9b5k0a6ng1f14b9 Query : select szadrsstamp valor from szadrs where szadrsdesc='jom - caldas da rainha'
20240718@180510.8129 0v7q7barqoc9b5k0a6ng1f14b9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1038';
20240718@180510.8147 0v7q7barqoc9b5k0a6ng1f14b9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1038';

20240719@110414.3580 tvrddsbr2uockppe98elnas74j Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1039';
20240719@110414.3624 tvrddsbr2uockppe98elnas74j Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1039';
20240719@110414.3837 tvrddsbr2uockppe98elnas74j Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1039';
20240719@110414.3940 tvrddsbr2uockppe98elnas74j Query : use flama_phc
20240719@110414.3985 tvrddsbr2uockppe98elnas74j Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240719@110414.4056 tvrddsbr2uockppe98elnas74j Query : use flama_phc
20240719@110414.4059 tvrddsbr2uockppe98elnas74j Query : select no, estab,szadrsdesc from szadrs where u_coddest=8748
20240719@110414.4201 tvrddsbr2uockppe98elnas74j Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1879.00.1'
20240719@110414.4344 tvrddsbr2uockppe98elnas74j Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1879.00.1'
20240719@110414.4354 tvrddsbr2uockppe98elnas74j Query : use flama_phc
20240719@110414.4356 tvrddsbr2uockppe98elnas74j Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240719@110414.4491 tvrddsbr2uockppe98elnas74j Query : use flama_phc
20240719@110414.4494 tvrddsbr2uockppe98elnas74j Query : select top 1 1 valor from td where td.ndoc = 39
20240719@110414.4537 tvrddsbr2uockppe98elnas74j Query : use flama_phc
20240719@110414.4540 tvrddsbr2uockppe98elnas74j Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240719@110414.4597 tvrddsbr2uockppe98elnas74j Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240719@110414.4756 tvrddsbr2uockppe98elnas74j Query : use flama_phc
20240719@110414.4759 tvrddsbr2uockppe98elnas74j Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240719@110414.4885 tvrddsbr2uockppe98elnas74j Query : use flama_phc
20240719@110414.4888 tvrddsbr2uockppe98elnas74j Query : select szadrsstamp valor from szadrs where szadrsdesc='fnac - entrega'
20240719@110414.4901 tvrddsbr2uockppe98elnas74j Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1039';
20240719@110414.4915 tvrddsbr2uockppe98elnas74j Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1039';

20240719@145316.3371 m498frqkjn2aqlgiobosbt23j5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1040';
20240719@145316.3399 m498frqkjn2aqlgiobosbt23j5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1040';
20240719@145316.3412 m498frqkjn2aqlgiobosbt23j5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1040';
20240719@145316.3427 m498frqkjn2aqlgiobosbt23j5 Query : use flama_phc
20240719@145316.3429 m498frqkjn2aqlgiobosbt23j5 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240719@145316.3485 m498frqkjn2aqlgiobosbt23j5 Query : use flama_phc
20240719@145316.3488 m498frqkjn2aqlgiobosbt23j5 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240719@145316.3555 m498frqkjn2aqlgiobosbt23j5 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.4860.00.1'
20240719@145316.3658 m498frqkjn2aqlgiobosbt23j5 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.4860.00.1'
20240719@145316.3669 m498frqkjn2aqlgiobosbt23j5 Query : use flama_phc
20240719@145316.3671 m498frqkjn2aqlgiobosbt23j5 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240719@145316.3810 m498frqkjn2aqlgiobosbt23j5 Query : use flama_phc
20240719@145316.3813 m498frqkjn2aqlgiobosbt23j5 Query : select top 1 1 valor from td where td.ndoc = 39
20240719@145316.3863 m498frqkjn2aqlgiobosbt23j5 Query : use flama_phc
20240719@145316.3865 m498frqkjn2aqlgiobosbt23j5 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240719@145316.3928 m498frqkjn2aqlgiobosbt23j5 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240719@145316.4020 m498frqkjn2aqlgiobosbt23j5 Query : use flama_phc
20240719@145316.4023 m498frqkjn2aqlgiobosbt23j5 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240719@145316.4058 m498frqkjn2aqlgiobosbt23j5 Query : use flama_phc
20240719@145316.4060 m498frqkjn2aqlgiobosbt23j5 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240719@145316.4073 m498frqkjn2aqlgiobosbt23j5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1040';
20240719@145316.4087 m498frqkjn2aqlgiobosbt23j5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1040';

20240719@175339.9936 53rhn5cj7ohudqa0mf9fmnn9v9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1041';
20240719@175339.9965 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1041';
20240719@175339.9978 53rhn5cj7ohudqa0mf9fmnn9v9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1041';
20240719@175339.9992 53rhn5cj7ohudqa0mf9fmnn9v9 Query : use flama_phc
20240719@175339.9995 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240719@175340.4000 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.958.00.01'
20240719@175340.1090 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =002 and bo.boano =2024 and bo.obrano = 2400240 and bi.ref ='324.958.00.01' and bi.lordem =20000
20240719@175340.3840 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.obranome ,bi.bostamp ,bo.moeda ,bi.vumoeda ,isnull(bi.vumoeda/nullif(bi.edebito,0),1) cambio ,bi.tabiva from bi inner join bo on bi.bostamp = bo.bostamp where bi.bistamp = 'cps24030135156,004000002 ' 
20240719@175340.6340 53rhn5cj7ohudqa0mf9fmnn9v9 Query : use flama_phc
20240719@175340.6370 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select top 1 1 valor from ts where ts.ndos = 61
20240719@175340.7050 53rhn5cj7ohudqa0mf9fmnn9v9 Query : use flama_phc
20240719@175340.7080 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240719@175340.7650 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select top 1 assinadoc issigned ,ts.stocks ,ts.bdempresas origin ,case when (cmstocks between 1 and 50 or cm2stocks between 1 and 50 ) then 1 else 0 end entrada ,case when cmstocks>50 or (cm2stocks>50 and trfa =1) then 1 else 0 end saida ,stneg validatestock ,tiposaft ,veserie useserialnumber ,foserie assetin ,ftserie assetout ,veserie assets ,trfarm assetstransfer ,grelha usegridfields from ts inner join ts2 on ts.tsstamp=ts2.ts2stamp where ts.ndos =61
20240719@175340.8820 53rhn5cj7ohudqa0mf9fmnn9v9 Query : use flama_phc
20240719@175340.8850 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select top 1 ~inactivo valor from fl where no = '202300' and estab = 00 order by inactivo desc
20240719@175340.9450 53rhn5cj7ohudqa0mf9fmnn9v9 Query : use flama_phc
20240719@175340.9480 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select 1 valor from ts where ndos = 61
20240719@175340.1010 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240719@175340.1323 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20240719@175340.1387 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240719@175340.1402 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20240719@175340.1409 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240719@175340.1423 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20240719@175340.1430 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select top 1 ts2.manternumero, ts.tiposaft, ts.idserie,ts.nmdos,ts.bdempresas from ts inner join ts2 on ts.tsstamp=ts2.ts2stamp where ts.ndos = 61
20240719@175340.1526 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240719@175340.1593 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240719@175340.1615 53rhn5cj7ohudqa0mf9fmnn9v9 Query : use flama_phc
20240719@175340.1619 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202300' and estab=00
20240719@175340.1683 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240719@175340.1715 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20240719@175340.1750 53rhn5cj7ohudqa0mf9fmnn9v9 Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut669a945309669a9a1427',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240719@175340.1801 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240719@175340.1814 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20240719@175340.1821 53rhn5cj7ohudqa0mf9fmnn9v9 Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut669a945309669a9a1427','--','bo',7.8149920255183413078 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240719@175340.1976 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240719@175340.1990 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20240719@175340.1998 53rhn5cj7ohudqa0mf9fmnn9v9 Query : insert into bo (bostamp, nmdos, dataobra, ndos, obrano, no, estab, nome, ncont, morada, local, codpost, moeda, boano, memissao,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut669a945309669a9a1427','guia r. fornecedor','2024-07-19',61,2402149,?,?,?,?,?,?,?,?,2024, (select valor from para1 where descricao = 'ge_euro') ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240719@175340.2439 53rhn5cj7ohudqa0mf9fmnn9v9 Query : use flama_phc
20240719@175340.2442 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select st.usalote valor from st where st.ref = '324.958.00.01'
20240719@175340.2522 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.958.00.01'
20240719@175340.2627 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240719@175340.2641 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20240719@175340.3421 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240719@175340.3435 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20240719@175340.3442 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select sestamp valor from se where ref ='324.958.00.01' and lote = 'r2400240200a'
20240719@175340.3493 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240719@175340.3506 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20240719@175340.3513 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240719@175340.3524 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20240719@175340.3531 53rhn5cj7ohudqa0mf9fmnn9v9 Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut669a981960669a9a1455',?,?,'20240719',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20240719@175340.4009 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240719@175340.4047 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240719@175340.4061 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20240719@175340.4082 53rhn5cj7ohudqa0mf9fmnn9v9 Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut669a980173669a9a1462','aut669a945309669a9a1427',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from bo bo where bo.bostamp = 'aut669a945309669a9a1427'
20240719@175340.4206 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240719@175340.4220 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20240719@175340.4234 53rhn5cj7ohudqa0mf9fmnn9v9 Query : insert into bi (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,obistamp ,stipo) select 'aut669a980173669a9a1462',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 4268, 4268*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,10000 ,6.27,6.27*200.48,6.27,6.27*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,6.27*4268,6.27*4268*200.48 ,6.933000,6.933000*200.48 ,6.933000,6.933000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,6.27,6.27*200.48,6.27*4268,6.27*4268*200.48,'cps24030135156,004000002 ',49,49*4268,49,49*4268,?,?,?,4 from bo bo where bo.bostamp = 'aut669a945309669a9a1427'
20240719@175346.3665 53rhn5cj7ohudqa0mf9fmnn9v9 Query : use flama_phc
20240719@175346.3670 53rhn5cj7ohudqa0mf9fmnn9v9 Query : declare @bostamp varchar(25) = 'aut669a945309669a9a1427' ,@bistamp varchar(25) = '' update bi set tecoval = qtt * ecoval ,etecoval = qtt * eecoval ,tecoval2 = qtt * ecoval2 ,etecoval2 = qtt * eecoval2 where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end -- se tiver classificação e não for normal, não calcula nada update bi set ttdeb = 0 ,ettdeb = 0 ,ttmoeda = 0 where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and bi.classifc <> '' and bi.classifc <> 'normal' -- no caso normal com moeda euro if exists ( select 1 from bo cross apply ( select valor moeda from para1 where descricao = 'ge_pteoueuro' ) par where bo.bostamp = @bostamp and bo.moeda = par.moeda ) begin -- sem ecovalores update bi set ettdeb = round(bi.qtt * ((bi.edebito * (1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100))), 6) ,ttdeb = round(bi.qtt * ((bi.debito * (1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100))), 6) ,ttmoeda = 0 from bi inner join bo on bi.bostamp = bo.bostamp where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) and bi.econotcalc = 1 -- com ecovalores update bi set ettdeb = round(bi.qtt * ( ( bi.edebito + ( iif(p.st_econotdesc = 1, - bi.eecoval2, bi.eecoval) * ( 1 + iif(bi.ivaincl = 1 and tiva.taxa <> 0, tiva.taxa / 100, 0) ) ) ) * (1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) ), 6) + ( bi.qtt * iif(p.st_econotdesc = 1, (bi.eecoval + bi.eecoval2) * ( 1 + iif(bi.ivaincl = 1 and tiva.taxa <> 0, tiva.taxa / 100, 0) ), 0) ) ,ttdeb = round(bi.qtt * ( ( bi.debito + ( iif(p.st_econotdesc = 1, - bi.ecoval2, bi.ecoval) * ( 1 + iif(bi.ivaincl = 1 and tiva.taxa <> 0, tiva.taxa / 100, 0) ) ) ) * (1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) ), 6) + ( bi.qtt * iif(p.st_econotdesc = 1, (bi.ecoval + bi.ecoval2) * ( 1 + iif(bi.ivaincl = 1 and tiva.taxa <> 0, tiva.taxa / 100, 0) ), 0) ) ,ttmoeda = 0 from bi inner join bo on bi.bostamp = bo.bostamp left join st on bi.ref = st.ref left join taxasiva tiva on bi.tabiva = tiva.codigo cross apply ( select max(valor) st_econotdesc from ( select case when valor = 's' then 1 else 0 end valor from para1 where descricao = 'st_econotdesc' union all select 0 ) a ) p where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) and bi.econotcalc = 0 --acrescenta os descontos em valor, caso existam: update bi set ettdeb = round(bi.ettdeb - (bi.qtt * bi.evaldesc), 2) ,ttdeb = round(bi.ttdeb - (bi.qtt * bi.valdesc), 2) ,ttmoeda = 0 from bi where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) and bi.valdesc <> 0 end else begin update bi set ttmoeda = round((1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) * bi.qtt * bi.vumoeda, 2) ,ettdeb = case when bo2.cambio <> 0 then round((round((1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) * bi.qtt * bi.vumoeda, 2)) / bo2.cambio, 2) else 0 end ,edebito = case when bi.qtt = 0 then 0 else round(abs(( case when bo2.cambio <> 0 then round((round((1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) * bi.qtt * bi.vumoeda, 2)) / bo2.cambio, 2) else 0 end ) / (1 - bi.desconto / 100) / (1 - bi.desc2 / 100) / (1 - bi.desc3 / 100) / (1 - bi.desc4 / 100) / (1 - bi.desc5 / 100) / (1 - bi.desc6 / 100) / bi.qtt), 2) end ,debito = case when bi.qtt = 0 then 0 else round(abs(( case when bo2.cambio <> 0 then round((round((1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) * bi.qtt * bi.vumoeda, 2)) / bo2.cambio, 2) else 0 end ) / (1 - bi.desconto / 100) / (1 - bi.desc2 / 100) / (1 - bi.desc3 / 100) / (1 - bi.desc4 / 100) / (1 - bi.desc5 / 100) / (1 - bi.desc6 / 100) / bi.qtt), 2) end * 200.482 from bi inner join bo2 on bi.bostamp = bo2.bo2stamp where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) update bi set ttdeb = round(bi.ttdeb - (bi.qtt * bi.valdesc), 2) ,ettdeb = round(bi.ettdeb - (bi.qtt * bi.evaldesc), 0) ,debito = round(bi.debito - (bi.qtt * bi.valdesc), 2) ,edebito = round(bi.edebito - (bi.qtt * bi.evaldesc), 2) where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) and bi.valdesc <> 0 end 
20240719@175356.5046 53rhn5cj7ohudqa0mf9fmnn9v9 Query : use flama_phc
20240719@175356.5050 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select 1 valor from bo where bo.bostamp = 'aut669a945309669a9a1427'
20240719@175356.5116 53rhn5cj7ohudqa0mf9fmnn9v9 Query : declare @errno int ,@errmsg varchar(255) ,@prod bit ,@nrdec numeric(10, 0) ,@totaldeb numeric(18, 5) ,@etotaldeb numeric(19, 6) ,@total numeric(18, 5) ,@etotal numeric(19, 6) ,@custo numeric(18, 5) ,@ecusto numeric(19, 6) ,@bo_1iliq numeric(19, 6) ,@bo_2iliq numeric(19, 6) ,@base1 numeric(19, 6) ,@base2 numeric(19, 6) ,@moetotal numeric(13, 3) ,@smoe1 numeric(13, 3) ,@smoe2 numeric(13, 3) ,@smoe3 numeric(13, 3) ,@smoe4 numeric(13, 3) ,@bo11_bins numeric(18, 5) ,@bo21_bins numeric(18, 5) ,@bo31_bins numeric(18, 5) ,@bo41_bins numeric(18, 5) ,@bo51_bins numeric(18, 5) ,@bo61_bins numeric(18, 5) ,@bo71_bins numeric(18, 5) ,@bo81_bins numeric(18, 5) ,@bo91_bins numeric(18, 5) ,@bo12_bins numeric(18, 5) ,@bo22_bins numeric(18, 5) ,@bo32_bins numeric(18, 5) ,@bo42_bins numeric(18, 5) ,@bo52_bins numeric(18, 5) ,@bo62_bins numeric(18, 5) ,@bo72_bins numeric(18, 5) ,@bo82_bins numeric(18, 5) ,@bo92_bins numeric(18, 5) ,@ebo11_bins numeric(19, 6) ,@ebo21_bins numeric(19, 6) ,@ebo31_bins numeric(19, 6) ,@ebo41_bins numeric(19, 6) ,@ebo51_bins numeric(19, 6) ,@ebo61_bins numeric(19, 6) ,@ebo71_bins numeric(18, 5) ,@ebo81_bins numeric(18, 5) ,@ebo91_bins numeric(18, 5) ,@ebo12_bins numeric(19, 6) ,@ebo22_bins numeric(19, 6) ,@ebo32_bins numeric(19, 6) ,@ebo42_bins numeric(19, 6) ,@ebo52_bins numeric(19, 6) ,@ebo62_bins numeric(19, 6) ,@ebo72_bins numeric(18, 5) ,@ebo82_bins numeric(18, 5) ,@ebo92_bins numeric(18, 5) ,@bo11_iva numeric(18, 5) ,@bo21_iva numeric(18, 5) ,@bo31_iva numeric(18, 5) ,@bo41_iva numeric(18, 5) ,@bo51_iva numeric(18, 5) ,@bo61_iva numeric(18, 5) ,@bo71_iva numeric(18, 5) ,@bo81_iva numeric(18, 5) ,@bo91_iva numeric(18, 5) ,@bo12_iva numeric(18, 5) ,@bo22_iva numeric(18, 5) ,@bo32_iva numeric(18, 5) ,@bo42_iva numeric(18, 5) ,@bo52_iva numeric(18, 5) ,@bo62_iva numeric(18, 5) ,@bo72_iva numeric(18, 5) ,@bo82_iva numeric(18, 5) ,@bo92_iva numeric(18, 5) ,@ebo11_iva numeric(19, 6) ,@ebo21_iva numeric(19, 6) ,@ebo31_iva numeric(19, 6) ,@ebo41_iva numeric(19, 6) ,@ebo51_iva numeric(19, 6) ,@ebo61_iva numeric(19, 6) ,@ebo71_iva numeric(18, 5) ,@ebo81_iva numeric(18, 5) ,@ebo91_iva numeric(18, 5) ,@ebo12_iva numeric(19, 6) ,@ebo22_iva numeric(19, 6) ,@ebo32_iva numeric(19, 6) ,@ebo42_iva numeric(19, 6) ,@ebo52_iva numeric(19, 6) ,@ebo62_iva numeric(19, 6) ,@ebo72_iva numeric(18, 5) ,@ebo82_iva numeric(18, 5) ,@ebo92_iva numeric(18, 5) ,@esdeb1 numeric(19, 6) ,@esdeb2 numeric(19, 6) ,@esdeb3 numeric(19, 6) ,@esdeb4 numeric(19, 6) ,@sdeb1 numeric(18, 5) ,@sdeb2 numeric(18, 5) ,@sdeb3 numeric(18, 5) ,@sdeb4 numeric(18, 5) ,@estot1 numeric(19, 6) ,@estot2 numeric(19, 6) ,@estot3 numeric(19, 6) ,@estot4 numeric(19, 6) ,@stot1 numeric(18, 5) ,@stot2 numeric(18, 5) ,@stot3 numeric(18, 5) ,@stot4 numeric(18, 5) ,@ebo_1tvall numeric(19, 6) ,@ebo_2tvall numeric(19, 6) ,@bo_1tvall numeric(18, 5) ,@bo_2tvall numeric(18, 5) ,@ebo_totp1 numeric(19, 6) ,@ebo_totp2 numeric(19, 6) ,@bo_totp1 numeric(18, 5) ,@bo_totp2 numeric(18, 5) ,@sqtt11 numeric(13, 3) ,@sqtt21 numeric(13, 3) ,@sqtt12 numeric(13, 3) ,@sqtt22 numeric(13, 3) ,@sqtt13 numeric(13, 3) ,@sqtt23 numeric(13, 3) ,@sqtt14 numeric(13, 3) ,@sqtt24 numeric(13, 3) ,@userinis varchar (30) ,@mybostamp char(25) = 'aut669a945309669a9a1427' declare @totaisiva table ( bostamp varchar (25), codigo numeric(1), taxa numeric (5,2), ebaseinc numeric (19,6), baseinc numeric (18,5), evalor numeric (19,6), valor numeric (18,5) ) set @prod = ( select ts.producao from bo(nolock) inner join ts(nolock) on bo.ndos = ts.ndos and bo.bostamp = @mybostamp ) set @nrdec = ( select convert(numeric(10, 0), valor) from para1(nolock) where descricao = 'de_euro' ) --set @prod = 0 --set @nrdec = 2 select @ecusto = sum(bi.epcusto * bi.qtt) ,@custo = sum(bi.pcusto * bi.qtt) ,@bo11_bins = sum(case when bi.tabiva = 1 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo21_bins = sum(case when bi.tabiva = 2 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo31_bins = sum(case when bi.tabiva = 3 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo41_bins = sum(case when bi.tabiva = 4 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo51_bins = sum(case when bi.tabiva = 5 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo61_bins = sum(case when bi.tabiva = 6 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo71_bins = sum(case when bi.tabiva = 7 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo81_bins = sum(case when bi.tabiva = 8 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo91_bins = sum(case when bi.tabiva = 9 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo12_bins = sum(case when bi.tabiva = 1 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo22_bins = sum(case when bi.tabiva = 2 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo32_bins = sum(case when bi.tabiva = 3 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo42_bins = sum(case when bi.tabiva = 4 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo52_bins = sum(case when bi.tabiva = 5 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo62_bins = sum(case when bi.tabiva = 6 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo72_bins = sum(case when bi.tabiva = 7 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo82_bins = sum(case when bi.tabiva = 8 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo92_bins = sum(case when bi.tabiva = 9 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo11_bins = sum(case when bi.tabiva = 1 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo21_bins = sum(case when bi.tabiva = 2 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo31_bins = sum(case when bi.tabiva = 3 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo41_bins = sum(case when bi.tabiva = 4 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo51_bins = sum(case when bi.tabiva = 5 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo61_bins = sum(case when bi.tabiva = 6 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo71_bins = sum(case when bi.tabiva = 7 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo81_bins = sum(case when bi.tabiva = 8 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo91_bins = sum(case when bi.tabiva = 9 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo12_bins = sum(case when bi.tabiva = 1 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo22_bins = sum(case when bi.tabiva = 2 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo32_bins = sum(case when bi.tabiva = 3 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo42_bins = sum(case when bi.tabiva = 4 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo52_bins = sum(case when bi.tabiva = 5 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo62_bins = sum(case when bi.tabiva = 6 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo72_bins = sum(case when bi.tabiva = 7 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo82_bins = sum(case when bi.tabiva = 8 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo92_bins = sum(case when bi.tabiva = 9 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo_1iliq = round(sum(bi.qtt * bi.epu), @nrdec) ,@bo_2iliq = round(sum(bi.ettdeb), @nrdec) ,@bo11_iva = sum(case when bi.tabiva = 1 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo12_iva = sum(case when bi.tabiva = 1 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo21_iva = sum(case when bi.tabiva = 2 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo22_iva = sum(case when bi.tabiva = 2 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo31_iva = sum(case when bi.tabiva = 3 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo32_iva = sum(case when bi.tabiva = 3 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo41_iva = sum(case when bi.tabiva = 4 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo42_iva = sum(case when bi.tabiva = 4 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo51_iva = sum(case when bi.tabiva = 5 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo52_iva = sum(case when bi.tabiva = 5 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo61_iva = sum(case when bi.tabiva = 6 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo62_iva = sum(case when bi.tabiva = 6 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo71_iva = sum(case when bi.tabiva = 7 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo72_iva = sum(case when bi.tabiva = 7 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo81_iva = sum(case when bi.tabiva = 8 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo82_iva = sum(case when bi.tabiva = 8 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo91_iva = sum(case when bi.tabiva = 9 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo92_iva = sum(case when bi.tabiva = 9 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo11_iva = sum(case when bi.tabiva = 1 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo12_iva = sum(case when bi.tabiva = 1 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo21_iva = sum(case when bi.tabiva = 2 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo22_iva = sum(case when bi.tabiva = 2 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo31_iva = sum(case when bi.tabiva = 3 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo32_iva = sum(case when bi.tabiva = 3 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo41_iva = sum(case when bi.tabiva = 4 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo42_iva = sum(case when bi.tabiva = 4 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo51_iva = sum(case when bi.tabiva = 5 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo52_iva = sum(case when bi.tabiva = 5 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo61_iva = sum(case when bi.tabiva = 6 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo62_iva = sum(case when bi.tabiva = 6 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo71_iva = sum(case when bi.tabiva = 7 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo72_iva = sum(case when bi.tabiva = 7 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo81_iva = sum(case when bi.tabiva = 8 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo82_iva = sum(case when bi.tabiva = 8 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo91_iva = sum(case when bi.tabiva = 9 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else bi.ettdeb - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo92_iva = sum(case when bi.tabiva = 9 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@esdeb1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.ettdeb else bi.ettdeb - round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@esdeb2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.ettdeb else bi.ettdeb - round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@esdeb3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.ettdeb else bi.ettdeb - round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@esdeb4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) * bi.iva / 100, @nrdec) end else 0 end) ,@sdeb1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.ttdeb else bi.ttdeb - round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@sdeb2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.ttdeb else bi.ttdeb - round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@sdeb3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.ttdeb else bi.ttdeb - round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@sdeb4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) * bi.iva / 100, @nrdec) end else 0 end) ,@smoe1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.ttmoeda else round(bi.ttmoeda / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@smoe2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.ttmoeda else round(bi.ttmoeda / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@smoe3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.ttmoeda else round(bi.ttmoeda / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@smoe4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.ttmoeda else round(bi.ttmoeda / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@estot1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@estot2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@estot3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@estot4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@stot1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@stot2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@stot3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@stot4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@total = @stot1 + @stot2 + @stot3 + @stot4 ,@etotal = @estot1 + @estot2 + @estot3 + @estot4 ,@totaldeb = @sdeb1 + @sdeb2 + @sdeb3 + @sdeb4 ,@etotaldeb = @esdeb1 + @esdeb2 + @esdeb3 + @esdeb4 ,@moetotal = @smoe1 + @smoe2 + @smoe3 + @smoe4 ,@ebo_1tvall = @ebo11_bins + @ebo21_bins + @ebo31_bins + @ebo41_bins + @ebo51_bins + @ebo61_bins + @ebo71_bins + @ebo81_bins + @ebo91_bins ,@ebo_2tvall = @ebo12_bins + @ebo22_bins + @ebo32_bins + @ebo42_bins + @ebo52_bins + @ebo62_bins + @ebo72_bins + @ebo82_bins + @ebo92_bins ,@bo_1tvall = @bo11_bins + @bo21_bins + @bo31_bins + @bo41_bins + @bo51_bins + @bo61_bins + @bo71_bins + @bo81_bins + @bo91_bins ,@bo_2tvall = @bo12_bins + @bo22_bins + @bo32_bins + @bo42_bins + @bo52_bins + @bo62_bins + @bo72_bins + @bo82_bins + @bo92_bins ,@ebo_totp1 = sum(case when bi.ivaincl = 0 then (bi.epu * bi.qtt) else round((bi.epu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end) ,@ebo_totp2 = sum(case when bi.ivaincl = 0 then (bi.edebito * bi.qtt) else round((bi.edebito * bi.qtt) / (1 + bi.iva / 100), @nrdec) end) ,@bo_totp1 = sum(case when bi.ivaincl = 0 then (bi.pu * bi.qtt) else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end) ,@bo_totp2 = sum(case when bi.ivaincl = 0 then (bi.debito * bi.qtt) else round((bi.debito * bi.qtt) / (1 + bi.iva / 100), @nrdec) end) ,@sqtt11 = sum(case when bi.stipo = 1 then bi.qtt else 0 end) ,@sqtt21 = sum(case when bi.stipo = 1 then bi.qtt else 0 end) ,@sqtt12 = sum(case when bi.stipo = 2 then bi.qtt else 0 end) ,@sqtt22 = sum(case when bi.stipo = 2 then bi.qtt else 0 end) ,@sqtt13 = sum(case when bi.stipo = 3 then bi.qtt else 0 end) ,@sqtt23 = sum(case when bi.stipo = 3 then bi.qtt else 0 end) ,@sqtt14 = sum(case when bi.stipo = 4 then bi.qtt else 0 end) ,@sqtt24 = sum(case when bi.stipo = 5 then bi.qtt else 0 end) from bi(nolock) where bi.bostamp = @mybostamp and bi.producao = case when @prod = 1 then 1 else bi.producao end and bi.composto = 0 and bi.qtt <> 0 update bo set bo.totaldeb = isnull(@totaldeb, 0) ,bo.total = isnull(@total, 0) ,bo.etotaldeb = isnull(@etotaldeb, 0) ,bo.moetotal = isnull(@moetotal, 0) ,bo.etotal = isnull(@etotal, 0) ,bo.ecusto = isnull(@ecusto, 0) ,bo.custo = isnull(@custo, 0) ,bo.bo11_bins = isnull(@bo11_bins, 0) ,bo.bo12_bins = isnull(@bo12_bins, 0) ,bo.bo21_bins = isnull(@bo21_bins, 0) ,bo.bo22_bins = isnull(@bo22_bins, 0) ,bo.bo31_bins = isnull(@bo31_bins, 0) ,bo.bo32_bins = isnull(@bo32_bins, 0) ,bo.bo41_bins = isnull(@bo41_bins, 0) ,bo.bo42_bins = isnull(@bo42_bins, 0) ,bo.bo51_bins = isnull(@bo51_bins, 0) ,bo.bo52_bins = isnull(@bo52_bins, 0) ,bo.bo61_bins = isnull(@bo61_bins, 0) ,bo.bo62_bins = isnull(@bo62_bins, 0) ,bo.ebo11_bins = isnull(@ebo11_bins, 0) ,bo.ebo12_bins = isnull(@ebo12_bins, 0) ,bo.ebo21_bins = isnull(@ebo21_bins, 0) ,bo.ebo22_bins = isnull(@ebo22_bins, 0) ,bo.ebo31_bins = isnull(@ebo31_bins, 0) ,bo.ebo32_bins = isnull(@ebo32_bins, 0) ,bo.ebo41_bins = isnull(@ebo41_bins, 0) ,bo.ebo42_bins = isnull(@ebo42_bins, 0) ,bo.ebo51_bins = isnull(@ebo51_bins, 0) ,bo.ebo52_bins = isnull(@ebo52_bins, 0) ,bo.ebo61_bins = isnull(@ebo61_bins, 0) ,bo.ebo62_bins = isnull(@ebo62_bins, 0) ,bo.bo11_iva = isnull(@bo11_iva, 0) ,bo.bo12_iva = isnull(@bo12_iva, 0) ,bo.bo21_iva = isnull(@bo21_iva, 0) ,bo.bo22_iva = isnull(@bo22_iva, 0) ,bo.bo31_iva = isnull(@bo31_iva, 0) ,bo.bo32_iva = isnull(@bo32_iva, 0) ,bo.bo41_iva = isnull(@bo41_iva, 0) ,bo.bo42_iva = isnull(@bo42_iva, 0) ,bo.bo51_iva = isnull(@bo51_iva, 0) ,bo.bo52_iva = isnull(@bo52_iva, 0) ,bo.bo61_iva = isnull(@bo61_iva, 0) ,bo.bo62_iva = isnull(@bo62_iva, 0) ,bo.ebo11_iva = isnull(@ebo11_iva, 0) ,bo.ebo12_iva = isnull(@ebo12_iva, 0) ,bo.ebo21_iva = isnull(@ebo21_iva, 0) ,bo.ebo22_iva = isnull(@ebo22_iva, 0) ,bo.ebo31_iva = isnull(@ebo31_iva, 0) ,bo.ebo32_iva = isnull(@ebo32_iva, 0) ,bo.ebo41_iva = isnull(@ebo41_iva, 0) ,bo.ebo42_iva = isnull(@ebo42_iva, 0) ,bo.ebo51_iva = isnull(@ebo51_iva, 0) ,bo.ebo52_iva = isnull(@ebo52_iva, 0) ,bo.ebo61_iva = isnull(@ebo61_iva, 0) ,bo.ebo62_iva = isnull(@ebo62_iva, 0) ,bo.esdeb1 = isnull(@esdeb1, 0) ,bo.esdeb2 = isnull(@esdeb2, 0) ,bo.esdeb3 = isnull(@esdeb3, 0) ,bo.esdeb4 = isnull(@esdeb4, 0) ,bo.sdeb1 = isnull(@sdeb1, 0) ,bo.sdeb2 = isnull(@sdeb2, 0) ,bo.sdeb3 = isnull(@sdeb3, 0) ,bo.sdeb4 = isnull(@sdeb4, 0) ,bo.smoe1 = isnull(@smoe1, 0) ,bo.smoe2 = isnull(@smoe2, 0) ,bo.smoe3 = isnull(@smoe3, 0) ,bo.smoe4 = isnull(@smoe4, 0) ,bo.estot1 = isnull(@estot1, 0) ,bo.estot2 = isnull(@estot2, 0) ,bo.estot3 = isnull(@estot3, 0) ,bo.estot4 = isnull(@estot4, 0) ,bo.stot1 = isnull(@stot1, 0) ,bo.stot2 = isnull(@stot2, 0) ,bo.stot3 = isnull(@stot3, 0) ,bo.stot4 = isnull(@stot4, 0) ,bo.ebo_1tvall = isnull(@ebo_1tvall, 0) ,bo.ebo_2tvall = isnull(@ebo_2tvall, 0) ,bo.bo_1tvall = isnull(@bo_1tvall, 0) ,bo.bo_2tvall = isnull(@bo_2tvall, 0) ,bo.ebo_totp1 = isnull(@ebo_totp1, 0) ,bo.ebo_totp2 = isnull(@ebo_totp2, 0) ,bo.bo_totp1 = isnull(@bo_totp1, 0) ,bo.bo_totp2 = isnull(@bo_totp2, 0) ,bo.sqtt11 = isnull(@sqtt11, 0) ,bo.sqtt21 = isnull(@sqtt21, 0) ,bo.sqtt12 = isnull(@sqtt12, 0) ,bo.sqtt22 = isnull(@sqtt22, 0) ,bo.sqtt13 = isnull(@sqtt13, 0) ,bo.sqtt23 = isnull(@sqtt23, 0) ,bo.sqtt14 = isnull(@sqtt14, 0) ,bo.sqtt24 = isnull(@sqtt24, 0) where bostamp = @mybostamp update bo2 set bo2.bo71_bins = isnull(@bo71_bins, 0) ,bo2.bo72_bins = isnull(@bo72_bins, 0) ,bo2.bo81_bins = isnull(@bo81_bins, 0) ,bo2.bo82_bins = isnull(@bo82_bins, 0) ,bo2.bo91_bins = isnull(@bo91_bins, 0) ,bo2.bo92_bins = isnull(@bo92_bins, 0) ,bo2.ebo71_bins = isnull(@ebo71_bins, 0) ,bo2.ebo72_bins = isnull(@ebo72_bins, 0) ,bo2.ebo81_bins = isnull(@ebo81_bins, 0) ,bo2.ebo82_bins = isnull(@ebo82_bins, 0) ,bo2.ebo91_bins = isnull(@ebo91_bins, 0) ,bo2.ebo92_bins = isnull(@ebo92_bins, 0) ,bo2.bo71_iva = isnull(@bo71_iva, 0) ,bo2.bo72_iva = isnull(@bo72_iva, 0) ,bo2.bo81_iva = isnull(@bo81_iva, 0) ,bo2.bo82_iva = isnull(@bo82_iva, 0) ,bo2.bo91_iva = isnull(@bo91_iva, 0) ,bo2.bo92_iva = isnull(@bo92_iva, 0) ,bo2.ebo71_iva = isnull(@ebo71_iva, 0) ,bo2.ebo72_iva = isnull(@ebo72_iva, 0) ,bo2.ebo81_iva = isnull(@ebo81_iva, 0) ,bo2.ebo82_iva = isnull(@ebo82_iva, 0) ,bo2.ebo91_iva = isnull(@ebo91_iva, 0) ,bo2.ebo92_iva = isnull(@ebo92_iva, 0) ,bo2.etotalciva = isnull(@etotaldeb, 0) + isnull(@ebo12_iva, 0) +isnull(@ebo22_iva, 0) +isnull(@ebo32_iva, 0) +isnull(@ebo42_iva, 0) +isnull(@ebo52_iva, 0) +isnull(@ebo62_iva, 0) +isnull(@ebo72_iva, 0) +isnull(@ebo82_iva, 0) +isnull(@ebo92_iva, 0) --,bo2.mtotalciva =isnull(@moetotal, 0) where bo2stamp = @mybostamp -- trata os bot select @userinis = usrinis from bo where bo.bostamp=@mybostamp insert into @totaisiva ( bostamp, codigo, taxa, ebaseinc, baseinc, evalor, valor ) select @mybostamp,codigo,taxa ,case when (@ebo11_bins <>0) then @ebo11_bins else @ebo12_bins end ,case when (@ebo11_bins <>0) then @bo11_bins else @bo12_bins end ,case when (@ebo11_bins <>0) then @ebo11_iva else @ebo12_iva end ,case when (@ebo11_bins <>0) then @bo11_iva else @bo12_iva end from taxasiva where codigo = 1 union all select @mybostamp,codigo,taxa ,case when (@ebo21_bins <>0) then @ebo21_bins else @ebo22_bins end ,case when (@ebo21_bins <>0) then @bo21_bins else @bo22_bins end ,case when (@ebo21_bins <>0) then @ebo21_iva else @ebo22_iva end ,case when (@ebo21_bins <>0) then @bo21_iva else @bo22_iva end from taxasiva where codigo = 2 union all select @mybostamp,codigo,taxa ,case when (@ebo31_bins <>0) then @ebo31_bins else @ebo32_bins end ,case when (@ebo31_bins <>0) then @bo31_bins else @bo32_bins end ,case when (@ebo31_bins <>0) then @ebo31_iva else @ebo32_iva end ,case when (@ebo31_bins <>0) then @bo31_iva else @bo32_iva end from taxasiva where codigo = 3 union all select @mybostamp,codigo,taxa ,case when (@ebo41_bins <>0) then @ebo41_bins else @ebo42_bins end ,case when (@ebo41_bins <>0) then @bo41_bins else @bo42_bins end ,case when (@ebo41_bins <>0) then @ebo41_iva else @ebo42_iva end ,case when (@ebo41_bins <>0) then @bo41_iva else @bo42_iva end from taxasiva where codigo = 4 union all select @mybostamp,codigo,taxa ,case when (@ebo51_bins <>0) then @ebo51_bins else @ebo52_bins end ,case when (@ebo51_bins <>0) then @bo51_bins else @bo52_bins end ,case when (@ebo51_bins <>0) then @ebo51_iva else @ebo52_iva end ,case when (@ebo51_bins <>0) then @bo51_iva else @bo52_iva end from taxasiva where codigo = 5 union all select @mybostamp,codigo,taxa ,case when (@ebo61_bins <>0) then @ebo61_bins else @ebo62_bins end ,case when (@ebo61_bins <>0) then @bo61_bins else @bo62_bins end ,case when (@ebo61_bins <>0) then @ebo61_iva else @ebo62_iva end ,case when (@ebo61_bins <>0) then @bo61_iva else @bo62_iva end from taxasiva where codigo = 6 union all select @mybostamp,codigo,taxa ,case when (@ebo71_bins <>0) then @ebo71_bins else @ebo72_bins end ,case when (@ebo71_bins <>0) then @bo71_bins else @bo72_bins end ,case when (@ebo71_bins <>0) then @ebo71_iva else @ebo72_iva end ,case when (@ebo71_bins <>0) then @bo71_iva else @bo72_iva end from taxasiva where codigo = 7 union all select @mybostamp,codigo,taxa ,case when (@ebo81_bins <>0) then @ebo81_bins else @ebo82_bins end ,case when (@ebo81_bins <>0) then @bo81_bins else @bo82_bins end ,case when (@ebo81_bins <>0) then @ebo81_iva else @ebo82_iva end ,case when (@ebo81_bins <>0) then @bo81_iva else @bo82_iva end from taxasiva where codigo = 8 union all select @mybostamp,codigo,taxa ,case when (@ebo91_bins <>0) then @ebo91_bins else @ebo92_bins end ,case when (@ebo91_bins <>0) then @bo91_bins else @bo92_bins end ,case when (@ebo91_bins <>0) then @ebo91_iva else @ebo92_iva end ,case when (@ebo91_bins <>0) then @bo91_iva else @bo92_iva end from taxasiva where codigo = 9 update bot set ebaseinc = totiva.ebaseinc, baseinc = totiva.baseinc, evalor = totiva.evalor, valor = totiva.valor, usrinis = @userinis, usrdata = convert (date,getdate()), usrhora = convert (time,getdate()) from @totaisiva totiva inner join bot on totiva.bostamp = bot.bostamp and totiva.codigo = bot.codigo insert into bot ( botstamp ,bostamp ,codigo ,taxa ,ebaseinc ,baseinc ,evalor ,valor ,ousrinis ,ousrdata ,ousrhora ,usrinis ,usrdata ,usrhora ) select ( left(@userinis,3) + 'tt' + left(newid(),5) + right(newid(),5) + left(newid(),5) + right(newid(),5)) stamp ,@mybostamp stampbo ,totiva.codigo ,totiva.taxa ,totiva.ebaseinc ,totiva.baseinc ,totiva.evalor ,totiva.valor ,@userinis ,convert (date,getdate()) ,convert (time,getdate()) ,@userinis ,convert (date,getdate()) ,convert (time,getdate()) from @totaisiva totiva left join bot on totiva.bostamp = bot.bostamp and totiva.codigo = bot.codigo where bot.botstamp is null -- atualiza os campo bi.series e bi.series2, caso tenha equipamentos update bi set series = s1, series2=s2 from bi inner join ( select distinct bistamp,ser.s1, ser.s2 from boma cross apply (select stuff ( ( select ',' + rtrim(serie) from boma myboma where myboma.bistamp = boma.bistamp order by serie for xml path('') ), 1, 1, '' ) s1 , stuff ( ( select ',' + rtrim(serie2) from boma myboma where myboma.bistamp = boma.bistamp order by serie for xml path('') ), 1, 1, '' ) s2 ) ser where boma.bostamp = @mybostamp ) myboma on bi.bistamp = myboma.bistamp where bi.bostamp = @mybostamp 
20240719@175358.2356 53rhn5cj7ohudqa0mf9fmnn9v9 Query : use flama_phc
20240719@175358.2359 53rhn5cj7ohudqa0mf9fmnn9v9 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240719@175358.2371 53rhn5cj7ohudqa0mf9fmnn9v9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1041';
20240719@175358.2387 53rhn5cj7ohudqa0mf9fmnn9v9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1041';

20240719@192018.6245 ae0m8hdclq7m7fur2f36vi2oh5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1042';
20240719@192018.6267 ae0m8hdclq7m7fur2f36vi2oh5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1042';
20240719@192018.6301 ae0m8hdclq7m7fur2f36vi2oh5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1042';
20240719@192018.6317 ae0m8hdclq7m7fur2f36vi2oh5 Query : use flama_phc
20240719@192018.6321 ae0m8hdclq7m7fur2f36vi2oh5 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240719@192018.6338 ae0m8hdclq7m7fur2f36vi2oh5 Query : use flama_phc
20240719@192018.6341 ae0m8hdclq7m7fur2f36vi2oh5 Query : select no, estab,szadrsdesc from szadrs where u_coddest=8748
20240719@192018.6416 ae0m8hdclq7m7fur2f36vi2oh5 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.4320.00.1'
20240719@192018.6526 ae0m8hdclq7m7fur2f36vi2oh5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404698 and bi.ref ='304.4320.00.1' and bi.lordem =1
20240719@192018.6814 ae0m8hdclq7m7fur2f36vi2oh5 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.4320.00.1'
20240719@192018.6824 ae0m8hdclq7m7fur2f36vi2oh5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404698 and bi.ref ='304.4320.00.1' and bi.lordem =1
20240719@192018.6832 ae0m8hdclq7m7fur2f36vi2oh5 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.4860.00.1'
20240719@192018.6931 ae0m8hdclq7m7fur2f36vi2oh5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404698 and bi.ref ='304.4860.00.1' and bi.lordem =2
20240719@192018.7204 ae0m8hdclq7m7fur2f36vi2oh5 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4990.00.1'
20240719@192018.7354 ae0m8hdclq7m7fur2f36vi2oh5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404698 and bi.ref ='324.4990.00.1' and bi.lordem =3
20240719@192018.7640 ae0m8hdclq7m7fur2f36vi2oh5 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4421.00.1'
20240719@192018.7746 ae0m8hdclq7m7fur2f36vi2oh5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404698 and bi.ref ='324.4421.00.1' and bi.lordem =4
20240719@192018.8029 ae0m8hdclq7m7fur2f36vi2oh5 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4421.00.1'
20240719@192018.8042 ae0m8hdclq7m7fur2f36vi2oh5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404698 and bi.ref ='324.4421.00.1' and bi.lordem =4
20240719@192018.8051 ae0m8hdclq7m7fur2f36vi2oh5 Query : use flama_phc
20240719@192018.8054 ae0m8hdclq7m7fur2f36vi2oh5 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240719@192018.8207 ae0m8hdclq7m7fur2f36vi2oh5 Query : use flama_phc
20240719@192018.8210 ae0m8hdclq7m7fur2f36vi2oh5 Query : select top 1 1 valor from td where td.ndoc = 39
20240719@192018.8259 ae0m8hdclq7m7fur2f36vi2oh5 Query : use flama_phc
20240719@192018.8262 ae0m8hdclq7m7fur2f36vi2oh5 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240719@192018.8351 ae0m8hdclq7m7fur2f36vi2oh5 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240719@192018.8537 ae0m8hdclq7m7fur2f36vi2oh5 Query : use flama_phc
20240719@192018.8540 ae0m8hdclq7m7fur2f36vi2oh5 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240719@192018.8595 ae0m8hdclq7m7fur2f36vi2oh5 Query : use flama_phc
20240719@192018.8598 ae0m8hdclq7m7fur2f36vi2oh5 Query : select szadrsstamp valor from szadrs where szadrsdesc='fnac - entrega'
20240719@192018.8610 ae0m8hdclq7m7fur2f36vi2oh5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1042';
20240719@192018.8627 ae0m8hdclq7m7fur2f36vi2oh5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1042';
20240719@192019.2420 mg6d8atr2mcl79oi15c8gl8p0l Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240719@192019.2570 mg6d8atr2mcl79oi15c8gl8p0l Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240719@192019.2760 mg6d8atr2mcl79oi15c8gl8p0l Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1043';
20240719@192019.3200 mg6d8atr2mcl79oi15c8gl8p0l Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1043';
20240719@192019.3550 mg6d8atr2mcl79oi15c8gl8p0l Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1043';
20240719@192019.3690 mg6d8atr2mcl79oi15c8gl8p0l Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1043';
20240719@192019.3840 mg6d8atr2mcl79oi15c8gl8p0l Query : use flama_phc
20240719@192019.3870 mg6d8atr2mcl79oi15c8gl8p0l Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240719@192019.4030 mg6d8atr2mcl79oi15c8gl8p0l Query : use flama_phc
20240719@192019.4060 mg6d8atr2mcl79oi15c8gl8p0l Query : select no, estab,szadrsdesc from szadrs where u_coddest=8748
20240719@192019.4340 mg6d8atr2mcl79oi15c8gl8p0l Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1608.00.1'
20240719@192019.5540 mg6d8atr2mcl79oi15c8gl8p0l Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404703 and bi.ref ='324.1608.00.1' and bi.lordem =1
20240719@192019.8640 mg6d8atr2mcl79oi15c8gl8p0l Query : use flama_phc
20240719@192019.8660 mg6d8atr2mcl79oi15c8gl8p0l Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240719@192019.8790 mg6d8atr2mcl79oi15c8gl8p0l Query : use flama_phc
20240719@192019.8820 mg6d8atr2mcl79oi15c8gl8p0l Query : select top 1 1 valor from td where td.ndoc = 39
20240719@192019.8930 mg6d8atr2mcl79oi15c8gl8p0l Query : use flama_phc
20240719@192019.8970 mg6d8atr2mcl79oi15c8gl8p0l Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240719@192019.9170 mg6d8atr2mcl79oi15c8gl8p0l Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240719@192019.9320 mg6d8atr2mcl79oi15c8gl8p0l Query : use flama_phc
20240719@192019.9360 mg6d8atr2mcl79oi15c8gl8p0l Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240719@192019.9470 mg6d8atr2mcl79oi15c8gl8p0l Query : use flama_phc
20240719@192019.9490 mg6d8atr2mcl79oi15c8gl8p0l Query : select szadrsstamp valor from szadrs where szadrsdesc='fnac - entrega'
20240719@192019.9610 mg6d8atr2mcl79oi15c8gl8p0l Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1043';
20240719@192019.9760 mg6d8atr2mcl79oi15c8gl8p0l Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1043';
20240719@192019.1452 32d6p0bs9rr8mudu4gsu896783 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240719@192019.1466 32d6p0bs9rr8mudu4gsu896783 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240719@192019.1484 32d6p0bs9rr8mudu4gsu896783 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1044';
20240719@192019.1524 32d6p0bs9rr8mudu4gsu896783 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1044';
20240719@192019.1541 32d6p0bs9rr8mudu4gsu896783 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1044';
20240719@192019.1556 32d6p0bs9rr8mudu4gsu896783 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1044';
20240719@192019.1572 32d6p0bs9rr8mudu4gsu896783 Query : use flama_phc
20240719@192019.1575 32d6p0bs9rr8mudu4gsu896783 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240719@192019.1590 32d6p0bs9rr8mudu4gsu896783 Query : use flama_phc
20240719@192019.1592 32d6p0bs9rr8mudu4gsu896783 Query : select no, estab,szadrsdesc from szadrs where u_coddest=8748
20240719@192019.1622 32d6p0bs9rr8mudu4gsu896783 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1608.00.1'
20240719@192019.1632 32d6p0bs9rr8mudu4gsu896783 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404704 and bi.ref ='324.1608.00.1' and bi.lordem =1
20240719@192019.1906 32d6p0bs9rr8mudu4gsu896783 Query : use flama_phc
20240719@192019.1911 32d6p0bs9rr8mudu4gsu896783 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240719@192019.1925 32d6p0bs9rr8mudu4gsu896783 Query : use flama_phc
20240719@192019.1927 32d6p0bs9rr8mudu4gsu896783 Query : select top 1 1 valor from td where td.ndoc = 39
20240719@192019.1938 32d6p0bs9rr8mudu4gsu896783 Query : use flama_phc
20240719@192019.1941 32d6p0bs9rr8mudu4gsu896783 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240719@192019.1962 32d6p0bs9rr8mudu4gsu896783 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240719@192019.1979 32d6p0bs9rr8mudu4gsu896783 Query : use flama_phc
20240719@192019.1982 32d6p0bs9rr8mudu4gsu896783 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240719@192019.1994 32d6p0bs9rr8mudu4gsu896783 Query : use flama_phc
20240719@192019.1997 32d6p0bs9rr8mudu4gsu896783 Query : select szadrsstamp valor from szadrs where szadrsdesc='fnac - entrega'
20240719@192019.2008 32d6p0bs9rr8mudu4gsu896783 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1044';
20240719@192019.2023 32d6p0bs9rr8mudu4gsu896783 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1044';
20240719@192019.2476 u75f060avhaqcpqtrvnhq632ue Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240719@192019.2491 u75f060avhaqcpqtrvnhq632ue Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240719@192019.2529 u75f060avhaqcpqtrvnhq632ue Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1045';
20240719@192019.2570 u75f060avhaqcpqtrvnhq632ue Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1045';
20240719@192019.2587 u75f060avhaqcpqtrvnhq632ue Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1045';
20240719@192019.2600 u75f060avhaqcpqtrvnhq632ue Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1045';
20240719@192019.2615 u75f060avhaqcpqtrvnhq632ue Query : use flama_phc
20240719@192019.2619 u75f060avhaqcpqtrvnhq632ue Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240719@192019.2633 u75f060avhaqcpqtrvnhq632ue Query : use flama_phc
20240719@192019.2637 u75f060avhaqcpqtrvnhq632ue Query : select no, estab,szadrsdesc from szadrs where u_coddest=8748
20240719@192019.2668 u75f060avhaqcpqtrvnhq632ue Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4743.00.1'
20240719@192019.2803 u75f060avhaqcpqtrvnhq632ue Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404705 and bi.ref ='324.4743.00.1' and bi.lordem =1
20240719@192019.3077 u75f060avhaqcpqtrvnhq632ue Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4743.00.1'
20240719@192019.3088 u75f060avhaqcpqtrvnhq632ue Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404705 and bi.ref ='324.4743.00.1' and bi.lordem =1
20240719@192019.3096 u75f060avhaqcpqtrvnhq632ue Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.4860.00.1'
20240719@192019.3106 u75f060avhaqcpqtrvnhq632ue Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404705 and bi.ref ='304.4860.00.1' and bi.lordem =2
20240719@192019.3381 u75f060avhaqcpqtrvnhq632ue Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4751.00.1'
20240719@192019.3484 u75f060avhaqcpqtrvnhq632ue Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404705 and bi.ref ='324.4751.00.1' and bi.lordem =3
20240719@192019.3786 u75f060avhaqcpqtrvnhq632ue Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4751.00.1'
20240719@192019.3812 u75f060avhaqcpqtrvnhq632ue Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404705 and bi.ref ='324.4751.00.1' and bi.lordem =3
20240719@192019.3820 u75f060avhaqcpqtrvnhq632ue Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4990.00.1'
20240719@192019.3830 u75f060avhaqcpqtrvnhq632ue Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404705 and bi.ref ='324.4990.00.1' and bi.lordem =4
20240719@192019.4102 u75f060avhaqcpqtrvnhq632ue Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.727.00.01'
20240719@192019.4205 u75f060avhaqcpqtrvnhq632ue Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404705 and bi.ref ='324.727.00.01' and bi.lordem =5
20240719@192019.5585 u75f060avhaqcpqtrvnhq632ue Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1705.00.1'
20240719@192019.5740 u75f060avhaqcpqtrvnhq632ue Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404705 and bi.ref ='324.1705.00.1' and bi.lordem =6
20240719@192019.6039 u75f060avhaqcpqtrvnhq632ue Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1608.00.1'
20240719@192019.6050 u75f060avhaqcpqtrvnhq632ue Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404705 and bi.ref ='324.1608.00.1' and bi.lordem =7
20240719@192019.6669 u75f060avhaqcpqtrvnhq632ue Query : use flama_phc
20240719@192019.7045 u75f060avhaqcpqtrvnhq632ue Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240719@192019.7423 u75f060avhaqcpqtrvnhq632ue Query : use flama_phc
20240719@192019.7473 u75f060avhaqcpqtrvnhq632ue Query : select top 1 1 valor from td where td.ndoc = 39
20240719@192019.7622 u75f060avhaqcpqtrvnhq632ue Query : use flama_phc
20240719@192019.7625 u75f060avhaqcpqtrvnhq632ue Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240719@192019.7644 u75f060avhaqcpqtrvnhq632ue Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240719@192019.7660 u75f060avhaqcpqtrvnhq632ue Query : use flama_phc
20240719@192019.7663 u75f060avhaqcpqtrvnhq632ue Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240719@192019.7675 u75f060avhaqcpqtrvnhq632ue Query : use flama_phc
20240719@192019.7677 u75f060avhaqcpqtrvnhq632ue Query : select szadrsstamp valor from szadrs where szadrsdesc='fnac - entrega'
20240719@192019.7689 u75f060avhaqcpqtrvnhq632ue Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1045';
20240719@192019.7706 u75f060avhaqcpqtrvnhq632ue Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1045';
20240719@192019.8221 a7updk2gs4vhjfb46j5tc517ru Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240719@192019.8233 a7updk2gs4vhjfb46j5tc517ru Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240719@192019.8252 a7updk2gs4vhjfb46j5tc517ru Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1046';
20240719@192019.8294 a7updk2gs4vhjfb46j5tc517ru Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1046';
20240719@192019.8311 a7updk2gs4vhjfb46j5tc517ru Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1046';
20240719@192019.8323 a7updk2gs4vhjfb46j5tc517ru Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1046';
20240719@192019.8337 a7updk2gs4vhjfb46j5tc517ru Query : use flama_phc
20240719@192019.8339 a7updk2gs4vhjfb46j5tc517ru Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240719@192019.8354 a7updk2gs4vhjfb46j5tc517ru Query : use flama_phc
20240719@192019.8357 a7updk2gs4vhjfb46j5tc517ru Query : select no, estab,szadrsdesc from szadrs where u_coddest=8748
20240719@192019.8385 a7updk2gs4vhjfb46j5tc517ru Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1879.00.1'
20240719@192019.8485 a7updk2gs4vhjfb46j5tc517ru Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404706 and bi.ref ='324.1879.00.1' and bi.lordem =1
20240719@192019.8756 a7updk2gs4vhjfb46j5tc517ru Query : use flama_phc
20240719@192019.8759 a7updk2gs4vhjfb46j5tc517ru Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240719@192019.8772 a7updk2gs4vhjfb46j5tc517ru Query : use flama_phc
20240719@192019.8775 a7updk2gs4vhjfb46j5tc517ru Query : select top 1 1 valor from td where td.ndoc = 39
20240719@192019.8785 a7updk2gs4vhjfb46j5tc517ru Query : use flama_phc
20240719@192019.8788 a7updk2gs4vhjfb46j5tc517ru Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240719@192019.8806 a7updk2gs4vhjfb46j5tc517ru Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240719@192019.8821 a7updk2gs4vhjfb46j5tc517ru Query : use flama_phc
20240719@192019.8824 a7updk2gs4vhjfb46j5tc517ru Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240719@192019.8834 a7updk2gs4vhjfb46j5tc517ru Query : use flama_phc
20240719@192019.8837 a7updk2gs4vhjfb46j5tc517ru Query : select szadrsstamp valor from szadrs where szadrsdesc='fnac - entrega'
20240719@192019.8847 a7updk2gs4vhjfb46j5tc517ru Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1046';
20240719@192019.8862 a7updk2gs4vhjfb46j5tc517ru Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1046';
20240719@192019.9350 4a5hiphh7ptmu7dspebq9a32k5 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240719@192019.9363 4a5hiphh7ptmu7dspebq9a32k5 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240719@192019.9382 4a5hiphh7ptmu7dspebq9a32k5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1047';
20240719@192019.9422 4a5hiphh7ptmu7dspebq9a32k5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1047';
20240719@192019.9453 4a5hiphh7ptmu7dspebq9a32k5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1047';
20240719@192019.9467 4a5hiphh7ptmu7dspebq9a32k5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1047';
20240719@192019.9483 4a5hiphh7ptmu7dspebq9a32k5 Query : use flama_phc
20240719@192019.9486 4a5hiphh7ptmu7dspebq9a32k5 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240719@192019.9501 4a5hiphh7ptmu7dspebq9a32k5 Query : use flama_phc
20240719@192019.9504 4a5hiphh7ptmu7dspebq9a32k5 Query : select no, estab,szadrsdesc from szadrs where u_coddest=8748
20240719@192019.9533 4a5hiphh7ptmu7dspebq9a32k5 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1879.00.1'
20240719@192019.9543 4a5hiphh7ptmu7dspebq9a32k5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404707 and bi.ref ='324.1879.00.1' and bi.lordem =1
20240719@192019.9817 4a5hiphh7ptmu7dspebq9a32k5 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1879.00.1'
20240719@192019.9828 4a5hiphh7ptmu7dspebq9a32k5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404707 and bi.ref ='324.1879.00.1' and bi.lordem =1
20240719@192019.9835 4a5hiphh7ptmu7dspebq9a32k5 Query : use flama_phc
20240719@192019.9838 4a5hiphh7ptmu7dspebq9a32k5 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240719@192019.9853 4a5hiphh7ptmu7dspebq9a32k5 Query : use flama_phc
20240719@192019.9857 4a5hiphh7ptmu7dspebq9a32k5 Query : select top 1 1 valor from td where td.ndoc = 39
20240719@192019.9868 4a5hiphh7ptmu7dspebq9a32k5 Query : use flama_phc
20240719@192019.9872 4a5hiphh7ptmu7dspebq9a32k5 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240719@192019.9895 4a5hiphh7ptmu7dspebq9a32k5 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240719@192019.9914 4a5hiphh7ptmu7dspebq9a32k5 Query : use flama_phc
20240719@192019.9957 4a5hiphh7ptmu7dspebq9a32k5 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240719@192019.9979 4a5hiphh7ptmu7dspebq9a32k5 Query : use flama_phc
20240719@192019.9982 4a5hiphh7ptmu7dspebq9a32k5 Query : select szadrsstamp valor from szadrs where szadrsdesc='fnac - entrega'
20240719@192019.9993 4a5hiphh7ptmu7dspebq9a32k5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1047';
20240719@192020.1000 4a5hiphh7ptmu7dspebq9a32k5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1047';
20240719@192020.5050 6r5apvfdc70ca6dce0bujduf99 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240719@192020.5200 6r5apvfdc70ca6dce0bujduf99 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240719@192020.5400 6r5apvfdc70ca6dce0bujduf99 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1048';
20240719@192020.5820 6r5apvfdc70ca6dce0bujduf99 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1048';
20240719@192020.6000 6r5apvfdc70ca6dce0bujduf99 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1048';
20240719@192020.7220 6r5apvfdc70ca6dce0bujduf99 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1048';
20240719@192020.7410 6r5apvfdc70ca6dce0bujduf99 Query : use flama_phc
20240719@192020.7460 6r5apvfdc70ca6dce0bujduf99 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240719@192020.7660 6r5apvfdc70ca6dce0bujduf99 Query : use flama_phc
20240719@192020.7690 6r5apvfdc70ca6dce0bujduf99 Query : select no, estab,szadrsdesc from szadrs where u_coddest=8748
20240719@192020.7990 6r5apvfdc70ca6dce0bujduf99 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1824.00.1'
20240719@192020.9010 6r5apvfdc70ca6dce0bujduf99 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404709 and bi.ref ='324.1824.00.1' and bi.lordem =1
20240719@192020.1190 6r5apvfdc70ca6dce0bujduf99 Query : use flama_phc
20240719@192020.1194 6r5apvfdc70ca6dce0bujduf99 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240719@192020.1208 6r5apvfdc70ca6dce0bujduf99 Query : use flama_phc
20240719@192020.1211 6r5apvfdc70ca6dce0bujduf99 Query : select top 1 1 valor from td where td.ndoc = 39
20240719@192020.1225 6r5apvfdc70ca6dce0bujduf99 Query : use flama_phc
20240719@192020.1228 6r5apvfdc70ca6dce0bujduf99 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240719@192020.1247 6r5apvfdc70ca6dce0bujduf99 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240719@192020.1272 6r5apvfdc70ca6dce0bujduf99 Query : use flama_phc
20240719@192020.1275 6r5apvfdc70ca6dce0bujduf99 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240719@192020.1288 6r5apvfdc70ca6dce0bujduf99 Query : use flama_phc
20240719@192020.1291 6r5apvfdc70ca6dce0bujduf99 Query : select szadrsstamp valor from szadrs where szadrsdesc='fnac - entrega'
20240719@192020.1304 6r5apvfdc70ca6dce0bujduf99 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1048';
20240719@192020.1321 6r5apvfdc70ca6dce0bujduf99 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1048';
20240719@192020.1994 unete8m39uhu31028kgcn3av74 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240719@192020.2007 unete8m39uhu31028kgcn3av74 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240719@192020.2027 unete8m39uhu31028kgcn3av74 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1049';
20240719@192020.2069 unete8m39uhu31028kgcn3av74 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1049';
20240719@192020.2087 unete8m39uhu31028kgcn3av74 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1049';
20240719@192020.2100 unete8m39uhu31028kgcn3av74 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1049';
20240719@192020.2114 unete8m39uhu31028kgcn3av74 Query : use flama_phc
20240719@192020.2117 unete8m39uhu31028kgcn3av74 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240719@192020.2131 unete8m39uhu31028kgcn3av74 Query : use flama_phc
20240719@192020.2134 unete8m39uhu31028kgcn3av74 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240719@192020.2201 unete8m39uhu31028kgcn3av74 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4902.00.1'
20240719@192020.2300 unete8m39uhu31028kgcn3av74 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404813 and bi.ref ='324.4902.00.1' and bi.lordem =1
20240719@192020.2625 unete8m39uhu31028kgcn3av74 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4902.00.1'
20240719@192020.2637 unete8m39uhu31028kgcn3av74 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404813 and bi.ref ='324.4902.00.1' and bi.lordem =1
20240719@192020.2644 unete8m39uhu31028kgcn3av74 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4902.00.1'
20240719@192020.2654 unete8m39uhu31028kgcn3av74 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404813 and bi.ref ='324.4902.00.1' and bi.lordem =1
20240719@192020.2662 unete8m39uhu31028kgcn3av74 Query : use flama_phc
20240719@192020.2667 unete8m39uhu31028kgcn3av74 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240719@192020.2680 unete8m39uhu31028kgcn3av74 Query : use flama_phc
20240719@192020.2683 unete8m39uhu31028kgcn3av74 Query : select top 1 1 valor from td where td.ndoc = 39
20240719@192020.2694 unete8m39uhu31028kgcn3av74 Query : use flama_phc
20240719@192020.2697 unete8m39uhu31028kgcn3av74 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240719@192020.2716 unete8m39uhu31028kgcn3av74 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240719@192020.2732 unete8m39uhu31028kgcn3av74 Query : use flama_phc
20240719@192020.2735 unete8m39uhu31028kgcn3av74 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240719@192020.2746 unete8m39uhu31028kgcn3av74 Query : use flama_phc
20240719@192020.2749 unete8m39uhu31028kgcn3av74 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240719@192020.2762 unete8m39uhu31028kgcn3av74 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1049';
20240719@192020.2791 unete8m39uhu31028kgcn3av74 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1049';
20240719@192020.4396 2826pma5ip84us7krjsr4aqbb5 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240719@192020.5157 2826pma5ip84us7krjsr4aqbb5 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240719@192020.5180 2826pma5ip84us7krjsr4aqbb5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1050';
20240719@192020.5219 2826pma5ip84us7krjsr4aqbb5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1050';
20240719@192020.5281 2826pma5ip84us7krjsr4aqbb5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1050';
20240719@192020.5297 2826pma5ip84us7krjsr4aqbb5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1050';
20240719@192020.5312 2826pma5ip84us7krjsr4aqbb5 Query : use flama_phc
20240719@192020.5315 2826pma5ip84us7krjsr4aqbb5 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240719@192020.5329 2826pma5ip84us7krjsr4aqbb5 Query : use flama_phc
20240719@192020.5332 2826pma5ip84us7krjsr4aqbb5 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240719@192020.5362 2826pma5ip84us7krjsr4aqbb5 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4988.00.1'
20240719@192020.5484 2826pma5ip84us7krjsr4aqbb5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404814 and bi.ref ='324.4988.00.1' and bi.lordem =1
20240719@192020.6383 2826pma5ip84us7krjsr4aqbb5 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4988.00.1'
20240719@192020.6749 2826pma5ip84us7krjsr4aqbb5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404814 and bi.ref ='324.4988.00.1' and bi.lordem =1
20240719@192020.6757 2826pma5ip84us7krjsr4aqbb5 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4988.00.1'
20240719@192020.6767 2826pma5ip84us7krjsr4aqbb5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404814 and bi.ref ='324.4988.00.1' and bi.lordem =1
20240719@192020.6775 2826pma5ip84us7krjsr4aqbb5 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4988.00.1'
20240719@192020.6785 2826pma5ip84us7krjsr4aqbb5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404814 and bi.ref ='324.4988.00.1' and bi.lordem =1
20240719@192020.6793 2826pma5ip84us7krjsr4aqbb5 Query : use flama_phc
20240719@192020.6796 2826pma5ip84us7krjsr4aqbb5 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240719@192020.6809 2826pma5ip84us7krjsr4aqbb5 Query : use flama_phc
20240719@192020.6812 2826pma5ip84us7krjsr4aqbb5 Query : select top 1 1 valor from td where td.ndoc = 39
20240719@192020.6822 2826pma5ip84us7krjsr4aqbb5 Query : use flama_phc
20240719@192020.6825 2826pma5ip84us7krjsr4aqbb5 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240719@192020.6842 2826pma5ip84us7krjsr4aqbb5 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240719@192020.6858 2826pma5ip84us7krjsr4aqbb5 Query : use flama_phc
20240719@192020.6860 2826pma5ip84us7krjsr4aqbb5 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240719@192020.6870 2826pma5ip84us7krjsr4aqbb5 Query : use flama_phc
20240719@192020.6873 2826pma5ip84us7krjsr4aqbb5 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240719@192020.6883 2826pma5ip84us7krjsr4aqbb5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1050';
20240719@192020.6899 2826pma5ip84us7krjsr4aqbb5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1050';
20240719@192020.7375 tcqhd197q2itk10ac7c14vofdb Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240719@192020.7388 tcqhd197q2itk10ac7c14vofdb Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240719@192020.7407 tcqhd197q2itk10ac7c14vofdb Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1051';
20240719@192020.7451 tcqhd197q2itk10ac7c14vofdb Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1051';
20240719@192020.7468 tcqhd197q2itk10ac7c14vofdb Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1051';
20240719@192020.7481 tcqhd197q2itk10ac7c14vofdb Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1051';
20240719@192020.7495 tcqhd197q2itk10ac7c14vofdb Query : use flama_phc
20240719@192020.7498 tcqhd197q2itk10ac7c14vofdb Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240719@192020.7513 tcqhd197q2itk10ac7c14vofdb Query : use flama_phc
20240719@192020.7516 tcqhd197q2itk10ac7c14vofdb Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240719@192020.7545 tcqhd197q2itk10ac7c14vofdb Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4421.00.1'
20240719@192020.7555 tcqhd197q2itk10ac7c14vofdb Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404815 and bi.ref ='324.4421.00.1' and bi.lordem =1
20240719@192020.7832 tcqhd197q2itk10ac7c14vofdb Query : use flama_phc
20240719@192020.7836 tcqhd197q2itk10ac7c14vofdb Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240719@192020.7853 tcqhd197q2itk10ac7c14vofdb Query : use flama_phc
20240719@192020.7856 tcqhd197q2itk10ac7c14vofdb Query : select top 1 1 valor from td where td.ndoc = 39
20240719@192020.7867 tcqhd197q2itk10ac7c14vofdb Query : use flama_phc
20240719@192020.7870 tcqhd197q2itk10ac7c14vofdb Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240719@192020.7888 tcqhd197q2itk10ac7c14vofdb Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240719@192020.7903 tcqhd197q2itk10ac7c14vofdb Query : use flama_phc
20240719@192020.7906 tcqhd197q2itk10ac7c14vofdb Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240719@192020.7917 tcqhd197q2itk10ac7c14vofdb Query : use flama_phc
20240719@192020.7920 tcqhd197q2itk10ac7c14vofdb Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240719@192020.7930 tcqhd197q2itk10ac7c14vofdb Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1051';
20240719@192020.7945 tcqhd197q2itk10ac7c14vofdb Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1051';
20240719@192020.8501 vvr52h8pb2r6sdesa1vbv1nong Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240719@192020.8517 vvr52h8pb2r6sdesa1vbv1nong Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240719@192020.8536 vvr52h8pb2r6sdesa1vbv1nong Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1052';
20240719@192020.8579 vvr52h8pb2r6sdesa1vbv1nong Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1052';
20240719@192020.8599 vvr52h8pb2r6sdesa1vbv1nong Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1052';
20240719@192020.8613 vvr52h8pb2r6sdesa1vbv1nong Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1052';
20240719@192020.8631 vvr52h8pb2r6sdesa1vbv1nong Query : use flama_phc
20240719@192020.8634 vvr52h8pb2r6sdesa1vbv1nong Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240719@192020.8649 vvr52h8pb2r6sdesa1vbv1nong Query : use flama_phc
20240719@192020.8652 vvr52h8pb2r6sdesa1vbv1nong Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240719@192020.8682 vvr52h8pb2r6sdesa1vbv1nong Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.711.00.01'
20240719@192020.8796 vvr52h8pb2r6sdesa1vbv1nong Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404816 and bi.ref ='324.711.00.01' and bi.lordem =1
20240719@192020.9063 vvr52h8pb2r6sdesa1vbv1nong Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.711.00.01'
20240719@192020.9074 vvr52h8pb2r6sdesa1vbv1nong Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404816 and bi.ref ='324.711.00.01' and bi.lordem =1
20240719@192020.9081 vvr52h8pb2r6sdesa1vbv1nong Query : use flama_phc
20240719@192020.9084 vvr52h8pb2r6sdesa1vbv1nong Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240719@192020.9097 vvr52h8pb2r6sdesa1vbv1nong Query : use flama_phc
20240719@192020.9100 vvr52h8pb2r6sdesa1vbv1nong Query : select top 1 1 valor from td where td.ndoc = 39
20240719@192020.9111 vvr52h8pb2r6sdesa1vbv1nong Query : use flama_phc
20240719@192020.9113 vvr52h8pb2r6sdesa1vbv1nong Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240719@192020.9132 vvr52h8pb2r6sdesa1vbv1nong Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240719@192020.9147 vvr52h8pb2r6sdesa1vbv1nong Query : use flama_phc
20240719@192020.9150 vvr52h8pb2r6sdesa1vbv1nong Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240719@192020.9162 vvr52h8pb2r6sdesa1vbv1nong Query : use flama_phc
20240719@192020.9164 vvr52h8pb2r6sdesa1vbv1nong Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240719@192020.9177 vvr52h8pb2r6sdesa1vbv1nong Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1052';
20240719@192020.9243 vvr52h8pb2r6sdesa1vbv1nong Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1052';
20240719@192020.9761 b9b8asqpl12gnge5ov8jerdl4p Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240719@192020.9774 b9b8asqpl12gnge5ov8jerdl4p Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240719@192020.9794 b9b8asqpl12gnge5ov8jerdl4p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1053';
20240719@192020.9897 b9b8asqpl12gnge5ov8jerdl4p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1053';
20240719@192020.9916 b9b8asqpl12gnge5ov8jerdl4p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1053';
20240719@192020.9932 b9b8asqpl12gnge5ov8jerdl4p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1053';
20240719@192020.9945 b9b8asqpl12gnge5ov8jerdl4p Query : use flama_phc
20240719@192020.9948 b9b8asqpl12gnge5ov8jerdl4p Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240719@192020.9963 b9b8asqpl12gnge5ov8jerdl4p Query : use flama_phc
20240719@192020.9966 b9b8asqpl12gnge5ov8jerdl4p Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240719@192020.9995 b9b8asqpl12gnge5ov8jerdl4p Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '326.595.00.01'
20240719@192021.1000 b9b8asqpl12gnge5ov8jerdl4p Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404817 and bi.ref ='326.595.00.01' and bi.lordem =1
20240719@192021.3650 b9b8asqpl12gnge5ov8jerdl4p Query : use flama_phc
20240719@192021.3680 b9b8asqpl12gnge5ov8jerdl4p Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240719@192021.3810 b9b8asqpl12gnge5ov8jerdl4p Query : use flama_phc
20240719@192021.3840 b9b8asqpl12gnge5ov8jerdl4p Query : select top 1 1 valor from td where td.ndoc = 39
20240719@192021.3950 b9b8asqpl12gnge5ov8jerdl4p Query : use flama_phc
20240719@192021.3980 b9b8asqpl12gnge5ov8jerdl4p Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240719@192021.4210 b9b8asqpl12gnge5ov8jerdl4p Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240719@192021.4360 b9b8asqpl12gnge5ov8jerdl4p Query : use flama_phc
20240719@192021.4390 b9b8asqpl12gnge5ov8jerdl4p Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240719@192021.4500 b9b8asqpl12gnge5ov8jerdl4p Query : use flama_phc
20240719@192021.4530 b9b8asqpl12gnge5ov8jerdl4p Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240719@192021.4630 b9b8asqpl12gnge5ov8jerdl4p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1053';
20240719@192021.4780 b9b8asqpl12gnge5ov8jerdl4p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1053';
20240719@192021.9380 i5q4j2cthvf188do66v5blpjgf Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240719@192021.9510 i5q4j2cthvf188do66v5blpjgf Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240719@192021.9700 i5q4j2cthvf188do66v5blpjgf Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1054';
20240719@192021.1013 i5q4j2cthvf188do66v5blpjgf Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1054';
20240719@192021.1029 i5q4j2cthvf188do66v5blpjgf Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1054';
20240719@192021.1042 i5q4j2cthvf188do66v5blpjgf Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1054';
20240719@192021.1057 i5q4j2cthvf188do66v5blpjgf Query : use flama_phc
20240719@192021.1060 i5q4j2cthvf188do66v5blpjgf Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240719@192021.1075 i5q4j2cthvf188do66v5blpjgf Query : use flama_phc
20240719@192021.1078 i5q4j2cthvf188do66v5blpjgf Query : select no, estab,szadrsdesc from szadrs where u_coddest=4779
20240719@192021.1142 i5q4j2cthvf188do66v5blpjgf Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.422.00.07'
20240719@192021.1244 i5q4j2cthvf188do66v5blpjgf Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404818 and bi.ref ='304.422.00.07' and bi.lordem =1
20240719@192021.1522 i5q4j2cthvf188do66v5blpjgf Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.421.00.04'
20240719@192021.1619 i5q4j2cthvf188do66v5blpjgf Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404818 and bi.ref ='304.421.00.04' and bi.lordem =2
20240719@192021.1919 i5q4j2cthvf188do66v5blpjgf Query : use flama_phc
20240719@192021.1923 i5q4j2cthvf188do66v5blpjgf Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240719@192021.1937 i5q4j2cthvf188do66v5blpjgf Query : use flama_phc
20240719@192021.1940 i5q4j2cthvf188do66v5blpjgf Query : select top 1 1 valor from td where td.ndoc = 39
20240719@192021.1951 i5q4j2cthvf188do66v5blpjgf Query : use flama_phc
20240719@192021.1954 i5q4j2cthvf188do66v5blpjgf Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240719@192021.1972 i5q4j2cthvf188do66v5blpjgf Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240719@192021.1986 i5q4j2cthvf188do66v5blpjgf Query : use flama_phc
20240719@192021.1989 i5q4j2cthvf188do66v5blpjgf Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240719@192021.2001 i5q4j2cthvf188do66v5blpjgf Query : use flama_phc
20240719@192021.2003 i5q4j2cthvf188do66v5blpjgf Query : select szadrsstamp valor from szadrs where szadrsdesc='101900 - pd - alcochete'
20240719@192021.2015 i5q4j2cthvf188do66v5blpjgf Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1054';
20240719@192021.2031 i5q4j2cthvf188do66v5blpjgf Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1054';
20240719@192021.2505 ktt5na7236dianhe5vpk1kplb2 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240719@192021.2517 ktt5na7236dianhe5vpk1kplb2 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240719@192021.2535 ktt5na7236dianhe5vpk1kplb2 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1055';
20240719@192021.2577 ktt5na7236dianhe5vpk1kplb2 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1055';
20240719@192021.2594 ktt5na7236dianhe5vpk1kplb2 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1055';
20240719@192021.2607 ktt5na7236dianhe5vpk1kplb2 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1055';
20240719@192021.2621 ktt5na7236dianhe5vpk1kplb2 Query : use flama_phc
20240719@192021.2624 ktt5na7236dianhe5vpk1kplb2 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240719@192021.2646 ktt5na7236dianhe5vpk1kplb2 Query : use flama_phc
20240719@192021.2649 ktt5na7236dianhe5vpk1kplb2 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4774
20240719@192021.2718 ktt5na7236dianhe5vpk1kplb2 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1461.00.1'
20240719@192021.2824 ktt5na7236dianhe5vpk1kplb2 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404819 and bi.ref ='324.1461.00.1' and bi.lordem =1
20240719@192021.3111 ktt5na7236dianhe5vpk1kplb2 Query : use flama_phc
20240719@192021.3114 ktt5na7236dianhe5vpk1kplb2 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240719@192021.3127 ktt5na7236dianhe5vpk1kplb2 Query : use flama_phc
20240719@192021.3130 ktt5na7236dianhe5vpk1kplb2 Query : select top 1 1 valor from td where td.ndoc = 39
20240719@192021.3140 ktt5na7236dianhe5vpk1kplb2 Query : use flama_phc
20240719@192021.3143 ktt5na7236dianhe5vpk1kplb2 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240719@192021.3163 ktt5na7236dianhe5vpk1kplb2 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240719@192021.3178 ktt5na7236dianhe5vpk1kplb2 Query : use flama_phc
20240719@192021.3180 ktt5na7236dianhe5vpk1kplb2 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240719@192021.3191 ktt5na7236dianhe5vpk1kplb2 Query : use flama_phc
20240719@192021.3194 ktt5na7236dianhe5vpk1kplb2 Query : select szadrsstamp valor from szadrs where szadrsdesc='100800 - modelo continente hipermercados, sa'
20240719@192021.3207 ktt5na7236dianhe5vpk1kplb2 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1055';
20240719@192021.3222 ktt5na7236dianhe5vpk1kplb2 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1055';
20240719@192021.3663 fm7gfo5moj1p44108p650o6ur6 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240719@192021.3677 fm7gfo5moj1p44108p650o6ur6 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240719@192021.3695 fm7gfo5moj1p44108p650o6ur6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1056';
20240719@192021.3744 fm7gfo5moj1p44108p650o6ur6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1056';
20240719@192021.3761 fm7gfo5moj1p44108p650o6ur6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1056';
20240719@192021.3773 fm7gfo5moj1p44108p650o6ur6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1056';
20240719@192021.3787 fm7gfo5moj1p44108p650o6ur6 Query : use flama_phc
20240719@192021.3790 fm7gfo5moj1p44108p650o6ur6 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240719@192021.3804 fm7gfo5moj1p44108p650o6ur6 Query : use flama_phc
20240719@192021.3807 fm7gfo5moj1p44108p650o6ur6 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240719@192021.3835 fm7gfo5moj1p44108p650o6ur6 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1667.00.1'
20240719@192021.3935 fm7gfo5moj1p44108p650o6ur6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404820 and bi.ref ='324.1667.00.1' and bi.lordem =1
20240719@192021.4199 fm7gfo5moj1p44108p650o6ur6 Query : use flama_phc
20240719@192021.4202 fm7gfo5moj1p44108p650o6ur6 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240719@192021.4215 fm7gfo5moj1p44108p650o6ur6 Query : use flama_phc
20240719@192021.4218 fm7gfo5moj1p44108p650o6ur6 Query : select top 1 1 valor from td where td.ndoc = 39
20240719@192021.4228 fm7gfo5moj1p44108p650o6ur6 Query : use flama_phc
20240719@192021.4230 fm7gfo5moj1p44108p650o6ur6 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240719@192021.4250 fm7gfo5moj1p44108p650o6ur6 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240719@192021.4265 fm7gfo5moj1p44108p650o6ur6 Query : use flama_phc
20240719@192021.4267 fm7gfo5moj1p44108p650o6ur6 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240719@192021.4281 fm7gfo5moj1p44108p650o6ur6 Query : use flama_phc
20240719@192021.4284 fm7gfo5moj1p44108p650o6ur6 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240719@192021.4294 fm7gfo5moj1p44108p650o6ur6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1056';
20240719@192021.4309 fm7gfo5moj1p44108p650o6ur6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1056';
20240719@192021.4795 hngcc375pc97kqh1es2mhl4og2 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240719@192021.4809 hngcc375pc97kqh1es2mhl4og2 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240719@192021.5974 hngcc375pc97kqh1es2mhl4og2 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1057';
20240719@192021.6017 hngcc375pc97kqh1es2mhl4og2 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1057';
20240719@192021.6037 hngcc375pc97kqh1es2mhl4og2 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1057';
20240719@192021.6053 hngcc375pc97kqh1es2mhl4og2 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1057';
20240719@192021.6069 hngcc375pc97kqh1es2mhl4og2 Query : use flama_phc
20240719@192021.6072 hngcc375pc97kqh1es2mhl4og2 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240719@192021.6087 hngcc375pc97kqh1es2mhl4og2 Query : use flama_phc
20240719@192021.6090 hngcc375pc97kqh1es2mhl4og2 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240719@192021.6119 hngcc375pc97kqh1es2mhl4og2 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4910.00.1'
20240719@192021.6225 hngcc375pc97kqh1es2mhl4og2 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404821 and bi.ref ='324.4910.00.1' and bi.lordem =1
20240719@192021.6503 hngcc375pc97kqh1es2mhl4og2 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4910.00.1'
20240719@192021.6514 hngcc375pc97kqh1es2mhl4og2 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404821 and bi.ref ='324.4910.00.1' and bi.lordem =1
20240719@192021.6521 hngcc375pc97kqh1es2mhl4og2 Query : use flama_phc
20240719@192021.6524 hngcc375pc97kqh1es2mhl4og2 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240719@192021.6537 hngcc375pc97kqh1es2mhl4og2 Query : use flama_phc
20240719@192021.6540 hngcc375pc97kqh1es2mhl4og2 Query : select top 1 1 valor from td where td.ndoc = 39
20240719@192021.6550 hngcc375pc97kqh1es2mhl4og2 Query : use flama_phc
20240719@192021.6553 hngcc375pc97kqh1es2mhl4og2 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240719@192021.6570 hngcc375pc97kqh1es2mhl4og2 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240719@192021.6586 hngcc375pc97kqh1es2mhl4og2 Query : use flama_phc
20240719@192021.6589 hngcc375pc97kqh1es2mhl4og2 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240719@192021.6600 hngcc375pc97kqh1es2mhl4og2 Query : use flama_phc
20240719@192021.6603 hngcc375pc97kqh1es2mhl4og2 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240719@192021.6614 hngcc375pc97kqh1es2mhl4og2 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1057';
20240719@192021.6629 hngcc375pc97kqh1es2mhl4og2 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1057';
20240719@192021.7110 nvnrgi7jt80cg3bvmfbiafl633 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240719@192021.7122 nvnrgi7jt80cg3bvmfbiafl633 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240719@192021.7142 nvnrgi7jt80cg3bvmfbiafl633 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1058';
20240719@192021.7183 nvnrgi7jt80cg3bvmfbiafl633 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1058';
20240719@192021.7200 nvnrgi7jt80cg3bvmfbiafl633 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1058';
20240719@192021.7214 nvnrgi7jt80cg3bvmfbiafl633 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1058';
20240719@192021.7228 nvnrgi7jt80cg3bvmfbiafl633 Query : use flama_phc
20240719@192021.7231 nvnrgi7jt80cg3bvmfbiafl633 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240719@192021.7247 nvnrgi7jt80cg3bvmfbiafl633 Query : use flama_phc
20240719@192021.7250 nvnrgi7jt80cg3bvmfbiafl633 Query : select no, estab,szadrsdesc from szadrs where u_coddest=6917
20240719@192021.7320 nvnrgi7jt80cg3bvmfbiafl633 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.600.94.01'
20240719@192021.7422 nvnrgi7jt80cg3bvmfbiafl633 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404822 and bi.ref ='324.600.94.01' and bi.lordem =1
20240719@192021.7697 nvnrgi7jt80cg3bvmfbiafl633 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2000.94.1'
20240719@192021.7792 nvnrgi7jt80cg3bvmfbiafl633 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404822 and bi.ref ='324.2000.94.1' and bi.lordem =2
20240719@192021.8067 nvnrgi7jt80cg3bvmfbiafl633 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.900.94.01'
20240719@192021.8235 nvnrgi7jt80cg3bvmfbiafl633 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404822 and bi.ref ='324.900.94.01' and bi.lordem =3
20240719@192021.8507 nvnrgi7jt80cg3bvmfbiafl633 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.700.94.01'
20240719@192021.8607 nvnrgi7jt80cg3bvmfbiafl633 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404822 and bi.ref ='324.700.94.01' and bi.lordem =4
20240719@192021.8940 nvnrgi7jt80cg3bvmfbiafl633 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2200.94.1'
20240719@192021.9044 nvnrgi7jt80cg3bvmfbiafl633 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404822 and bi.ref ='324.2200.94.1' and bi.lordem =5
20240719@192021.9322 nvnrgi7jt80cg3bvmfbiafl633 Query : use flama_phc
20240719@192021.9325 nvnrgi7jt80cg3bvmfbiafl633 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240719@192021.9338 nvnrgi7jt80cg3bvmfbiafl633 Query : use flama_phc
20240719@192021.9341 nvnrgi7jt80cg3bvmfbiafl633 Query : select top 1 1 valor from td where td.ndoc = 39
20240719@192021.9363 nvnrgi7jt80cg3bvmfbiafl633 Query : use flama_phc
20240719@192021.9366 nvnrgi7jt80cg3bvmfbiafl633 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240719@192021.9384 nvnrgi7jt80cg3bvmfbiafl633 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240719@192021.9400 nvnrgi7jt80cg3bvmfbiafl633 Query : use flama_phc
20240719@192021.9402 nvnrgi7jt80cg3bvmfbiafl633 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240719@192021.9414 nvnrgi7jt80cg3bvmfbiafl633 Query : use flama_phc
20240719@192021.9417 nvnrgi7jt80cg3bvmfbiafl633 Query : select szadrsstamp valor from szadrs where szadrsdesc='740 ent vnr bligeiro'
20240719@192021.9429 nvnrgi7jt80cg3bvmfbiafl633 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1058';
20240719@192021.9444 nvnrgi7jt80cg3bvmfbiafl633 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1058';
20240719@192021.9984 j61ghnscpu6ob4713amgcbqc07 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240719@192021.9997 j61ghnscpu6ob4713amgcbqc07 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240719@192022.1700 j61ghnscpu6ob4713amgcbqc07 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1059';
20240719@192022.6100 j61ghnscpu6ob4713amgcbqc07 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1059';
20240719@192022.9600 j61ghnscpu6ob4713amgcbqc07 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1059';
20240719@192022.1120 j61ghnscpu6ob4713amgcbqc07 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1059';
20240719@192022.1270 j61ghnscpu6ob4713amgcbqc07 Query : use flama_phc
20240719@192022.1300 j61ghnscpu6ob4713amgcbqc07 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240719@192022.1450 j61ghnscpu6ob4713amgcbqc07 Query : use flama_phc
20240719@192022.1480 j61ghnscpu6ob4713amgcbqc07 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240719@192022.1790 j61ghnscpu6ob4713amgcbqc07 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.657.00.01'
20240719@192022.2830 j61ghnscpu6ob4713amgcbqc07 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404823 and bi.ref ='324.657.00.01' and bi.lordem =1
20240719@192022.1591 j61ghnscpu6ob4713amgcbqc07 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.657.00.01'
20240719@192022.1603 j61ghnscpu6ob4713amgcbqc07 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404823 and bi.ref ='324.657.00.01' and bi.lordem =1
20240719@192022.1613 j61ghnscpu6ob4713amgcbqc07 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.657.00.01'
20240719@192022.1622 j61ghnscpu6ob4713amgcbqc07 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404823 and bi.ref ='324.657.00.01' and bi.lordem =1
20240719@192022.1629 j61ghnscpu6ob4713amgcbqc07 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.657.00.01'
20240719@192022.1639 j61ghnscpu6ob4713amgcbqc07 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404823 and bi.ref ='324.657.00.01' and bi.lordem =1
20240719@192022.1645 j61ghnscpu6ob4713amgcbqc07 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.657.00.01'
20240719@192022.1656 j61ghnscpu6ob4713amgcbqc07 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404823 and bi.ref ='324.657.00.01' and bi.lordem =1
20240719@192022.1662 j61ghnscpu6ob4713amgcbqc07 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.657.00.01'
20240719@192022.1671 j61ghnscpu6ob4713amgcbqc07 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2048 and bo.obrano = 2404823 and bi.ref ='324.657.00.01' and bi.lordem =1
20240719@192022.1677 j61ghnscpu6ob4713amgcbqc07 Query : use flama_phc
20240719@192022.1680 j61ghnscpu6ob4713amgcbqc07 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240719@192022.1693 j61ghnscpu6ob4713amgcbqc07 Query : use flama_phc
20240719@192022.1696 j61ghnscpu6ob4713amgcbqc07 Query : select top 1 1 valor from td where td.ndoc = 39
20240719@192022.1706 j61ghnscpu6ob4713amgcbqc07 Query : use flama_phc
20240719@192022.1709 j61ghnscpu6ob4713amgcbqc07 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20240719@192022.1727 j61ghnscpu6ob4713amgcbqc07 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
