20240605@074549.8705 0pmuif2o1bq7d391dbuv6iobpe INICIO DE FICHEIRO DE LOG :: /var/www/webservices/logs/website.sql.log
20240605@074549.8702 0pmuif2o1bq7d391dbuv6iobpe Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='214';
20240605@074549.8756 0pmuif2o1bq7d391dbuv6iobpe Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='214';
20240605@074549.8767 0pmuif2o1bq7d391dbuv6iobpe Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='214';
20240605@074549.8779 0pmuif2o1bq7d391dbuv6iobpe Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='214';
20240605@074549.8790 0pmuif2o1bq7d391dbuv6iobpe Query : use flama_phc
20240605@074549.8793 0pmuif2o1bq7d391dbuv6iobpe Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240605@074549.8814 0pmuif2o1bq7d391dbuv6iobpe Query : use flama_phc
20240605@074549.8817 0pmuif2o1bq7d391dbuv6iobpe Query : select no, estab,szadrsdesc from szadrs where u_coddest=2915
20240605@074549.9119 0pmuif2o1bq7d391dbuv6iobpe 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'
20240605@074549.9511 0pmuif2o1bq7d391dbuv6iobpe Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403918 and bi.ref ='324.691.00.01' and bi.lordem =1
20240605@074550.2710 0pmuif2o1bq7d391dbuv6iobpe 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'
20240605@074550.4590 0pmuif2o1bq7d391dbuv6iobpe Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403918 and bi.ref ='324.691.00.01' and bi.lordem =1
20240605@074550.4670 0pmuif2o1bq7d391dbuv6iobpe Query : use flama_phc
20240605@074550.4700 0pmuif2o1bq7d391dbuv6iobpe Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240605@074550.6430 0pmuif2o1bq7d391dbuv6iobpe Query : use flama_phc
20240605@074550.6620 0pmuif2o1bq7d391dbuv6iobpe Query : select top 1 1 valor from td where td.ndoc = 39
20240605@074550.8050 0pmuif2o1bq7d391dbuv6iobpe Query : use flama_phc
20240605@074550.8520 0pmuif2o1bq7d391dbuv6iobpe 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')
20240605@074550.3074 rqt9car807dp4hlut4hk02r4f5 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240605@074550.3652 rqt9car807dp4hlut4hk02r4f5 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240605@074550.3855 rqt9car807dp4hlut4hk02r4f5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='215';
20240605@074550.3941 rqt9car807dp4hlut4hk02r4f5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='215';
20240605@074550.3953 rqt9car807dp4hlut4hk02r4f5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='215';
20240605@074550.4147 rqt9car807dp4hlut4hk02r4f5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='215';
20240605@074550.4231 rqt9car807dp4hlut4hk02r4f5 Query : use flama_phc
20240605@074550.4272 rqt9car807dp4hlut4hk02r4f5 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240605@074550.4484 rqt9car807dp4hlut4hk02r4f5 Query : use flama_phc
20240605@074550.4524 rqt9car807dp4hlut4hk02r4f5 Query : select no, estab,szadrsdesc from szadrs where u_coddest=2448
20240605@074550.4879 rqt9car807dp4hlut4hk02r4f5 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'
20240605@074550.4891 rqt9car807dp4hlut4hk02r4f5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403920 and bi.ref ='304.422.00.07' and bi.lordem =1
20240605@074550.5413 rqt9car807dp4hlut4hk02r4f5 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4960.00.1'
20240605@074550.5608 rqt9car807dp4hlut4hk02r4f5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403920 and bi.ref ='324.4960.00.1' and bi.lordem =2
20240605@074550.6301 rqt9car807dp4hlut4hk02r4f5 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'
20240605@074550.6738 rqt9car807dp4hlut4hk02r4f5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403920 and bi.ref ='324.969.00.01' and bi.lordem =3
20240605@074550.7425 rqt9car807dp4hlut4hk02r4f5 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'
20240605@074550.7437 rqt9car807dp4hlut4hk02r4f5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403920 and bi.ref ='324.969.00.01' and bi.lordem =3
20240605@074550.7445 rqt9car807dp4hlut4hk02r4f5 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'
20240605@074550.7709 rqt9car807dp4hlut4hk02r4f5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403920 and bi.ref ='324.1608.00.1' and bi.lordem =4
20240605@074550.8386 rqt9car807dp4hlut4hk02r4f5 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.5540.00.1'
20240605@074550.8597 rqt9car807dp4hlut4hk02r4f5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403920 and bi.ref ='324.5540.00.1' and bi.lordem =5
20240605@074551.5350 rqt9car807dp4hlut4hk02r4f5 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'
20240605@074551.8720 rqt9car807dp4hlut4hk02r4f5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403920 and bi.ref ='324.2232.00.1' and bi.lordem =6
20240605@074551.1477 rqt9car807dp4hlut4hk02r4f5 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'
20240605@074551.1848 rqt9car807dp4hlut4hk02r4f5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403920 and bi.ref ='324.1706.00.1' and bi.lordem =7
20240605@074551.2599 rqt9car807dp4hlut4hk02r4f5 Query : use flama_phc
20240605@074551.2640 rqt9car807dp4hlut4hk02r4f5 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240605@074551.2743 rqt9car807dp4hlut4hk02r4f5 Query : use flama_phc
20240605@074551.2747 rqt9car807dp4hlut4hk02r4f5 Query : select top 1 1 valor from td where td.ndoc = 39
20240605@074551.2895 rqt9car807dp4hlut4hk02r4f5 Query : use flama_phc
20240605@074551.2934 rqt9car807dp4hlut4hk02r4f5 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')
20240605@074551.4028 ld25nub0uvqqrlptup79rl9l5m Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240605@074551.4042 ld25nub0uvqqrlptup79rl9l5m Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240605@074551.4061 ld25nub0uvqqrlptup79rl9l5m Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='216';
20240605@074551.4155 ld25nub0uvqqrlptup79rl9l5m Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='216';
20240605@074551.4175 ld25nub0uvqqrlptup79rl9l5m Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='216';
20240605@074551.4309 ld25nub0uvqqrlptup79rl9l5m Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='216';
20240605@074551.4362 ld25nub0uvqqrlptup79rl9l5m Query : use flama_phc
20240605@074551.4367 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240605@074551.4400 ld25nub0uvqqrlptup79rl9l5m Query : use flama_phc
20240605@074551.4403 ld25nub0uvqqrlptup79rl9l5m Query : select no, estab,szadrsdesc from szadrs where u_coddest=2138
20240605@074551.4434 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074551.4444 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.1706.00.1' and bi.lordem =1
20240605@074551.4754 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1834.00.1'
20240605@074551.4765 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.1834.00.1' and bi.lordem =2
20240605@074551.5100 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074551.5111 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.5347.00.1' and bi.lordem =3
20240605@074551.5423 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074551.5433 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.1675.00.2' and bi.lordem =4
20240605@074551.5753 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074551.5763 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.1675.00.2' and bi.lordem =4
20240605@074551.5769 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074551.5779 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.1608.00.1' and bi.lordem =5
20240605@074551.6103 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '328.9335.00.1'
20240605@074551.6245 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='328.9335.00.1' and bi.lordem =6
20240605@074551.6570 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1470.00.1'
20240605@074551.6581 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.1470.00.1' and bi.lordem =7
20240605@074551.6909 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074551.7067 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.1837.00.1' and bi.lordem =8
20240605@074551.7384 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.5540.00.1'
20240605@074551.7395 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.5540.00.1' and bi.lordem =9
20240605@074551.7708 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.5540.00.1'
20240605@074551.7718 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.5540.00.1' and bi.lordem =9
20240605@074551.7725 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074551.7736 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='304.4860.00.1' and bi.lordem =10
20240605@074551.8058 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074551.8324 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.1406.00.1' and bi.lordem =11
20240605@074551.8683 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1462.00.1'
20240605@074551.8694 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.1462.00.1' and bi.lordem =12
20240605@074551.9012 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074551.9153 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.5500.00.1' and bi.lordem =13
20240605@074551.9473 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074551.9612 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.727.00.01' and bi.lordem =14
20240605@074551.9930 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074551.9941 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.1879.00.1' and bi.lordem =15
20240605@074552.2780 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074552.2880 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.1684.00.1' and bi.lordem =16
20240605@074552.6130 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074552.7580 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.4980.00.1' and bi.lordem =17
20240605@074552.1104 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074552.1288 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.4910.00.1' and bi.lordem =18
20240605@074552.1613 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4930.00.1'
20240605@074552.1751 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.4930.00.1' and bi.lordem =19
20240605@074552.2069 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074552.2211 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.4988.00.1' and bi.lordem =20
20240605@074552.2683 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074552.2694 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.711.00.01' and bi.lordem =21
20240605@074552.3009 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074552.3149 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.1646.00.1' and bi.lordem =22
20240605@074552.3462 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1407.00.1'
20240605@074552.3601 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.1407.00.1' and bi.lordem =23
20240605@074552.3921 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2223.00.1'
20240605@074552.4064 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.2223.00.1' and bi.lordem =24
20240605@074552.4380 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2224.00.1'
20240605@074552.4517 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.2224.00.1' and bi.lordem =25
20240605@074552.4835 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2221.00.1'
20240605@074552.4976 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.2221.00.1' and bi.lordem =26
20240605@074552.5335 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2222.00.1'
20240605@074552.5512 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.2222.00.1' and bi.lordem =27
20240605@074552.5818 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2160.00.1'
20240605@074552.5954 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.2160.00.1' and bi.lordem =28
20240605@074552.6270 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074552.6409 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.1293.00.1' and bi.lordem =29
20240605@074552.6737 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1221.00.1'
20240605@074552.6889 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.1221.00.1' and bi.lordem =30
20240605@074552.7210 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1643.00.1'
20240605@074552.7223 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.1643.00.1' and bi.lordem =31
20240605@074552.7564 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074552.7706 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.5501.00.1' and bi.lordem =32
20240605@074552.8086 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1831.00.2'
20240605@074552.8098 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.1831.00.2' and bi.lordem =33
20240605@074552.8690 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074552.8935 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.1832.00.2' and bi.lordem =34
20240605@074552.9811 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074552.9961 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.1833.00.2' and bi.lordem =35
20240605@074553.2770 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.945.00.01'
20240605@074553.4160 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.945.00.01' and bi.lordem =36
20240605@074553.7640 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1847.00.1'
20240605@074553.9070 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.1847.00.1' and bi.lordem =37
20240605@074553.1216 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1889.00.1'
20240605@074553.1355 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.1889.00.1' and bi.lordem =38
20240605@074553.1677 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074553.1832 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.657.00.01' and bi.lordem =39
20240605@074553.2142 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074553.2284 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.682.00.01' and bi.lordem =40
20240605@074553.3089 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074553.3760 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.692.00.01' and bi.lordem =41
20240605@074553.4721 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4968.00.1'
20240605@074553.4863 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.4968.00.1' and bi.lordem =42
20240605@074553.5184 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074553.5195 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.4965.00.1' and bi.lordem =43
20240605@074553.5507 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074553.5655 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.4966.00.1' and bi.lordem =44
20240605@074553.6035 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4967.00.1'
20240605@074553.6182 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.4967.00.1' and bi.lordem =45
20240605@074553.6486 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074553.6623 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='328.9902.00.1' and bi.lordem =46
20240605@074553.6951 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.5361.00.1'
20240605@074553.7093 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.5361.00.1' and bi.lordem =47
20240605@074553.7410 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.5365.00.1'
20240605@074553.7553 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.5365.00.1' and bi.lordem =48
20240605@074553.7865 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.5396.00.1'
20240605@074553.7876 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.5396.00.1' and bi.lordem =49
20240605@074553.8192 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074553.8203 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.698.00.01' and bi.lordem =50
20240605@074553.8514 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.946.00.01'
20240605@074553.8524 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.946.00.01' and bi.lordem =51
20240605@074553.8831 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074553.8841 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.1805.00.1' and bi.lordem =52
20240605@074553.9208 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074553.9219 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.1805.00.1' and bi.lordem =52
20240605@074553.9226 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074553.9236 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.2232.00.1' and bi.lordem =53
20240605@074553.9545 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20240605@074553.9556 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.645.00.01' and bi.lordem =54
20240605@074553.9906 ld25nub0uvqqrlptup79rl9l5m 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'
20240605@074554.6000 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403921 and bi.ref ='324.646.00.01' and bi.lordem =55
20240605@074554.3710 ld25nub0uvqqrlptup79rl9l5m Query : use flama_phc
20240605@074554.3750 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240605@074554.3910 ld25nub0uvqqrlptup79rl9l5m Query : use flama_phc
20240605@074554.3940 ld25nub0uvqqrlptup79rl9l5m Query : select top 1 1 valor from td where td.ndoc = 39
20240605@074554.4050 ld25nub0uvqqrlptup79rl9l5m Query : use flama_phc
20240605@074554.4080 ld25nub0uvqqrlptup79rl9l5m 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')
20240605@074554.9020 e5i2k0l59colieertkohbe61jd Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240605@074554.9160 e5i2k0l59colieertkohbe61jd Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240605@074554.9300 e5i2k0l59colieertkohbe61jd Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='217';
20240605@074554.9660 e5i2k0l59colieertkohbe61jd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='217';
20240605@074554.9770 e5i2k0l59colieertkohbe61jd Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='217';
20240605@074554.9870 e5i2k0l59colieertkohbe61jd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='217';
20240605@074554.1040 e5i2k0l59colieertkohbe61jd Query : use flama_phc
20240605@074554.1043 e5i2k0l59colieertkohbe61jd Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240605@074554.1058 e5i2k0l59colieertkohbe61jd Query : use flama_phc
20240605@074554.1061 e5i2k0l59colieertkohbe61jd Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240605@074554.1093 e5i2k0l59colieertkohbe61jd Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.945.00.01'
20240605@074554.1103 e5i2k0l59colieertkohbe61jd Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403922 and bi.ref ='324.945.00.01' and bi.lordem =1
20240605@074554.1423 e5i2k0l59colieertkohbe61jd Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.945.00.01'
20240605@074554.1434 e5i2k0l59colieertkohbe61jd Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403922 and bi.ref ='324.945.00.01' and bi.lordem =1
20240605@074554.1441 e5i2k0l59colieertkohbe61jd Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.945.00.01'
20240605@074554.1451 e5i2k0l59colieertkohbe61jd Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403922 and bi.ref ='324.945.00.01' and bi.lordem =1
20240605@074554.1457 e5i2k0l59colieertkohbe61jd Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.945.00.01'
20240605@074554.1465 e5i2k0l59colieertkohbe61jd Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403922 and bi.ref ='324.945.00.01' and bi.lordem =1
20240605@074554.1473 e5i2k0l59colieertkohbe61jd Query : use flama_phc
20240605@074554.1485 e5i2k0l59colieertkohbe61jd Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240605@074554.1497 e5i2k0l59colieertkohbe61jd Query : use flama_phc
20240605@074554.1500 e5i2k0l59colieertkohbe61jd Query : select top 1 1 valor from td where td.ndoc = 39
20240605@074554.1511 e5i2k0l59colieertkohbe61jd Query : use flama_phc
20240605@074554.1514 e5i2k0l59colieertkohbe61jd 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')
20240605@081910.1430 2uj5bnv2nk8ljl15nslbg8eleu Query : use flama_phc
20240605@081910.1444 2uj5bnv2nk8ljl15nslbg8eleu Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@081910.1523 2uj5bnv2nk8ljl15nslbg8eleu Query : use flama_phc
20240605@081910.1527 2uj5bnv2nk8ljl15nslbg8eleu Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@083610.5449 h2h3sdgc1sreg17fqob1plkr5r Query : use flama_phc
20240605@083610.5455 h2h3sdgc1sreg17fqob1plkr5r Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@083610.5518 h2h3sdgc1sreg17fqob1plkr5r Query : use flama_phc
20240605@083610.5522 h2h3sdgc1sreg17fqob1plkr5r Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@091909.2216 eaf76douamvmjub2jiupfup808 Query : use flama_phc
20240605@091909.2221 eaf76douamvmjub2jiupfup808 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@091909.2276 eaf76douamvmjub2jiupfup808 Query : use flama_phc
20240605@091909.2279 eaf76douamvmjub2jiupfup808 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@093609.3443 6nu6h9kauk317o8cnc3gb9cbn0 Query : use flama_phc
20240605@093609.3448 6nu6h9kauk317o8cnc3gb9cbn0 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@093609.3467 6nu6h9kauk317o8cnc3gb9cbn0 Query : use flama_phc
20240605@093609.3471 6nu6h9kauk317o8cnc3gb9cbn0 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@101909.3928 olrnpscrgg8jfq57udavjls6d8 Query : use flama_phc
20240605@101909.3934 olrnpscrgg8jfq57udavjls6d8 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@101909.3952 olrnpscrgg8jfq57udavjls6d8 Query : use flama_phc
20240605@101909.3955 olrnpscrgg8jfq57udavjls6d8 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@103609.6257 gi18rimu8cbo9334rtmgtrcqvd Query : use flama_phc
20240605@103609.6262 gi18rimu8cbo9334rtmgtrcqvd Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@103609.6279 gi18rimu8cbo9334rtmgtrcqvd Query : use flama_phc
20240605@103609.6299 gi18rimu8cbo9334rtmgtrcqvd Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@111909.3127 pulp6vvbjcf58hu2aa5b8i7s1v Query : use flama_phc
20240605@111909.3139 pulp6vvbjcf58hu2aa5b8i7s1v Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@111909.3647 pulp6vvbjcf58hu2aa5b8i7s1v Query : use flama_phc
20240605@111909.3725 pulp6vvbjcf58hu2aa5b8i7s1v Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@113608.9158 o2a1f1mnfjt55jc6645t5j0eod Query : use flama_phc
20240605@113608.9164 o2a1f1mnfjt55jc6645t5j0eod Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@113608.9182 o2a1f1mnfjt55jc6645t5j0eod Query : use flama_phc
20240605@113608.9185 o2a1f1mnfjt55jc6645t5j0eod Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@121913.6440 ktddtmsmmdqjkovnui1d228221 Query : use flama_phc
20240605@121913.6490 ktddtmsmmdqjkovnui1d228221 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@121913.6670 ktddtmsmmdqjkovnui1d228221 Query : use flama_phc
20240605@121913.6700 ktddtmsmmdqjkovnui1d228221 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@123612.9474 73s599121lc3nto4ejocbehevf Query : use flama_phc
20240605@123612.9480 73s599121lc3nto4ejocbehevf Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@123612.9546 73s599121lc3nto4ejocbehevf Query : use flama_phc
20240605@123612.9549 73s599121lc3nto4ejocbehevf Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@131910.6510 eabn0gfj17v1m8dfn880nhn1d1 Query : use flama_phc
20240605@131910.6570 eabn0gfj17v1m8dfn880nhn1d1 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@131910.6780 eabn0gfj17v1m8dfn880nhn1d1 Query : use flama_phc
20240605@131910.6820 eabn0gfj17v1m8dfn880nhn1d1 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@133609.6421 gdv20r7chr6falb354c1jvtrbt Query : use flama_phc
20240605@133609.6426 gdv20r7chr6falb354c1jvtrbt Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@133609.6445 gdv20r7chr6falb354c1jvtrbt Query : use flama_phc
20240605@133609.6447 gdv20r7chr6falb354c1jvtrbt Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@141912.7870 b9g9h50pbdhp09iv0t78jl70qt Query : use flama_phc
20240605@141912.7876 b9g9h50pbdhp09iv0t78jl70qt Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@141912.8259 b9g9h50pbdhp09iv0t78jl70qt Query : use flama_phc
20240605@141912.8337 b9g9h50pbdhp09iv0t78jl70qt Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@143612.9726 h58qhnl6q8e9qclea6e2c150lr Query : use flama_phc
20240605@143612.9732 h58qhnl6q8e9qclea6e2c150lr Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@143612.9753 h58qhnl6q8e9qclea6e2c150lr Query : use flama_phc
20240605@143612.9756 h58qhnl6q8e9qclea6e2c150lr Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@144845.8989 94vvt1roam78cla92pk9gaa4bc Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240605@144845.9023 94vvt1roam78cla92pk9gaa4bc Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240605@144845.9094 94vvt1roam78cla92pk9gaa4bc Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='218';
20240605@144845.9134 94vvt1roam78cla92pk9gaa4bc Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='218';
20240605@144845.9161 94vvt1roam78cla92pk9gaa4bc Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='218';
20240605@144845.9175 94vvt1roam78cla92pk9gaa4bc Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='218';
20240605@144845.9188 94vvt1roam78cla92pk9gaa4bc Query : use flama_phc
20240605@144845.9192 94vvt1roam78cla92pk9gaa4bc Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240605@144845.9260 94vvt1roam78cla92pk9gaa4bc Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.681.00.01'
20240605@144845.9384 94vvt1roam78cla92pk9gaa4bc 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 = 2400057 and bi.ref ='324.681.00.01' and bi.lordem =20000
20240605@144845.9802 94vvt1roam78cla92pk9gaa4bc 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 = 'cps24011555542,334000002 ' 
20240605@144846.1480 94vvt1roam78cla92pk9gaa4bc Query : use flama_phc
20240605@144846.1520 94vvt1roam78cla92pk9gaa4bc Query : select top 1 1 valor from ts where ts.ndos = 61
20240605@144846.2460 94vvt1roam78cla92pk9gaa4bc Query : use flama_phc
20240605@144846.2490 94vvt1roam78cla92pk9gaa4bc 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')
20240605@144846.3310 94vvt1roam78cla92pk9gaa4bc 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
20240605@144846.4900 94vvt1roam78cla92pk9gaa4bc Query : use flama_phc
20240605@144846.4940 94vvt1roam78cla92pk9gaa4bc Query : select top 1 ~inactivo valor from fl where no = '202090' and estab = 00 order by inactivo desc
20240605@144846.5960 94vvt1roam78cla92pk9gaa4bc Query : use flama_phc
20240605@144846.5990 94vvt1roam78cla92pk9gaa4bc Query : select 1 valor from ts where ndos = 61
20240605@144846.6860 94vvt1roam78cla92pk9gaa4bc Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240605@144846.1011 94vvt1roam78cla92pk9gaa4bc Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20240605@144846.1083 94vvt1roam78cla92pk9gaa4bc Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240605@144846.1098 94vvt1roam78cla92pk9gaa4bc Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20240605@144846.1105 94vvt1roam78cla92pk9gaa4bc Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240605@144846.1117 94vvt1roam78cla92pk9gaa4bc Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20240605@144846.1124 94vvt1roam78cla92pk9gaa4bc 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
20240605@144846.1259 94vvt1roam78cla92pk9gaa4bc Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240605@144846.1366 94vvt1roam78cla92pk9gaa4bc Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240605@144846.1383 94vvt1roam78cla92pk9gaa4bc Query : use flama_phc
20240605@144846.1386 94vvt1roam78cla92pk9gaa4bc Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202090' and estab=00
20240605@144846.1474 94vvt1roam78cla92pk9gaa4bc Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240605@144846.1489 94vvt1roam78cla92pk9gaa4bc Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20240605@144846.1520 94vvt1roam78cla92pk9gaa4bc Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut666067679466606cbe21',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240605@144846.1588 94vvt1roam78cla92pk9gaa4bc Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240605@144846.1601 94vvt1roam78cla92pk9gaa4bc Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20240605@144846.1609 94vvt1roam78cla92pk9gaa4bc Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut666067679466606cbe21','--','bo',7.4167083541770885442 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240605@144846.1811 94vvt1roam78cla92pk9gaa4bc Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240605@144846.1828 94vvt1roam78cla92pk9gaa4bc Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20240605@144846.1838 94vvt1roam78cla92pk9gaa4bc 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 ('aut666067679466606cbe21','guia r. fornecedor','2024-06-05',61,2401601,?,?,?,?,?,?,?,?,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')
20240605@144846.2343 94vvt1roam78cla92pk9gaa4bc Query : use flama_phc
20240605@144846.2346 94vvt1roam78cla92pk9gaa4bc Query : select st.usalote valor from st where st.ref = '324.681.00.01'
20240605@144846.2462 94vvt1roam78cla92pk9gaa4bc 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.681.00.01'
20240605@144846.3720 94vvt1roam78cla92pk9gaa4bc Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240605@144846.3738 94vvt1roam78cla92pk9gaa4bc Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20240605@144846.3760 94vvt1roam78cla92pk9gaa4bc Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240605@144846.3775 94vvt1roam78cla92pk9gaa4bc Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20240605@144846.3784 94vvt1roam78cla92pk9gaa4bc Query : select sestamp valor from se where ref ='324.681.00.01' and lote = 'r2400057200a'
20240605@144846.3842 94vvt1roam78cla92pk9gaa4bc Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240605@144846.3857 94vvt1roam78cla92pk9gaa4bc Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20240605@144846.3865 94vvt1roam78cla92pk9gaa4bc Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240605@144846.3880 94vvt1roam78cla92pk9gaa4bc Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20240605@144846.3889 94vvt1roam78cla92pk9gaa4bc Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut666066632866606cbe5e',?,?,'20240605',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20240605@144846.4709 94vvt1roam78cla92pk9gaa4bc Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240605@144846.4756 94vvt1roam78cla92pk9gaa4bc Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240605@144846.4771 94vvt1roam78cla92pk9gaa4bc Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20240605@144846.4782 94vvt1roam78cla92pk9gaa4bc Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut666068268866606cbe74','aut666067679466606cbe21',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 = 'aut666067679466606cbe21'
20240605@144846.4970 94vvt1roam78cla92pk9gaa4bc Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240605@144846.4987 94vvt1roam78cla92pk9gaa4bc Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20240605@144846.5008 94vvt1roam78cla92pk9gaa4bc 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 'aut666068268866606cbe74',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1030, 1030*.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 ,19.99,19.99*200.48,19.99,19.99*200.48 ,0,0,'un ','' ,bo.marcada,1 ,19.99*1030,19.99*1030*200.48 ,22.989000,22.989000*200.48 ,22.989000,22.989000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,19.99,19.99*200.48,19.99*1030,19.99*1030*200.48,'cps24011555542,334000002 ',148.26,148.26*1030,148.26,148.26*1030,?,?,?,4 from bo bo where bo.bostamp = 'aut666067679466606cbe21'
20240605@144902.5018 94vvt1roam78cla92pk9gaa4bc Query : use flama_phc
20240605@144902.5025 94vvt1roam78cla92pk9gaa4bc Query : declare @bostamp varchar(25) = 'aut666067679466606cbe21' ,@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 
20240605@144917.3124 94vvt1roam78cla92pk9gaa4bc Query : use flama_phc
20240605@144917.3129 94vvt1roam78cla92pk9gaa4bc Query : select 1 valor from bo where bo.bostamp = 'aut666067679466606cbe21'
20240605@144917.3234 94vvt1roam78cla92pk9gaa4bc 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) = 'aut666067679466606cbe21' 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 
20240605@144917.6901 94vvt1roam78cla92pk9gaa4bc Query : use flama_phc
20240605@144917.6906 94vvt1roam78cla92pk9gaa4bc Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@144917.6921 94vvt1roam78cla92pk9gaa4bc Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='218';
20240605@144917.6937 94vvt1roam78cla92pk9gaa4bc Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='218';
20240605@151911.2991 33l6qablaapdjd7ok0dej1tjkp Query : use flama_phc
20240605@151911.2998 33l6qablaapdjd7ok0dej1tjkp Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@151911.3054 33l6qablaapdjd7ok0dej1tjkp Query : use flama_phc
20240605@151911.3057 33l6qablaapdjd7ok0dej1tjkp Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@153611.6491 kc2ae2di14umm70puikgos7oeh Query : use flama_phc
20240605@153611.6496 kc2ae2di14umm70puikgos7oeh Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@153611.6517 kc2ae2di14umm70puikgos7oeh Query : use flama_phc
20240605@153611.6522 kc2ae2di14umm70puikgos7oeh Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@161916.1915 1nrh6dg789fgcdo42hep4qvnrl Query : use flama_phc
20240605@161916.1920 1nrh6dg789fgcdo42hep4qvnrl Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@161916.1936 1nrh6dg789fgcdo42hep4qvnrl Query : use flama_phc
20240605@161916.1939 1nrh6dg789fgcdo42hep4qvnrl Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@163616.1476 v87bcp4ikc8k1rdbbfvbdkmdi1 Query : use flama_phc
20240605@163616.1481 v87bcp4ikc8k1rdbbfvbdkmdi1 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@163616.1499 v87bcp4ikc8k1rdbbfvbdkmdi1 Query : use flama_phc
20240605@163616.1502 v87bcp4ikc8k1rdbbfvbdkmdi1 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@171910.2259 o3eoe168ncishc0njiqugeeffn Query : use flama_phc
20240605@171910.2263 o3eoe168ncishc0njiqugeeffn Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@171910.2280 o3eoe168ncishc0njiqugeeffn Query : use flama_phc
20240605@171910.2283 o3eoe168ncishc0njiqugeeffn Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@173610.5555 m5i51o86e50gvvl0tde8r8vr3r Query : use flama_phc
20240605@173610.5560 m5i51o86e50gvvl0tde8r8vr3r Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@173610.5578 m5i51o86e50gvvl0tde8r8vr3r Query : use flama_phc
20240605@173610.5581 m5i51o86e50gvvl0tde8r8vr3r Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@175147.6550 08h5fjkhkc3o29asurclbcbgp8 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240605@175147.6584 08h5fjkhkc3o29asurclbcbgp8 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240605@175147.6598 08h5fjkhkc3o29asurclbcbgp8 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='219';
20240605@175147.6657 08h5fjkhkc3o29asurclbcbgp8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='219';
20240605@175147.6668 08h5fjkhkc3o29asurclbcbgp8 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='219';
20240605@175147.6679 08h5fjkhkc3o29asurclbcbgp8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='219';
20240605@175147.6689 08h5fjkhkc3o29asurclbcbgp8 Query : use flama_phc
20240605@175147.6695 08h5fjkhkc3o29asurclbcbgp8 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240605@175147.6714 08h5fjkhkc3o29asurclbcbgp8 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.600.94.01'
20240605@175147.6818 08h5fjkhkc3o29asurclbcbgp8 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 = 2400047 and bi.ref ='324.600.94.01' and bi.lordem =20000
20240605@175147.7133 08h5fjkhkc3o29asurclbcbgp8 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 = 'cps24011236083,212000002 ' 
20240605@175147.7447 08h5fjkhkc3o29asurclbcbgp8 Query : use flama_phc
20240605@175147.7450 08h5fjkhkc3o29asurclbcbgp8 Query : select top 1 1 valor from ts where ts.ndos = 61
20240605@175147.7467 08h5fjkhkc3o29asurclbcbgp8 Query : use flama_phc
20240605@175147.7470 08h5fjkhkc3o29asurclbcbgp8 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')
20240605@175147.7522 08h5fjkhkc3o29asurclbcbgp8 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
20240605@175147.7544 08h5fjkhkc3o29asurclbcbgp8 Query : use flama_phc
20240605@175147.7547 08h5fjkhkc3o29asurclbcbgp8 Query : select top 1 ~inactivo valor from fl where no = '202292' and estab = 00 order by inactivo desc
20240605@175147.7638 08h5fjkhkc3o29asurclbcbgp8 Query : use flama_phc
20240605@175147.7641 08h5fjkhkc3o29asurclbcbgp8 Query : select 1 valor from ts where ndos = 61
20240605@175147.7658 08h5fjkhkc3o29asurclbcbgp8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240605@175147.7705 08h5fjkhkc3o29asurclbcbgp8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20240605@175147.7738 08h5fjkhkc3o29asurclbcbgp8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240605@175147.7752 08h5fjkhkc3o29asurclbcbgp8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20240605@175147.7758 08h5fjkhkc3o29asurclbcbgp8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240605@175147.7769 08h5fjkhkc3o29asurclbcbgp8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20240605@175147.7776 08h5fjkhkc3o29asurclbcbgp8 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
20240605@175147.7793 08h5fjkhkc3o29asurclbcbgp8 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240605@175147.7814 08h5fjkhkc3o29asurclbcbgp8 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240605@175147.7830 08h5fjkhkc3o29asurclbcbgp8 Query : use flama_phc
20240605@175147.7833 08h5fjkhkc3o29asurclbcbgp8 Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202292' and estab=00
20240605@175147.8007 08h5fjkhkc3o29asurclbcbgp8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240605@175147.8022 08h5fjkhkc3o29asurclbcbgp8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20240605@175147.8034 08h5fjkhkc3o29asurclbcbgp8 Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6660938587666097a3bf',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240605@175147.8043 08h5fjkhkc3o29asurclbcbgp8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240605@175147.8055 08h5fjkhkc3o29asurclbcbgp8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20240605@175147.8061 08h5fjkhkc3o29asurclbcbgp8 Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6660938587666097a3bf','--','bo',1.1159929701230228471 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240605@175147.8065 08h5fjkhkc3o29asurclbcbgp8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240605@175147.8077 08h5fjkhkc3o29asurclbcbgp8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20240605@175147.8083 08h5fjkhkc3o29asurclbcbgp8 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 ('aut6660938587666097a3bf','guia r. fornecedor','2024-06-05',61,2401602,?,?,?,?,?,?,?,?,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')
20240605@175147.8584 08h5fjkhkc3o29asurclbcbgp8 Query : use flama_phc
20240605@175147.8588 08h5fjkhkc3o29asurclbcbgp8 Query : select st.usalote valor from st where st.ref = '324.600.94.01'
20240605@175147.8612 08h5fjkhkc3o29asurclbcbgp8 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.600.94.01'
20240605@175147.8756 08h5fjkhkc3o29asurclbcbgp8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240605@175147.8769 08h5fjkhkc3o29asurclbcbgp8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20240605@175147.8780 08h5fjkhkc3o29asurclbcbgp8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240605@175147.8792 08h5fjkhkc3o29asurclbcbgp8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20240605@175147.8799 08h5fjkhkc3o29asurclbcbgp8 Query : select sestamp valor from se where ref ='324.600.94.01' and lote = 'r2400047200a'
20240605@175147.8808 08h5fjkhkc3o29asurclbcbgp8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240605@175147.8820 08h5fjkhkc3o29asurclbcbgp8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20240605@175147.8827 08h5fjkhkc3o29asurclbcbgp8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240605@175147.8839 08h5fjkhkc3o29asurclbcbgp8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20240605@175147.8846 08h5fjkhkc3o29asurclbcbgp8 Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6660914284666097a3d7',?,?,'20240605',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20240605@175147.8918 08h5fjkhkc3o29asurclbcbgp8 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240605@175147.8939 08h5fjkhkc3o29asurclbcbgp8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240605@175147.8971 08h5fjkhkc3o29asurclbcbgp8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20240605@175147.8977 08h5fjkhkc3o29asurclbcbgp8 Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6660964524666097a3da','aut6660938587666097a3bf',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 = 'aut6660938587666097a3bf'
20240605@175147.9199 08h5fjkhkc3o29asurclbcbgp8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240605@175147.9214 08h5fjkhkc3o29asurclbcbgp8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20240605@175147.9224 08h5fjkhkc3o29asurclbcbgp8 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 'aut6660964524666097a3da',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1460, 1460*.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 ,22.76,22.76*200.48,22.76,22.76*200.48 ,0,0,'un ','' ,bo.marcada,1 ,22.76*1460,22.76*1460*200.48 ,24.035000,24.035000*200.48 ,24.035000,24.035000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,22.76,22.76*200.48,22.76*1460,22.76*1460*200.48,'cps24011236083,212000002 ',25.4,25.4*1460,25.4,25.4*1460,?,?,?,4 from bo bo where bo.bostamp = 'aut6660938587666097a3bf'
20240605@175148.1890 08h5fjkhkc3o29asurclbcbgp8 Query : use flama_phc
20240605@175148.1894 08h5fjkhkc3o29asurclbcbgp8 Query : declare @bostamp varchar(25) = 'aut6660938587666097a3bf' ,@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 
20240605@175148.4048 08h5fjkhkc3o29asurclbcbgp8 Query : use flama_phc
20240605@175148.4087 08h5fjkhkc3o29asurclbcbgp8 Query : select 1 valor from bo where bo.bostamp = 'aut6660938587666097a3bf'
20240605@175148.4267 08h5fjkhkc3o29asurclbcbgp8 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) = 'aut6660938587666097a3bf' 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 
20240605@175148.7247 08h5fjkhkc3o29asurclbcbgp8 Query : use flama_phc
20240605@175148.7251 08h5fjkhkc3o29asurclbcbgp8 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@175148.7262 08h5fjkhkc3o29asurclbcbgp8 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='219';
20240605@175148.7274 08h5fjkhkc3o29asurclbcbgp8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='219';
20240605@181913.8503 fti83q3r3v53gc8jjq820or8t4 Query : use flama_phc
20240605@181913.8511 fti83q3r3v53gc8jjq820or8t4 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@181913.8528 fti83q3r3v53gc8jjq820or8t4 Query : use flama_phc
20240605@181913.8531 fti83q3r3v53gc8jjq820or8t4 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@183613.7739 u6ldkubll0tov2io5pe6irjqkl Query : use flama_phc
20240605@183613.7744 u6ldkubll0tov2io5pe6irjqkl Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@183613.7772 u6ldkubll0tov2io5pe6irjqkl Query : use flama_phc
20240605@183613.7775 u6ldkubll0tov2io5pe6irjqkl Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@191912.2930 dgs74limt3gj28u3epu62rg4in Query : use flama_phc
20240605@191912.2935 dgs74limt3gj28u3epu62rg4in Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@191912.2951 dgs74limt3gj28u3epu62rg4in Query : use flama_phc
20240605@191912.2954 dgs74limt3gj28u3epu62rg4in Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@193612.3901 30htsrfmamdtkpqiqdskhm1upd Query : use flama_phc
20240605@193612.3907 30htsrfmamdtkpqiqdskhm1upd Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@193612.3928 30htsrfmamdtkpqiqdskhm1upd Query : use flama_phc
20240605@193612.3931 30htsrfmamdtkpqiqdskhm1upd Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@201912.9731 1toe7cvg1gmrrmdfrek67rk6pr Query : use flama_phc
20240605@201912.9736 1toe7cvg1gmrrmdfrek67rk6pr Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@201912.9755 1toe7cvg1gmrrmdfrek67rk6pr Query : use flama_phc
20240605@201912.9761 1toe7cvg1gmrrmdfrek67rk6pr Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@203612.8999 l4du4oo6um86b50ts2anr1e60j Query : use flama_phc
20240605@203612.9004 l4du4oo6um86b50ts2anr1e60j Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@203612.9021 l4du4oo6um86b50ts2anr1e60j Query : use flama_phc
20240605@203612.9024 l4du4oo6um86b50ts2anr1e60j Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@211910.6466 66dciuelnccd56nq84lp0gqp6b Query : use flama_phc
20240605@211910.6471 66dciuelnccd56nq84lp0gqp6b Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@211910.6488 66dciuelnccd56nq84lp0gqp6b Query : use flama_phc
20240605@211910.6491 66dciuelnccd56nq84lp0gqp6b Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@213610.6585 iuflltgq0m2jm28l9q0kbbme0d Query : use flama_phc
20240605@213610.6589 iuflltgq0m2jm28l9q0kbbme0d Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@213610.6607 iuflltgq0m2jm28l9q0kbbme0d Query : use flama_phc
20240605@213610.6611 iuflltgq0m2jm28l9q0kbbme0d Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@221915.1827 cmdlfan67l515rss45ids4jope Query : use flama_phc
20240605@221915.1832 cmdlfan67l515rss45ids4jope Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@221915.1849 cmdlfan67l515rss45ids4jope Query : use flama_phc
20240605@221915.1852 cmdlfan67l515rss45ids4jope Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@223615.6687 9djt016d7sph2qpa10g0h0eg6t Query : use flama_phc
20240605@223615.6696 9djt016d7sph2qpa10g0h0eg6t Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@223615.6715 9djt016d7sph2qpa10g0h0eg6t Query : use flama_phc
20240605@223615.6719 9djt016d7sph2qpa10g0h0eg6t Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@231912.3713 j01fnk33gmhvhmehk5lu56ocnl Query : use flama_phc
20240605@231912.3718 j01fnk33gmhvhmehk5lu56ocnl Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@231912.3735 j01fnk33gmhvhmehk5lu56ocnl Query : use flama_phc
20240605@231912.3738 j01fnk33gmhvhmehk5lu56ocnl Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240605@233612.3462 05qvguqp976fq14mnqe9kpedn1 Query : use flama_phc
20240605@233612.3467 05qvguqp976fq14mnqe9kpedn1 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240605@233612.3485 05qvguqp976fq14mnqe9kpedn1 Query : use flama_phc
20240605@233612.3487 05qvguqp976fq14mnqe9kpedn1 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@071912.6865 7vqlm7uqf8lokpui4pbqraaa5b Query : use flama_phc
20240606@071912.6870 7vqlm7uqf8lokpui4pbqraaa5b Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@071912.6936 7vqlm7uqf8lokpui4pbqraaa5b Query : use flama_phc
20240606@071912.6939 7vqlm7uqf8lokpui4pbqraaa5b Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@073612.5852 kg1cd6900ani45nabopsttl5co Query : use flama_phc
20240606@073612.5857 kg1cd6900ani45nabopsttl5co Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@073612.5890 kg1cd6900ani45nabopsttl5co Query : use flama_phc
20240606@073612.5893 kg1cd6900ani45nabopsttl5co Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@081816.9477 808ba1n8i85k8852gkn0gms13j Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081816.9509 808ba1n8i85k8852gkn0gms13j Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081816.9574 808ba1n8i85k8852gkn0gms13j Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='220';
20240606@081816.9611 808ba1n8i85k8852gkn0gms13j Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='220';
20240606@081816.9634 808ba1n8i85k8852gkn0gms13j Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='220';
20240606@081816.9647 808ba1n8i85k8852gkn0gms13j Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='220';
20240606@081816.9658 808ba1n8i85k8852gkn0gms13j Query : use flama_phc
20240606@081816.9662 808ba1n8i85k8852gkn0gms13j Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081816.9712 808ba1n8i85k8852gkn0gms13j Query : use flama_phc
20240606@081816.9716 808ba1n8i85k8852gkn0gms13j Query : select no, estab,szadrsdesc from szadrs where u_coddest=3674
20240606@081816.9821 808ba1n8i85k8852gkn0gms13j Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4930.00.1'
20240606@081816.9973 808ba1n8i85k8852gkn0gms13j Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2038 and bo.obrano = 2403889 and bi.ref ='324.4930.00.1' and bi.lordem =1
20240606@081817.3310 808ba1n8i85k8852gkn0gms13j Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4724.00.1'
20240606@081817.4950 808ba1n8i85k8852gkn0gms13j Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2038 and bo.obrano = 2403889 and bi.ref ='324.4724.00.1' and bi.lordem =2
20240606@081817.8320 808ba1n8i85k8852gkn0gms13j Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4724.00.1'
20240606@081817.8430 808ba1n8i85k8852gkn0gms13j Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2038 and bo.obrano = 2403889 and bi.ref ='324.4724.00.1' and bi.lordem =2
20240606@081817.8520 808ba1n8i85k8852gkn0gms13j Query : use flama_phc
20240606@081817.8550 808ba1n8i85k8852gkn0gms13j Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081817.1037 808ba1n8i85k8852gkn0gms13j Query : use flama_phc
20240606@081817.1040 808ba1n8i85k8852gkn0gms13j Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081817.1119 808ba1n8i85k8852gkn0gms13j Query : use flama_phc
20240606@081817.1122 808ba1n8i85k8852gkn0gms13j 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')
20240606@081817.1637 qd3ptic0s7ra5fig9ordv5btg3 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081817.1650 qd3ptic0s7ra5fig9ordv5btg3 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081817.1664 qd3ptic0s7ra5fig9ordv5btg3 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='221';
20240606@081817.1701 qd3ptic0s7ra5fig9ordv5btg3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='221';
20240606@081817.1722 qd3ptic0s7ra5fig9ordv5btg3 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='221';
20240606@081817.1734 qd3ptic0s7ra5fig9ordv5btg3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='221';
20240606@081817.1744 qd3ptic0s7ra5fig9ordv5btg3 Query : use flama_phc
20240606@081817.1748 qd3ptic0s7ra5fig9ordv5btg3 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081817.1761 qd3ptic0s7ra5fig9ordv5btg3 Query : use flama_phc
20240606@081817.1764 qd3ptic0s7ra5fig9ordv5btg3 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240606@081817.1842 qd3ptic0s7ra5fig9ordv5btg3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1690.00.1'
20240606@081817.1988 qd3ptic0s7ra5fig9ordv5btg3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2038 and bo.obrano = 2403897 and bi.ref ='324.1690.00.1' and bi.lordem =1
20240606@081817.2307 qd3ptic0s7ra5fig9ordv5btg3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1690.00.1'
20240606@081817.2318 qd3ptic0s7ra5fig9ordv5btg3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2038 and bo.obrano = 2403897 and bi.ref ='324.1690.00.1' and bi.lordem =1
20240606@081817.2327 qd3ptic0s7ra5fig9ordv5btg3 Query : use flama_phc
20240606@081817.2330 qd3ptic0s7ra5fig9ordv5btg3 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081817.2343 qd3ptic0s7ra5fig9ordv5btg3 Query : use flama_phc
20240606@081817.2346 qd3ptic0s7ra5fig9ordv5btg3 Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081817.2356 qd3ptic0s7ra5fig9ordv5btg3 Query : use flama_phc
20240606@081817.2359 qd3ptic0s7ra5fig9ordv5btg3 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')
20240606@081817.2778 34nc6pjpri5bvkb3s5cbqcbhaf Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081817.2890 34nc6pjpri5bvkb3s5cbqcbhaf Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081817.3374 34nc6pjpri5bvkb3s5cbqcbhaf Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='222';
20240606@081817.3902 34nc6pjpri5bvkb3s5cbqcbhaf Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='222';
20240606@081817.3988 34nc6pjpri5bvkb3s5cbqcbhaf Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='222';
20240606@081817.4029 34nc6pjpri5bvkb3s5cbqcbhaf Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='222';
20240606@081817.4075 34nc6pjpri5bvkb3s5cbqcbhaf Query : use flama_phc
20240606@081817.4115 34nc6pjpri5bvkb3s5cbqcbhaf Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081817.4179 34nc6pjpri5bvkb3s5cbqcbhaf Query : use flama_phc
20240606@081817.4182 34nc6pjpri5bvkb3s5cbqcbhaf Query : select no, estab,szadrsdesc from szadrs where u_coddest=4743
20240606@081817.4368 34nc6pjpri5bvkb3s5cbqcbhaf 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'
20240606@081817.4753 34nc6pjpri5bvkb3s5cbqcbhaf Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403912 and bi.ref ='324.966.00.01' and bi.lordem =1
20240606@081817.5744 34nc6pjpri5bvkb3s5cbqcbhaf Query : use flama_phc
20240606@081817.5793 34nc6pjpri5bvkb3s5cbqcbhaf Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081817.6240 34nc6pjpri5bvkb3s5cbqcbhaf Query : use flama_phc
20240606@081817.6283 34nc6pjpri5bvkb3s5cbqcbhaf Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081817.6506 34nc6pjpri5bvkb3s5cbqcbhaf Query : use flama_phc
20240606@081817.6509 34nc6pjpri5bvkb3s5cbqcbhaf 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')
20240606@081817.7133 ucsvn27ckd57pr1jo6mol7rg2p Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081817.7146 ucsvn27ckd57pr1jo6mol7rg2p Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081817.7162 ucsvn27ckd57pr1jo6mol7rg2p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='223';
20240606@081817.7197 ucsvn27ckd57pr1jo6mol7rg2p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='223';
20240606@081817.7209 ucsvn27ckd57pr1jo6mol7rg2p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='223';
20240606@081817.7221 ucsvn27ckd57pr1jo6mol7rg2p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='223';
20240606@081817.7231 ucsvn27ckd57pr1jo6mol7rg2p Query : use flama_phc
20240606@081817.7234 ucsvn27ckd57pr1jo6mol7rg2p Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081817.7247 ucsvn27ckd57pr1jo6mol7rg2p Query : use flama_phc
20240606@081817.7250 ucsvn27ckd57pr1jo6mol7rg2p Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240606@081817.7280 ucsvn27ckd57pr1jo6mol7rg2p 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'
20240606@081817.7421 ucsvn27ckd57pr1jo6mol7rg2p Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403923 and bi.ref ='326.595.00.01' and bi.lordem =1
20240606@081817.7730 ucsvn27ckd57pr1jo6mol7rg2p 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'
20240606@081817.7741 ucsvn27ckd57pr1jo6mol7rg2p Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403923 and bi.ref ='326.595.00.01' and bi.lordem =1
20240606@081817.7748 ucsvn27ckd57pr1jo6mol7rg2p Query : use flama_phc
20240606@081817.7751 ucsvn27ckd57pr1jo6mol7rg2p Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081817.7765 ucsvn27ckd57pr1jo6mol7rg2p Query : use flama_phc
20240606@081817.7768 ucsvn27ckd57pr1jo6mol7rg2p Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081817.7778 ucsvn27ckd57pr1jo6mol7rg2p Query : use flama_phc
20240606@081817.7781 ucsvn27ckd57pr1jo6mol7rg2p 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')
20240606@081817.8244 qja3gtosp0nfhp8vpmeu6rahjr Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081817.8302 qja3gtosp0nfhp8vpmeu6rahjr Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081817.8411 qja3gtosp0nfhp8vpmeu6rahjr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='224';
20240606@081817.8732 qja3gtosp0nfhp8vpmeu6rahjr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='224';
20240606@081817.8817 qja3gtosp0nfhp8vpmeu6rahjr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='224';
20240606@081817.9033 qja3gtosp0nfhp8vpmeu6rahjr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='224';
20240606@081817.9119 qja3gtosp0nfhp8vpmeu6rahjr Query : use flama_phc
20240606@081817.9161 qja3gtosp0nfhp8vpmeu6rahjr Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081817.9450 qja3gtosp0nfhp8vpmeu6rahjr Query : use flama_phc
20240606@081817.9489 qja3gtosp0nfhp8vpmeu6rahjr Query : select no, estab,szadrsdesc from szadrs where u_coddest=4782
20240606@081817.9646 qja3gtosp0nfhp8vpmeu6rahjr 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'
20240606@081817.9933 qja3gtosp0nfhp8vpmeu6rahjr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403924 and bi.ref ='324.1879.00.1' and bi.lordem =1
20240606@081818.7800 qja3gtosp0nfhp8vpmeu6rahjr 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'
20240606@081818.7900 qja3gtosp0nfhp8vpmeu6rahjr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403924 and bi.ref ='324.1879.00.1' and bi.lordem =1
20240606@081818.1123 qja3gtosp0nfhp8vpmeu6rahjr Query : use flama_phc
20240606@081818.1205 qja3gtosp0nfhp8vpmeu6rahjr Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081818.1549 qja3gtosp0nfhp8vpmeu6rahjr Query : use flama_phc
20240606@081818.1631 qja3gtosp0nfhp8vpmeu6rahjr Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081818.1972 qja3gtosp0nfhp8vpmeu6rahjr Query : use flama_phc
20240606@081818.2022 qja3gtosp0nfhp8vpmeu6rahjr 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')
20240606@081818.2712 5dbmb4i8lltqp6uui65uhcsojo Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081818.2726 5dbmb4i8lltqp6uui65uhcsojo Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081818.2739 5dbmb4i8lltqp6uui65uhcsojo Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='225';
20240606@081818.2775 5dbmb4i8lltqp6uui65uhcsojo Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='225';
20240606@081818.2786 5dbmb4i8lltqp6uui65uhcsojo Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='225';
20240606@081818.2796 5dbmb4i8lltqp6uui65uhcsojo Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='225';
20240606@081818.2807 5dbmb4i8lltqp6uui65uhcsojo Query : use flama_phc
20240606@081818.2810 5dbmb4i8lltqp6uui65uhcsojo Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081818.2823 5dbmb4i8lltqp6uui65uhcsojo Query : use flama_phc
20240606@081818.2826 5dbmb4i8lltqp6uui65uhcsojo Query : select no, estab,szadrsdesc from szadrs where u_coddest=1152
20240606@081818.2899 5dbmb4i8lltqp6uui65uhcsojo 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'
20240606@081818.3053 5dbmb4i8lltqp6uui65uhcsojo Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403932 and bi.ref ='324.1824.00.1' and bi.lordem =1
20240606@081818.3362 5dbmb4i8lltqp6uui65uhcsojo 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'
20240606@081818.3372 5dbmb4i8lltqp6uui65uhcsojo Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403932 and bi.ref ='324.1824.00.1' and bi.lordem =2
20240606@081818.3689 5dbmb4i8lltqp6uui65uhcsojo Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1834.00.1'
20240606@081818.3833 5dbmb4i8lltqp6uui65uhcsojo Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403932 and bi.ref ='324.1834.00.1' and bi.lordem =3
20240606@081818.4151 5dbmb4i8lltqp6uui65uhcsojo 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'
20240606@081818.4161 5dbmb4i8lltqp6uui65uhcsojo Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403932 and bi.ref ='324.1879.00.1' and bi.lordem =4
20240606@081818.4474 5dbmb4i8lltqp6uui65uhcsojo Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '325.1905.0001'
20240606@081818.4613 5dbmb4i8lltqp6uui65uhcsojo Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403932 and bi.ref ='325.1905.0001' and bi.lordem =5
20240606@081818.4929 5dbmb4i8lltqp6uui65uhcsojo Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1716.00.1'
20240606@081818.5072 5dbmb4i8lltqp6uui65uhcsojo Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403932 and bi.ref ='324.1716.00.1' and bi.lordem =6
20240606@081818.5388 5dbmb4i8lltqp6uui65uhcsojo Query : use flama_phc
20240606@081818.5391 5dbmb4i8lltqp6uui65uhcsojo Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081818.5404 5dbmb4i8lltqp6uui65uhcsojo Query : use flama_phc
20240606@081818.5407 5dbmb4i8lltqp6uui65uhcsojo Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081818.5419 5dbmb4i8lltqp6uui65uhcsojo Query : use flama_phc
20240606@081818.5421 5dbmb4i8lltqp6uui65uhcsojo 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')
20240606@081818.5936 bm0u0hedqfcdj2e5or5k5k9f7b Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081818.5949 bm0u0hedqfcdj2e5or5k5k9f7b Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081818.5965 bm0u0hedqfcdj2e5or5k5k9f7b Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='226';
20240606@081818.6000 bm0u0hedqfcdj2e5or5k5k9f7b Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='226';
20240606@081818.6013 bm0u0hedqfcdj2e5or5k5k9f7b Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='226';
20240606@081818.6024 bm0u0hedqfcdj2e5or5k5k9f7b Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='226';
20240606@081818.6034 bm0u0hedqfcdj2e5or5k5k9f7b Query : use flama_phc
20240606@081818.6037 bm0u0hedqfcdj2e5or5k5k9f7b Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081818.6050 bm0u0hedqfcdj2e5or5k5k9f7b Query : use flama_phc
20240606@081818.6053 bm0u0hedqfcdj2e5or5k5k9f7b Query : select no, estab,szadrsdesc from szadrs where u_coddest=4537
20240606@081818.6122 bm0u0hedqfcdj2e5or5k5k9f7b Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1462.00.1'
20240606@081818.6263 bm0u0hedqfcdj2e5or5k5k9f7b Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403933 and bi.ref ='324.1462.00.1' and bi.lordem =1
20240606@081818.6616 bm0u0hedqfcdj2e5or5k5k9f7b 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'
20240606@081818.6766 bm0u0hedqfcdj2e5or5k5k9f7b Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403933 and bi.ref ='324.2031.00.1' and bi.lordem =2
20240606@081818.7089 bm0u0hedqfcdj2e5or5k5k9f7b Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2223.00.1'
20240606@081818.7230 bm0u0hedqfcdj2e5or5k5k9f7b Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403933 and bi.ref ='324.2223.00.1' and bi.lordem =3
20240606@081818.7549 bm0u0hedqfcdj2e5or5k5k9f7b Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2223.00.1'
20240606@081818.7561 bm0u0hedqfcdj2e5or5k5k9f7b Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403933 and bi.ref ='324.2223.00.1' and bi.lordem =4
20240606@081818.7984 bm0u0hedqfcdj2e5or5k5k9f7b Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2224.00.1'
20240606@081818.8324 bm0u0hedqfcdj2e5or5k5k9f7b Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403933 and bi.ref ='324.2224.00.1' and bi.lordem =5
20240606@081818.9349 bm0u0hedqfcdj2e5or5k5k9f7b 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'
20240606@081818.9903 bm0u0hedqfcdj2e5or5k5k9f7b Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403933 and bi.ref ='304.422.00.07' and bi.lordem =7
20240606@081819.8170 bm0u0hedqfcdj2e5or5k5k9f7b 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'
20240606@081819.1469 bm0u0hedqfcdj2e5or5k5k9f7b Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403933 and bi.ref ='304.4320.00.1' and bi.lordem =8
20240606@081819.2115 bm0u0hedqfcdj2e5or5k5k9f7b 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'
20240606@081819.2126 bm0u0hedqfcdj2e5or5k5k9f7b Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403933 and bi.ref ='304.4320.00.1' and bi.lordem =9
20240606@081819.2496 bm0u0hedqfcdj2e5or5k5k9f7b 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'
20240606@081819.2784 bm0u0hedqfcdj2e5or5k5k9f7b Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403933 and bi.ref ='324.4521.00.1' and bi.lordem =10
20240606@081819.3526 bm0u0hedqfcdj2e5or5k5k9f7b 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'
20240606@081819.3750 bm0u0hedqfcdj2e5or5k5k9f7b Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403933 and bi.ref ='324.691.00.01' and bi.lordem =11
20240606@081819.4191 bm0u0hedqfcdj2e5or5k5k9f7b Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.945.00.01'
20240606@081819.4484 bm0u0hedqfcdj2e5or5k5k9f7b Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403933 and bi.ref ='324.945.00.01' and bi.lordem =12
20240606@081819.4867 bm0u0hedqfcdj2e5or5k5k9f7b 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'
20240606@081819.5008 bm0u0hedqfcdj2e5or5k5k9f7b Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403933 and bi.ref ='324.969.00.01' and bi.lordem =13
20240606@081819.5320 bm0u0hedqfcdj2e5or5k5k9f7b Query : use flama_phc
20240606@081819.5333 bm0u0hedqfcdj2e5or5k5k9f7b Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081819.5352 bm0u0hedqfcdj2e5or5k5k9f7b Query : use flama_phc
20240606@081819.5354 bm0u0hedqfcdj2e5or5k5k9f7b Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081819.5365 bm0u0hedqfcdj2e5or5k5k9f7b Query : use flama_phc
20240606@081819.5368 bm0u0hedqfcdj2e5or5k5k9f7b 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')
20240606@081819.5970 oi7loh0pli9gku9uaes35q3cbf Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081819.5983 oi7loh0pli9gku9uaes35q3cbf Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081819.5997 oi7loh0pli9gku9uaes35q3cbf Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='227';
20240606@081819.6034 oi7loh0pli9gku9uaes35q3cbf Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='227';
20240606@081819.6045 oi7loh0pli9gku9uaes35q3cbf Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='227';
20240606@081819.6056 oi7loh0pli9gku9uaes35q3cbf Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='227';
20240606@081819.6066 oi7loh0pli9gku9uaes35q3cbf Query : use flama_phc
20240606@081819.6069 oi7loh0pli9gku9uaes35q3cbf Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081819.6082 oi7loh0pli9gku9uaes35q3cbf Query : use flama_phc
20240606@081819.6084 oi7loh0pli9gku9uaes35q3cbf Query : select no, estab,szadrsdesc from szadrs where u_coddest=3099
20240606@081819.6318 oi7loh0pli9gku9uaes35q3cbf 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'
20240606@081819.6481 oi7loh0pli9gku9uaes35q3cbf Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403934 and bi.ref ='324.1684.00.1' and bi.lordem =1
20240606@081819.7188 oi7loh0pli9gku9uaes35q3cbf Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1643.00.1'
20240606@081819.7428 oi7loh0pli9gku9uaes35q3cbf Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403934 and bi.ref ='324.1643.00.1' and bi.lordem =2
20240606@081819.7918 oi7loh0pli9gku9uaes35q3cbf 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'
20240606@081819.8132 oi7loh0pli9gku9uaes35q3cbf Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403934 and bi.ref ='324.1608.00.1' and bi.lordem =3
20240606@081819.8510 oi7loh0pli9gku9uaes35q3cbf 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'
20240606@081819.8826 oi7loh0pli9gku9uaes35q3cbf Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403934 and bi.ref ='324.4421.00.1' and bi.lordem =4
20240606@081819.9142 oi7loh0pli9gku9uaes35q3cbf Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2222.00.1'
20240606@081819.9311 oi7loh0pli9gku9uaes35q3cbf Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403934 and bi.ref ='324.2222.00.1' and bi.lordem =6
20240606@081819.9674 oi7loh0pli9gku9uaes35q3cbf Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2223.00.1'
20240606@081819.9687 oi7loh0pli9gku9uaes35q3cbf Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403934 and bi.ref ='324.2223.00.1' and bi.lordem =7
20240606@081820.9100 oi7loh0pli9gku9uaes35q3cbf 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'
20240606@081820.1010 oi7loh0pli9gku9uaes35q3cbf Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403934 and bi.ref ='324.4521.00.1' and bi.lordem =8
20240606@081820.4280 oi7loh0pli9gku9uaes35q3cbf 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'
20240606@081820.4390 oi7loh0pli9gku9uaes35q3cbf Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403934 and bi.ref ='324.4521.00.1' and bi.lordem =8
20240606@081820.4460 oi7loh0pli9gku9uaes35q3cbf Query : use flama_phc
20240606@081820.4490 oi7loh0pli9gku9uaes35q3cbf Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081820.4620 oi7loh0pli9gku9uaes35q3cbf Query : use flama_phc
20240606@081820.4650 oi7loh0pli9gku9uaes35q3cbf Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081820.4760 oi7loh0pli9gku9uaes35q3cbf Query : use flama_phc
20240606@081820.4780 oi7loh0pli9gku9uaes35q3cbf 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')
20240606@081820.2333 bhgelhbg3qutpqphua905gqtpg Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081820.2347 bhgelhbg3qutpqphua905gqtpg Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081820.2361 bhgelhbg3qutpqphua905gqtpg Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='228';
20240606@081820.2455 bhgelhbg3qutpqphua905gqtpg Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='228';
20240606@081820.2467 bhgelhbg3qutpqphua905gqtpg Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='228';
20240606@081820.2480 bhgelhbg3qutpqphua905gqtpg Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='228';
20240606@081820.2490 bhgelhbg3qutpqphua905gqtpg Query : use flama_phc
20240606@081820.2493 bhgelhbg3qutpqphua905gqtpg Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081820.2506 bhgelhbg3qutpqphua905gqtpg Query : use flama_phc
20240606@081820.2509 bhgelhbg3qutpqphua905gqtpg Query : select no, estab,szadrsdesc from szadrs where u_coddest=4799
20240606@081820.2603 bhgelhbg3qutpqphua905gqtpg 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'
20240606@081820.2747 bhgelhbg3qutpqphua905gqtpg Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403935 and bi.ref ='324.5342.00.1' and bi.lordem =1
20240606@081820.3059 bhgelhbg3qutpqphua905gqtpg 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'
20240606@081820.3198 bhgelhbg3qutpqphua905gqtpg Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403935 and bi.ref ='324.698.00.01' and bi.lordem =2
20240606@081820.3512 bhgelhbg3qutpqphua905gqtpg 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'
20240606@081820.3524 bhgelhbg3qutpqphua905gqtpg Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403935 and bi.ref ='324.698.00.01' and bi.lordem =2
20240606@081820.3531 bhgelhbg3qutpqphua905gqtpg 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'
20240606@081820.3541 bhgelhbg3qutpqphua905gqtpg Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403935 and bi.ref ='324.4421.00.1' and bi.lordem =3
20240606@081820.3998 bhgelhbg3qutpqphua905gqtpg Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4960.00.1'
20240606@081820.4190 bhgelhbg3qutpqphua905gqtpg Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403935 and bi.ref ='324.4960.00.1' and bi.lordem =4
20240606@081820.5632 bhgelhbg3qutpqphua905gqtpg 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'
20240606@081820.5776 bhgelhbg3qutpqphua905gqtpg Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403935 and bi.ref ='324.1646.00.1' and bi.lordem =5
20240606@081820.6108 bhgelhbg3qutpqphua905gqtpg 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'
20240606@081820.6245 bhgelhbg3qutpqphua905gqtpg Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403935 and bi.ref ='324.1803.00.1' and bi.lordem =6
20240606@081820.6561 bhgelhbg3qutpqphua905gqtpg Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1889.00.1'
20240606@081820.6701 bhgelhbg3qutpqphua905gqtpg Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403935 and bi.ref ='324.1889.00.1' and bi.lordem =7
20240606@081820.7012 bhgelhbg3qutpqphua905gqtpg Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1831.00.2'
20240606@081820.7151 bhgelhbg3qutpqphua905gqtpg Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403935 and bi.ref ='324.1831.00.2' and bi.lordem =8
20240606@081820.7465 bhgelhbg3qutpqphua905gqtpg Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1831.00.2'
20240606@081820.7476 bhgelhbg3qutpqphua905gqtpg Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403935 and bi.ref ='324.1831.00.2' and bi.lordem =9
20240606@081820.8002 bhgelhbg3qutpqphua905gqtpg 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'
20240606@081820.9888 bhgelhbg3qutpqphua905gqtpg Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403935 and bi.ref ='324.5501.00.1' and bi.lordem =10
20240606@081821.4170 bhgelhbg3qutpqphua905gqtpg 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'
20240606@081821.6040 bhgelhbg3qutpqphua905gqtpg Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403935 and bi.ref ='324.727.00.01' and bi.lordem =11
20240606@081821.1015 bhgelhbg3qutpqphua905gqtpg Query : use flama_phc
20240606@081821.1018 bhgelhbg3qutpqphua905gqtpg Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081821.1030 bhgelhbg3qutpqphua905gqtpg Query : use flama_phc
20240606@081821.1033 bhgelhbg3qutpqphua905gqtpg Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081821.1042 bhgelhbg3qutpqphua905gqtpg Query : use flama_phc
20240606@081821.1045 bhgelhbg3qutpqphua905gqtpg 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')
20240606@081821.1491 ii5dnocjfbvcqrhlaliogjvjlj Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081821.1503 ii5dnocjfbvcqrhlaliogjvjlj Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081821.1524 ii5dnocjfbvcqrhlaliogjvjlj Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='229';
20240606@081821.1560 ii5dnocjfbvcqrhlaliogjvjlj Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='229';
20240606@081821.1572 ii5dnocjfbvcqrhlaliogjvjlj Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='229';
20240606@081821.1583 ii5dnocjfbvcqrhlaliogjvjlj Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='229';
20240606@081821.1594 ii5dnocjfbvcqrhlaliogjvjlj Query : use flama_phc
20240606@081821.1597 ii5dnocjfbvcqrhlaliogjvjlj Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081821.1611 ii5dnocjfbvcqrhlaliogjvjlj Query : use flama_phc
20240606@081821.1614 ii5dnocjfbvcqrhlaliogjvjlj Query : select no, estab,szadrsdesc from szadrs where u_coddest=4743
20240606@081821.1643 ii5dnocjfbvcqrhlaliogjvjlj Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2222.00.1'
20240606@081821.1654 ii5dnocjfbvcqrhlaliogjvjlj Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403936 and bi.ref ='324.2222.00.1' and bi.lordem =1
20240606@081821.1954 ii5dnocjfbvcqrhlaliogjvjlj Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2222.00.1'
20240606@081821.1965 ii5dnocjfbvcqrhlaliogjvjlj Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403936 and bi.ref ='324.2222.00.1' and bi.lordem =1
20240606@081821.1974 ii5dnocjfbvcqrhlaliogjvjlj Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2222.00.1'
20240606@081821.1983 ii5dnocjfbvcqrhlaliogjvjlj Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403936 and bi.ref ='324.2222.00.1' and bi.lordem =1
20240606@081821.1990 ii5dnocjfbvcqrhlaliogjvjlj 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'
20240606@081821.2200 ii5dnocjfbvcqrhlaliogjvjlj Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403936 and bi.ref ='324.4902.00.1' and bi.lordem =2
20240606@081821.2513 ii5dnocjfbvcqrhlaliogjvjlj 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'
20240606@081821.2650 ii5dnocjfbvcqrhlaliogjvjlj Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403936 and bi.ref ='324.4751.00.1' and bi.lordem =3
20240606@081821.2954 ii5dnocjfbvcqrhlaliogjvjlj 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'
20240606@081821.3093 ii5dnocjfbvcqrhlaliogjvjlj Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403936 and bi.ref ='304.421.00.04' and bi.lordem =5
20240606@081821.3395 ii5dnocjfbvcqrhlaliogjvjlj 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'
20240606@081821.3405 ii5dnocjfbvcqrhlaliogjvjlj Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403936 and bi.ref ='304.421.00.04' and bi.lordem =5
20240606@081821.3411 ii5dnocjfbvcqrhlaliogjvjlj 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'
20240606@081821.3421 ii5dnocjfbvcqrhlaliogjvjlj Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403936 and bi.ref ='304.421.00.04' and bi.lordem =5
20240606@081821.3427 ii5dnocjfbvcqrhlaliogjvjlj 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'
20240606@081821.3436 ii5dnocjfbvcqrhlaliogjvjlj Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403936 and bi.ref ='304.421.00.04' and bi.lordem =5
20240606@081821.3443 ii5dnocjfbvcqrhlaliogjvjlj 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'
20240606@081821.3451 ii5dnocjfbvcqrhlaliogjvjlj Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403936 and bi.ref ='304.421.00.04' and bi.lordem =5
20240606@081821.3458 ii5dnocjfbvcqrhlaliogjvjlj 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'
20240606@081821.3595 ii5dnocjfbvcqrhlaliogjvjlj Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403936 and bi.ref ='324.1667.00.1' and bi.lordem =6
20240606@081821.3900 ii5dnocjfbvcqrhlaliogjvjlj 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'
20240606@081821.3910 ii5dnocjfbvcqrhlaliogjvjlj Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403936 and bi.ref ='324.691.00.01' and bi.lordem =7
20240606@081821.4232 ii5dnocjfbvcqrhlaliogjvjlj 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'
20240606@081821.4242 ii5dnocjfbvcqrhlaliogjvjlj Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403936 and bi.ref ='324.691.00.01' and bi.lordem =7
20240606@081821.4249 ii5dnocjfbvcqrhlaliogjvjlj Query : use flama_phc
20240606@081821.4252 ii5dnocjfbvcqrhlaliogjvjlj Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081821.4265 ii5dnocjfbvcqrhlaliogjvjlj Query : use flama_phc
20240606@081821.4268 ii5dnocjfbvcqrhlaliogjvjlj Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081821.4277 ii5dnocjfbvcqrhlaliogjvjlj Query : use flama_phc
20240606@081821.4280 ii5dnocjfbvcqrhlaliogjvjlj 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')
20240606@081821.4772 sukim6ir4fmsfn247ucrbnpchq Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081821.4785 sukim6ir4fmsfn247ucrbnpchq Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081821.4799 sukim6ir4fmsfn247ucrbnpchq Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='230';
20240606@081821.4879 sukim6ir4fmsfn247ucrbnpchq Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='230';
20240606@081821.4891 sukim6ir4fmsfn247ucrbnpchq Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='230';
20240606@081821.4902 sukim6ir4fmsfn247ucrbnpchq Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='230';
20240606@081821.4913 sukim6ir4fmsfn247ucrbnpchq Query : use flama_phc
20240606@081821.4916 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081821.4929 sukim6ir4fmsfn247ucrbnpchq Query : use flama_phc
20240606@081821.4931 sukim6ir4fmsfn247ucrbnpchq Query : select no, estab,szadrsdesc from szadrs where u_coddest=2138
20240606@081821.5006 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.5361.00.1'
20240606@081821.5289 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.5361.00.1' and bi.lordem =1
20240606@081821.5621 sukim6ir4fmsfn247ucrbnpchq 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'
20240606@081821.5631 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.698.00.01' and bi.lordem =2
20240606@081821.5944 sukim6ir4fmsfn247ucrbnpchq 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'
20240606@081821.6080 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.2232.00.1' and bi.lordem =3
20240606@081821.6388 sukim6ir4fmsfn247ucrbnpchq 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'
20240606@081821.6399 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='304.422.00.07' and bi.lordem =4
20240606@081821.6743 sukim6ir4fmsfn247ucrbnpchq 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'
20240606@081821.6756 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='304.421.00.04' and bi.lordem =5
20240606@081821.7105 sukim6ir4fmsfn247ucrbnpchq 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'
20240606@081821.7270 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.1706.00.1' and bi.lordem =6
20240606@081821.7621 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.499.00.01'
20240606@081821.7895 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.499.00.01' and bi.lordem =7
20240606@081821.8416 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1834.00.1'
20240606@081821.8430 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.1834.00.1' and bi.lordem =8
20240606@081821.8811 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.497.00.01'
20240606@081821.9726 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.497.00.01' and bi.lordem =9
20240606@081822.3860 sukim6ir4fmsfn247ucrbnpchq 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'
20240606@081822.7080 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.1675.00.2' and bi.lordem =10
20240606@081822.1323 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1685.00.1'
20240606@081822.1538 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.1685.00.1' and bi.lordem =11
20240606@081822.2840 sukim6ir4fmsfn247ucrbnpchq 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'
20240606@081822.3072 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.1608.00.1' and bi.lordem =12
20240606@081822.3417 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8152.00.1'
20240606@081822.3572 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='327.8152.00.1' and bi.lordem =13
20240606@081822.3901 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8152.00.1'
20240606@081822.3921 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='327.8152.00.1' and bi.lordem =13
20240606@081822.3929 sukim6ir4fmsfn247ucrbnpchq 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'
20240606@081822.4095 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='304.4860.00.1' and bi.lordem =14
20240606@081822.4406 sukim6ir4fmsfn247ucrbnpchq 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'
20240606@081822.4577 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.4723.00.2' and bi.lordem =15
20240606@081822.4927 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.988.00.01'
20240606@081822.5088 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.988.00.01' and bi.lordem =16
20240606@081822.5430 sukim6ir4fmsfn247ucrbnpchq 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'
20240606@081822.5441 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.966.00.01' and bi.lordem =17
20240606@081822.5796 sukim6ir4fmsfn247ucrbnpchq 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'
20240606@081822.5951 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.1896.00.1' and bi.lordem =18
20240606@081822.6284 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1690.00.1'
20240606@081822.6295 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.1690.00.1' and bi.lordem =19
20240606@081822.6676 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4906.00.1'
20240606@081822.6847 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.4906.00.1' and bi.lordem =20
20240606@081822.7190 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4906.00.1'
20240606@081822.7202 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.4906.00.1' and bi.lordem =20
20240606@081822.7212 sukim6ir4fmsfn247ucrbnpchq 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'
20240606@081822.7223 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.4421.00.1' and bi.lordem =21
20240606@081822.7559 sukim6ir4fmsfn247ucrbnpchq 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'
20240606@081822.7739 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='327.8253.00.1' and bi.lordem =22
20240606@081822.8201 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2203.00.1'
20240606@081822.8448 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.2203.00.1' and bi.lordem =23
20240606@081822.8777 sukim6ir4fmsfn247ucrbnpchq 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'
20240606@081822.9123 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.5500.00.1' and bi.lordem =24
20240606@081822.9546 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4930.00.1'
20240606@081822.9558 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.4930.00.1' and bi.lordem =25
20240606@081823.1630 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4960.00.1'
20240606@081823.1740 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.4960.00.1' and bi.lordem =26
20240606@081823.5200 sukim6ir4fmsfn247ucrbnpchq 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'
20240606@081823.6790 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.1578.00.1' and bi.lordem =27
20240606@081823.1174 sukim6ir4fmsfn247ucrbnpchq 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'
20240606@081823.1226 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.1578.00.1' and bi.lordem =27
20240606@081823.1234 sukim6ir4fmsfn247ucrbnpchq 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'
20240606@081823.1396 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.1528.00.1' and bi.lordem =28
20240606@081823.1701 sukim6ir4fmsfn247ucrbnpchq 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'
20240606@081823.1858 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.711.00.01' and bi.lordem =29
20240606@081823.2192 sukim6ir4fmsfn247ucrbnpchq 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'
20240606@081823.2203 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.1646.00.1' and bi.lordem =30
20240606@081823.2630 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1407.00.1'
20240606@081823.2795 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.1407.00.1' and bi.lordem =31
20240606@081823.3133 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '328.9306.00.1'
20240606@081823.3296 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='328.9306.00.1' and bi.lordem =32
20240606@081823.3656 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '328.9316.00.1'
20240606@081823.3831 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='328.9316.00.1' and bi.lordem =33
20240606@081823.4175 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '328.9316.00.1'
20240606@081823.4187 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='328.9316.00.1' and bi.lordem =33
20240606@081823.4195 sukim6ir4fmsfn247ucrbnpchq 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'
20240606@081823.4354 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='328.9326.00.1' and bi.lordem =34
20240606@081823.4696 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2223.00.1'
20240606@081823.4708 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.2223.00.1' and bi.lordem =35
20240606@081823.5039 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2224.00.1'
20240606@081823.5052 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.2224.00.1' and bi.lordem =36
20240606@081823.5415 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4840.00.1'
20240606@081823.5584 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.4840.00.1' and bi.lordem =37
20240606@081823.5904 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4724.00.1'
20240606@081823.5917 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.4724.00.1' and bi.lordem =38
20240606@081823.6245 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2221.00.1'
20240606@081823.6400 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.2221.00.1' and bi.lordem =39
20240606@081823.6856 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2222.00.1'
20240606@081823.6870 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.2222.00.1' and bi.lordem =40
20240606@081823.7213 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1221.00.1'
20240606@081823.7371 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.1221.00.1' and bi.lordem =41
20240606@081823.9674 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1643.00.1'
20240606@081823.9688 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.1643.00.1' and bi.lordem =42
20240606@081824.2200 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1831.00.2'
20240606@081824.3400 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.1831.00.2' and bi.lordem =43
20240606@081824.4970 sukim6ir4fmsfn247ucrbnpchq 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'
20240606@081824.6490 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.1832.00.2' and bi.lordem =44
20240606@081824.9880 sukim6ir4fmsfn247ucrbnpchq 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'
20240606@081824.1142 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.1833.00.2' and bi.lordem =45
20240606@081824.1685 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2231.00.1'
20240606@081824.1843 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.2231.00.1' and bi.lordem =46
20240606@081824.2186 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1847.00.1'
20240606@081824.2346 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403944 and bi.ref ='324.1847.00.1' and bi.lordem =47
20240606@081824.2691 sukim6ir4fmsfn247ucrbnpchq Query : use flama_phc
20240606@081824.2695 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081824.2709 sukim6ir4fmsfn247ucrbnpchq Query : use flama_phc
20240606@081824.2713 sukim6ir4fmsfn247ucrbnpchq Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081824.2725 sukim6ir4fmsfn247ucrbnpchq Query : use flama_phc
20240606@081824.2728 sukim6ir4fmsfn247ucrbnpchq 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')
20240606@081824.3541 pl34asqjqstatjafgg0ufjledr Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081824.3554 pl34asqjqstatjafgg0ufjledr Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081824.3574 pl34asqjqstatjafgg0ufjledr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='231';
20240606@081824.3614 pl34asqjqstatjafgg0ufjledr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='231';
20240606@081824.3626 pl34asqjqstatjafgg0ufjledr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='231';
20240606@081824.3638 pl34asqjqstatjafgg0ufjledr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='231';
20240606@081824.3649 pl34asqjqstatjafgg0ufjledr Query : use flama_phc
20240606@081824.3652 pl34asqjqstatjafgg0ufjledr Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081824.3668 pl34asqjqstatjafgg0ufjledr Query : use flama_phc
20240606@081824.3671 pl34asqjqstatjafgg0ufjledr Query : select no, estab,szadrsdesc from szadrs where u_coddest=2155
20240606@081824.3752 pl34asqjqstatjafgg0ufjledr 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'
20240606@081824.3765 pl34asqjqstatjafgg0ufjledr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403947 and bi.ref ='324.711.00.01' and bi.lordem =1
20240606@081824.4215 pl34asqjqstatjafgg0ufjledr Query : use flama_phc
20240606@081824.4219 pl34asqjqstatjafgg0ufjledr Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081824.4235 pl34asqjqstatjafgg0ufjledr Query : use flama_phc
20240606@081824.4239 pl34asqjqstatjafgg0ufjledr Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081824.4254 pl34asqjqstatjafgg0ufjledr Query : use flama_phc
20240606@081824.4257 pl34asqjqstatjafgg0ufjledr 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')
20240606@081824.4712 ej3jogiktr311g3rgh8nodhh2c Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081824.4726 ej3jogiktr311g3rgh8nodhh2c Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081824.4742 ej3jogiktr311g3rgh8nodhh2c Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='232';
20240606@081824.4779 ej3jogiktr311g3rgh8nodhh2c Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='232';
20240606@081824.4790 ej3jogiktr311g3rgh8nodhh2c Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='232';
20240606@081824.4802 ej3jogiktr311g3rgh8nodhh2c Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='232';
20240606@081824.4813 ej3jogiktr311g3rgh8nodhh2c Query : use flama_phc
20240606@081824.4816 ej3jogiktr311g3rgh8nodhh2c Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081824.4833 ej3jogiktr311g3rgh8nodhh2c Query : use flama_phc
20240606@081824.4836 ej3jogiktr311g3rgh8nodhh2c Query : select no, estab,szadrsdesc from szadrs where u_coddest=3145
20240606@081824.4949 ej3jogiktr311g3rgh8nodhh2c Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1690.00.1'
20240606@081824.4961 ej3jogiktr311g3rgh8nodhh2c Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403948 and bi.ref ='324.1690.00.1' and bi.lordem =1
20240606@081824.5333 ej3jogiktr311g3rgh8nodhh2c 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'
20240606@081824.5345 ej3jogiktr311g3rgh8nodhh2c Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403948 and bi.ref ='324.727.00.01' and bi.lordem =2
20240606@081824.5781 ej3jogiktr311g3rgh8nodhh2c Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.642.00.01'
20240606@081824.5945 ej3jogiktr311g3rgh8nodhh2c Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403948 and bi.ref ='324.642.00.01' and bi.lordem =4
20240606@081824.6374 ej3jogiktr311g3rgh8nodhh2c Query : use flama_phc
20240606@081824.6377 ej3jogiktr311g3rgh8nodhh2c Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081824.6391 ej3jogiktr311g3rgh8nodhh2c Query : use flama_phc
20240606@081824.6394 ej3jogiktr311g3rgh8nodhh2c Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081824.6405 ej3jogiktr311g3rgh8nodhh2c Query : use flama_phc
20240606@081824.6408 ej3jogiktr311g3rgh8nodhh2c 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')
20240606@081824.6832 i2betmckhmvb47dsdpoq2g2iq4 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081824.6847 i2betmckhmvb47dsdpoq2g2iq4 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081824.6863 i2betmckhmvb47dsdpoq2g2iq4 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='233';
20240606@081824.6900 i2betmckhmvb47dsdpoq2g2iq4 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='233';
20240606@081824.6911 i2betmckhmvb47dsdpoq2g2iq4 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='233';
20240606@081824.6923 i2betmckhmvb47dsdpoq2g2iq4 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='233';
20240606@081824.6933 i2betmckhmvb47dsdpoq2g2iq4 Query : use flama_phc
20240606@081824.6936 i2betmckhmvb47dsdpoq2g2iq4 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081824.6950 i2betmckhmvb47dsdpoq2g2iq4 Query : use flama_phc
20240606@081824.6953 i2betmckhmvb47dsdpoq2g2iq4 Query : select no, estab,szadrsdesc from szadrs where u_coddest=68
20240606@081824.7034 i2betmckhmvb47dsdpoq2g2iq4 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'
20240606@081824.7045 i2betmckhmvb47dsdpoq2g2iq4 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403949 and bi.ref ='324.727.00.01' and bi.lordem =1
20240606@081824.7381 i2betmckhmvb47dsdpoq2g2iq4 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.4211.00.1'
20240606@081824.7549 i2betmckhmvb47dsdpoq2g2iq4 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403949 and bi.ref ='304.4211.00.1' and bi.lordem =2
20240606@081824.7990 i2betmckhmvb47dsdpoq2g2iq4 Query : use flama_phc
20240606@081824.7994 i2betmckhmvb47dsdpoq2g2iq4 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081824.8007 i2betmckhmvb47dsdpoq2g2iq4 Query : use flama_phc
20240606@081824.8010 i2betmckhmvb47dsdpoq2g2iq4 Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081824.8020 i2betmckhmvb47dsdpoq2g2iq4 Query : use flama_phc
20240606@081824.8023 i2betmckhmvb47dsdpoq2g2iq4 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')
20240606@081824.9052 u4kebeulsot3lksf54en5l0fm5 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081824.9066 u4kebeulsot3lksf54en5l0fm5 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081824.9082 u4kebeulsot3lksf54en5l0fm5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='234';
20240606@081824.9126 u4kebeulsot3lksf54en5l0fm5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='234';
20240606@081825.3580 u4kebeulsot3lksf54en5l0fm5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='234';
20240606@081825.3740 u4kebeulsot3lksf54en5l0fm5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='234';
20240606@081825.3860 u4kebeulsot3lksf54en5l0fm5 Query : use flama_phc
20240606@081825.3890 u4kebeulsot3lksf54en5l0fm5 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081825.4030 u4kebeulsot3lksf54en5l0fm5 Query : use flama_phc
20240606@081825.4060 u4kebeulsot3lksf54en5l0fm5 Query : select no, estab,szadrsdesc from szadrs where u_coddest=233
20240606@081825.4810 u4kebeulsot3lksf54en5l0fm5 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'
20240606@081825.4920 u4kebeulsot3lksf54en5l0fm5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403950 and bi.ref ='324.727.00.01' and bi.lordem =1
20240606@081825.8210 u4kebeulsot3lksf54en5l0fm5 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1643.00.1'
20240606@081825.8330 u4kebeulsot3lksf54en5l0fm5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403950 and bi.ref ='324.1643.00.1' and bi.lordem =2
20240606@081825.1260 u4kebeulsot3lksf54en5l0fm5 Query : use flama_phc
20240606@081825.1263 u4kebeulsot3lksf54en5l0fm5 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081825.1277 u4kebeulsot3lksf54en5l0fm5 Query : use flama_phc
20240606@081825.1280 u4kebeulsot3lksf54en5l0fm5 Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081825.1291 u4kebeulsot3lksf54en5l0fm5 Query : use flama_phc
20240606@081825.1294 u4kebeulsot3lksf54en5l0fm5 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')
20240606@081825.1883 8cdp1ut29amhvho093t09giq2d Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081825.1910 8cdp1ut29amhvho093t09giq2d Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081825.2014 8cdp1ut29amhvho093t09giq2d Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='235';
20240606@081825.2227 8cdp1ut29amhvho093t09giq2d Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='235';
20240606@081825.2239 8cdp1ut29amhvho093t09giq2d Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='235';
20240606@081825.2251 8cdp1ut29amhvho093t09giq2d Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='235';
20240606@081825.2262 8cdp1ut29amhvho093t09giq2d Query : use flama_phc
20240606@081825.2265 8cdp1ut29amhvho093t09giq2d Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081825.2492 8cdp1ut29amhvho093t09giq2d Query : use flama_phc
20240606@081825.2549 8cdp1ut29amhvho093t09giq2d Query : select no, estab,szadrsdesc from szadrs where u_coddest=1498
20240606@081825.3208 8cdp1ut29amhvho093t09giq2d 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'
20240606@081825.3442 8cdp1ut29amhvho093t09giq2d Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403951 and bi.ref ='324.2031.00.1' and bi.lordem =1
20240606@081825.3980 8cdp1ut29amhvho093t09giq2d 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'
20240606@081825.4430 8cdp1ut29amhvho093t09giq2d Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403951 and bi.ref ='324.4585.00.1' and bi.lordem =2
20240606@081825.5324 8cdp1ut29amhvho093t09giq2d Query : use flama_phc
20240606@081825.5327 8cdp1ut29amhvho093t09giq2d Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081825.5341 8cdp1ut29amhvho093t09giq2d Query : use flama_phc
20240606@081825.5344 8cdp1ut29amhvho093t09giq2d Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081825.5354 8cdp1ut29amhvho093t09giq2d Query : use flama_phc
20240606@081825.5357 8cdp1ut29amhvho093t09giq2d 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')
20240606@081825.5846 cr07k55vkfg6fmcei5s5ls2im9 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081825.5860 cr07k55vkfg6fmcei5s5ls2im9 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081825.5878 cr07k55vkfg6fmcei5s5ls2im9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='236';
20240606@081825.5920 cr07k55vkfg6fmcei5s5ls2im9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='236';
20240606@081825.5931 cr07k55vkfg6fmcei5s5ls2im9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='236';
20240606@081825.5942 cr07k55vkfg6fmcei5s5ls2im9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='236';
20240606@081825.5953 cr07k55vkfg6fmcei5s5ls2im9 Query : use flama_phc
20240606@081825.5955 cr07k55vkfg6fmcei5s5ls2im9 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081825.5970 cr07k55vkfg6fmcei5s5ls2im9 Query : use flama_phc
20240606@081825.5973 cr07k55vkfg6fmcei5s5ls2im9 Query : select no, estab,szadrsdesc from szadrs where u_coddest=7737
20240606@081825.6048 cr07k55vkfg6fmcei5s5ls2im9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.642.00.01'
20240606@081825.6060 cr07k55vkfg6fmcei5s5ls2im9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403952 and bi.ref ='324.642.00.01' and bi.lordem =1
20240606@081825.6602 cr07k55vkfg6fmcei5s5ls2im9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.642.00.01'
20240606@081825.6626 cr07k55vkfg6fmcei5s5ls2im9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403952 and bi.ref ='324.642.00.01' and bi.lordem =1
20240606@081825.6635 cr07k55vkfg6fmcei5s5ls2im9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1690.00.1'
20240606@081825.6839 cr07k55vkfg6fmcei5s5ls2im9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403952 and bi.ref ='324.1690.00.1' and bi.lordem =3
20240606@081825.7745 cr07k55vkfg6fmcei5s5ls2im9 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'
20240606@081825.8228 cr07k55vkfg6fmcei5s5ls2im9 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403952 and bi.ref ='328.9902.00.1' and bi.lordem =4
20240606@081825.9016 cr07k55vkfg6fmcei5s5ls2im9 Query : use flama_phc
20240606@081825.9019 cr07k55vkfg6fmcei5s5ls2im9 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081825.9033 cr07k55vkfg6fmcei5s5ls2im9 Query : use flama_phc
20240606@081825.9036 cr07k55vkfg6fmcei5s5ls2im9 Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081825.9046 cr07k55vkfg6fmcei5s5ls2im9 Query : use flama_phc
20240606@081825.9049 cr07k55vkfg6fmcei5s5ls2im9 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')
20240606@081825.9593 19n47mjlu7prb48thh024flmh7 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081825.9612 19n47mjlu7prb48thh024flmh7 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081825.9628 19n47mjlu7prb48thh024flmh7 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='237';
20240606@081825.9670 19n47mjlu7prb48thh024flmh7 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='237';
20240606@081825.9681 19n47mjlu7prb48thh024flmh7 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='237';
20240606@081825.9693 19n47mjlu7prb48thh024flmh7 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='237';
20240606@081825.9703 19n47mjlu7prb48thh024flmh7 Query : use flama_phc
20240606@081825.9706 19n47mjlu7prb48thh024flmh7 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081825.9719 19n47mjlu7prb48thh024flmh7 Query : use flama_phc
20240606@081825.9722 19n47mjlu7prb48thh024flmh7 Query : select no, estab,szadrsdesc from szadrs where u_coddest=1452
20240606@081825.9796 19n47mjlu7prb48thh024flmh7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.658.00.01'
20240606@081825.9957 19n47mjlu7prb48thh024flmh7 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403953 and bi.ref ='324.658.00.01' and bi.lordem =1
20240606@081826.2890 19n47mjlu7prb48thh024flmh7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.658.00.01'
20240606@081826.3000 19n47mjlu7prb48thh024flmh7 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403953 and bi.ref ='324.658.00.01' and bi.lordem =1
20240606@081826.3060 19n47mjlu7prb48thh024flmh7 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'
20240606@081826.3170 19n47mjlu7prb48thh024flmh7 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403953 and bi.ref ='304.4860.00.1' and bi.lordem =2
20240606@081826.6560 19n47mjlu7prb48thh024flmh7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1643.00.1'
20240606@081826.6680 19n47mjlu7prb48thh024flmh7 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403953 and bi.ref ='324.1643.00.1' and bi.lordem =3
20240606@081826.1146 19n47mjlu7prb48thh024flmh7 Query : use flama_phc
20240606@081826.1186 19n47mjlu7prb48thh024flmh7 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081826.1407 19n47mjlu7prb48thh024flmh7 Query : use flama_phc
20240606@081826.1448 19n47mjlu7prb48thh024flmh7 Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081826.1625 19n47mjlu7prb48thh024flmh7 Query : use flama_phc
20240606@081826.1629 19n47mjlu7prb48thh024flmh7 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')
20240606@081826.2072 gnddnnciq1l8lfjlunothvekij Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081826.2086 gnddnnciq1l8lfjlunothvekij Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081826.2102 gnddnnciq1l8lfjlunothvekij Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='238';
20240606@081826.2171 gnddnnciq1l8lfjlunothvekij Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='238';
20240606@081826.2184 gnddnnciq1l8lfjlunothvekij Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='238';
20240606@081826.2196 gnddnnciq1l8lfjlunothvekij Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='238';
20240606@081826.2207 gnddnnciq1l8lfjlunothvekij Query : use flama_phc
20240606@081826.2210 gnddnnciq1l8lfjlunothvekij Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081826.2225 gnddnnciq1l8lfjlunothvekij Query : use flama_phc
20240606@081826.2228 gnddnnciq1l8lfjlunothvekij Query : select no, estab,szadrsdesc from szadrs where u_coddest=1328
20240606@081826.2330 gnddnnciq1l8lfjlunothvekij Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1690.00.1'
20240606@081826.2343 gnddnnciq1l8lfjlunothvekij Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403954 and bi.ref ='324.1690.00.1' and bi.lordem =1
20240606@081826.2773 gnddnnciq1l8lfjlunothvekij 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'
20240606@081826.2785 gnddnnciq1l8lfjlunothvekij Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403954 and bi.ref ='324.698.00.01' and bi.lordem =2
20240606@081826.3129 gnddnnciq1l8lfjlunothvekij 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'
20240606@081826.3142 gnddnnciq1l8lfjlunothvekij Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403954 and bi.ref ='324.698.00.01' and bi.lordem =3
20240606@081826.3466 gnddnnciq1l8lfjlunothvekij Query : use flama_phc
20240606@081826.3471 gnddnnciq1l8lfjlunothvekij Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081826.3487 gnddnnciq1l8lfjlunothvekij Query : use flama_phc
20240606@081826.3490 gnddnnciq1l8lfjlunothvekij Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081826.3503 gnddnnciq1l8lfjlunothvekij Query : use flama_phc
20240606@081826.3506 gnddnnciq1l8lfjlunothvekij 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')
20240606@081826.3986 94qh85sqd1ca1hgav1415s6qk8 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081826.4001 94qh85sqd1ca1hgav1415s6qk8 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081826.4016 94qh85sqd1ca1hgav1415s6qk8 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='239';
20240606@081826.4057 94qh85sqd1ca1hgav1415s6qk8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='239';
20240606@081826.4070 94qh85sqd1ca1hgav1415s6qk8 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='239';
20240606@081826.4081 94qh85sqd1ca1hgav1415s6qk8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='239';
20240606@081826.4092 94qh85sqd1ca1hgav1415s6qk8 Query : use flama_phc
20240606@081826.4095 94qh85sqd1ca1hgav1415s6qk8 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081826.4108 94qh85sqd1ca1hgav1415s6qk8 Query : use flama_phc
20240606@081826.4112 94qh85sqd1ca1hgav1415s6qk8 Query : select no, estab,szadrsdesc from szadrs where u_coddest=3080
20240606@081826.4190 94qh85sqd1ca1hgav1415s6qk8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1690.00.1'
20240606@081826.4203 94qh85sqd1ca1hgav1415s6qk8 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403955 and bi.ref ='324.1690.00.1' and bi.lordem =1
20240606@081826.4655 94qh85sqd1ca1hgav1415s6qk8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1690.00.1'
20240606@081826.4668 94qh85sqd1ca1hgav1415s6qk8 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403955 and bi.ref ='324.1690.00.1' and bi.lordem =1
20240606@081826.4676 94qh85sqd1ca1hgav1415s6qk8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1643.00.1'
20240606@081826.4687 94qh85sqd1ca1hgav1415s6qk8 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403955 and bi.ref ='324.1643.00.1' and bi.lordem =2
20240606@081826.5268 94qh85sqd1ca1hgav1415s6qk8 Query : use flama_phc
20240606@081826.5272 94qh85sqd1ca1hgav1415s6qk8 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081826.5286 94qh85sqd1ca1hgav1415s6qk8 Query : use flama_phc
20240606@081826.5289 94qh85sqd1ca1hgav1415s6qk8 Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081826.5300 94qh85sqd1ca1hgav1415s6qk8 Query : use flama_phc
20240606@081826.5303 94qh85sqd1ca1hgav1415s6qk8 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')
20240606@081826.5813 babalqei9a6g3nmlu0fvd2gk7q Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081826.5828 babalqei9a6g3nmlu0fvd2gk7q Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081826.5845 babalqei9a6g3nmlu0fvd2gk7q Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='240';
20240606@081826.5885 babalqei9a6g3nmlu0fvd2gk7q Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='240';
20240606@081826.5896 babalqei9a6g3nmlu0fvd2gk7q Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='240';
20240606@081826.5907 babalqei9a6g3nmlu0fvd2gk7q Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='240';
20240606@081826.5918 babalqei9a6g3nmlu0fvd2gk7q Query : use flama_phc
20240606@081826.5921 babalqei9a6g3nmlu0fvd2gk7q Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081826.5934 babalqei9a6g3nmlu0fvd2gk7q Query : use flama_phc
20240606@081826.5937 babalqei9a6g3nmlu0fvd2gk7q Query : select no, estab,szadrsdesc from szadrs where u_coddest=2374
20240606@081826.6013 babalqei9a6g3nmlu0fvd2gk7q Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1690.00.1'
20240606@081826.6026 babalqei9a6g3nmlu0fvd2gk7q Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403956 and bi.ref ='324.1690.00.1' and bi.lordem =1
20240606@081826.6350 babalqei9a6g3nmlu0fvd2gk7q Query : use flama_phc
20240606@081826.6354 babalqei9a6g3nmlu0fvd2gk7q Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081826.6384 babalqei9a6g3nmlu0fvd2gk7q Query : use flama_phc
20240606@081826.6388 babalqei9a6g3nmlu0fvd2gk7q Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081826.6400 babalqei9a6g3nmlu0fvd2gk7q Query : use flama_phc
20240606@081826.6403 babalqei9a6g3nmlu0fvd2gk7q 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')
20240606@081826.6851 vnjl95m8hcuaam50c0l6oal4rr Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081826.6864 vnjl95m8hcuaam50c0l6oal4rr Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081826.6880 vnjl95m8hcuaam50c0l6oal4rr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='241';
20240606@081826.6921 vnjl95m8hcuaam50c0l6oal4rr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='241';
20240606@081826.6932 vnjl95m8hcuaam50c0l6oal4rr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='241';
20240606@081826.6943 vnjl95m8hcuaam50c0l6oal4rr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='241';
20240606@081826.6953 vnjl95m8hcuaam50c0l6oal4rr Query : use flama_phc
20240606@081826.6956 vnjl95m8hcuaam50c0l6oal4rr Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081826.6973 vnjl95m8hcuaam50c0l6oal4rr Query : use flama_phc
20240606@081826.6976 vnjl95m8hcuaam50c0l6oal4rr Query : select no, estab,szadrsdesc from szadrs where u_coddest=634
20240606@081826.7052 vnjl95m8hcuaam50c0l6oal4rr Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1643.00.1'
20240606@081826.7063 vnjl95m8hcuaam50c0l6oal4rr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403958 and bi.ref ='324.1643.00.1' and bi.lordem =1
20240606@081826.7390 vnjl95m8hcuaam50c0l6oal4rr Query : use flama_phc
20240606@081826.7394 vnjl95m8hcuaam50c0l6oal4rr Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081826.7408 vnjl95m8hcuaam50c0l6oal4rr Query : use flama_phc
20240606@081826.7410 vnjl95m8hcuaam50c0l6oal4rr Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081826.7421 vnjl95m8hcuaam50c0l6oal4rr Query : use flama_phc
20240606@081826.7424 vnjl95m8hcuaam50c0l6oal4rr 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')
20240606@081826.8069 o2crolaqu8dd0042ro00u8i77c Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081826.8134 o2crolaqu8dd0042ro00u8i77c Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081826.8349 o2crolaqu8dd0042ro00u8i77c Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='242';
20240606@081826.8518 o2crolaqu8dd0042ro00u8i77c Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='242';
20240606@081826.8531 o2crolaqu8dd0042ro00u8i77c Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='242';
20240606@081826.8542 o2crolaqu8dd0042ro00u8i77c Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='242';
20240606@081826.8553 o2crolaqu8dd0042ro00u8i77c Query : use flama_phc
20240606@081826.8556 o2crolaqu8dd0042ro00u8i77c Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081826.8576 o2crolaqu8dd0042ro00u8i77c Query : use flama_phc
20240606@081826.8579 o2crolaqu8dd0042ro00u8i77c Query : select no, estab,szadrsdesc from szadrs where u_coddest=4500
20240606@081826.8653 o2crolaqu8dd0042ro00u8i77c Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1643.00.1'
20240606@081826.8664 o2crolaqu8dd0042ro00u8i77c Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403959 and bi.ref ='324.1643.00.1' and bi.lordem =1
20240606@081826.9038 o2crolaqu8dd0042ro00u8i77c 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'
20240606@081826.9049 o2crolaqu8dd0042ro00u8i77c Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403959 and bi.ref ='324.698.00.01' and bi.lordem =2
20240606@081826.9457 o2crolaqu8dd0042ro00u8i77c 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'
20240606@081826.9470 o2crolaqu8dd0042ro00u8i77c Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403959 and bi.ref ='324.698.00.01' and bi.lordem =3
20240606@081826.9814 o2crolaqu8dd0042ro00u8i77c Query : use flama_phc
20240606@081826.9818 o2crolaqu8dd0042ro00u8i77c Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081826.9832 o2crolaqu8dd0042ro00u8i77c Query : use flama_phc
20240606@081826.9835 o2crolaqu8dd0042ro00u8i77c Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081826.9845 o2crolaqu8dd0042ro00u8i77c Query : use flama_phc
20240606@081826.9848 o2crolaqu8dd0042ro00u8i77c 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')
20240606@081827.8180 4cer1sbgb33n02do1bbd227keo Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081827.8960 4cer1sbgb33n02do1bbd227keo Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081827.1107 4cer1sbgb33n02do1bbd227keo Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='243';
20240606@081827.1347 4cer1sbgb33n02do1bbd227keo Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='243';
20240606@081827.1430 4cer1sbgb33n02do1bbd227keo Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='243';
20240606@081827.1643 4cer1sbgb33n02do1bbd227keo Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='243';
20240606@081827.1850 4cer1sbgb33n02do1bbd227keo Query : use flama_phc
20240606@081827.1953 4cer1sbgb33n02do1bbd227keo Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081827.2367 4cer1sbgb33n02do1bbd227keo Query : use flama_phc
20240606@081827.2412 4cer1sbgb33n02do1bbd227keo Query : select no, estab,szadrsdesc from szadrs where u_coddest=7737
20240606@081827.3190 4cer1sbgb33n02do1bbd227keo 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'
20240606@081827.3607 4cer1sbgb33n02do1bbd227keo Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403960 and bi.ref ='328.9902.00.1' and bi.lordem =1
20240606@081827.5164 4cer1sbgb33n02do1bbd227keo Query : use flama_phc
20240606@081827.5205 4cer1sbgb33n02do1bbd227keo Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081827.5424 4cer1sbgb33n02do1bbd227keo Query : use flama_phc
20240606@081827.5464 4cer1sbgb33n02do1bbd227keo Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081827.5746 4cer1sbgb33n02do1bbd227keo Query : use flama_phc
20240606@081827.5786 4cer1sbgb33n02do1bbd227keo 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')
20240606@081827.6585 9pobnn9dj8h0q61r8p3la5p8su Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081827.6654 9pobnn9dj8h0q61r8p3la5p8su Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081827.6852 9pobnn9dj8h0q61r8p3la5p8su Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='244';
20240606@081827.6905 9pobnn9dj8h0q61r8p3la5p8su Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='244';
20240606@081827.6923 9pobnn9dj8h0q61r8p3la5p8su Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='244';
20240606@081827.6937 9pobnn9dj8h0q61r8p3la5p8su Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='244';
20240606@081827.6951 9pobnn9dj8h0q61r8p3la5p8su Query : use flama_phc
20240606@081827.6954 9pobnn9dj8h0q61r8p3la5p8su Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081827.6971 9pobnn9dj8h0q61r8p3la5p8su Query : use flama_phc
20240606@081827.6976 9pobnn9dj8h0q61r8p3la5p8su Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240606@081827.7012 9pobnn9dj8h0q61r8p3la5p8su 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'
20240606@081827.7024 9pobnn9dj8h0q61r8p3la5p8su Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403961 and bi.ref ='324.4723.00.2' and bi.lordem =1
20240606@081827.7390 9pobnn9dj8h0q61r8p3la5p8su 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'
20240606@081827.7401 9pobnn9dj8h0q61r8p3la5p8su Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403961 and bi.ref ='324.4723.00.2' and bi.lordem =1
20240606@081827.7407 9pobnn9dj8h0q61r8p3la5p8su 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'
20240606@081827.7416 9pobnn9dj8h0q61r8p3la5p8su Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403961 and bi.ref ='324.4723.00.2' and bi.lordem =1
20240606@081827.7423 9pobnn9dj8h0q61r8p3la5p8su Query : use flama_phc
20240606@081827.7426 9pobnn9dj8h0q61r8p3la5p8su Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081827.7438 9pobnn9dj8h0q61r8p3la5p8su Query : use flama_phc
20240606@081827.7441 9pobnn9dj8h0q61r8p3la5p8su Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081827.7451 9pobnn9dj8h0q61r8p3la5p8su Query : use flama_phc
20240606@081827.7454 9pobnn9dj8h0q61r8p3la5p8su 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')
20240606@081827.7914 hmn749elk7vbo9fdg2rqv76e3n Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081827.7996 hmn749elk7vbo9fdg2rqv76e3n Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081827.8253 hmn749elk7vbo9fdg2rqv76e3n Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='245';
20240606@081827.8489 hmn749elk7vbo9fdg2rqv76e3n Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='245';
20240606@081827.8532 hmn749elk7vbo9fdg2rqv76e3n Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='245';
20240606@081827.8545 hmn749elk7vbo9fdg2rqv76e3n Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='245';
20240606@081827.8628 hmn749elk7vbo9fdg2rqv76e3n Query : use flama_phc
20240606@081827.8669 hmn749elk7vbo9fdg2rqv76e3n Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081827.8945 hmn749elk7vbo9fdg2rqv76e3n Query : use flama_phc
20240606@081827.8986 hmn749elk7vbo9fdg2rqv76e3n Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240606@081827.9219 hmn749elk7vbo9fdg2rqv76e3n Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1470.00.1'
20240606@081827.9629 hmn749elk7vbo9fdg2rqv76e3n Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403962 and bi.ref ='324.1470.00.1' and bi.lordem =1
20240606@081828.1700 hmn749elk7vbo9fdg2rqv76e3n Query : use flama_phc
20240606@081828.1730 hmn749elk7vbo9fdg2rqv76e3n Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@081828.3080 hmn749elk7vbo9fdg2rqv76e3n Query : use flama_phc
20240606@081828.3480 hmn749elk7vbo9fdg2rqv76e3n Query : select top 1 1 valor from td where td.ndoc = 39
20240606@081828.4470 hmn749elk7vbo9fdg2rqv76e3n Query : use flama_phc
20240606@081828.4870 hmn749elk7vbo9fdg2rqv76e3n 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')
20240606@081854.7039 roakja470llernihm39rlm0bih Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@081854.7053 roakja470llernihm39rlm0bih Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@081854.7070 roakja470llernihm39rlm0bih Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='246';
20240606@081854.7117 roakja470llernihm39rlm0bih Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='246';
20240606@081854.7130 roakja470llernihm39rlm0bih Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='246';
20240606@081854.7142 roakja470llernihm39rlm0bih Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='246';
20240606@081854.7154 roakja470llernihm39rlm0bih Query : use flama_phc
20240606@081854.7158 roakja470llernihm39rlm0bih Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@081854.7173 roakja470llernihm39rlm0bih Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.2386.00.1'
20240606@081854.7317 roakja470llernihm39rlm0bih Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =gt2 and bo.boano =2002 and bo.obrano = 024/301 and bi.ref ='324.2386.00.1' and bi.lordem =6
20240606@081912.1220 f1o74t61kfepb8h2ud1qb1rbus Query : use flama_phc
20240606@081912.1270 f1o74t61kfepb8h2ud1qb1rbus Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@081912.1850 f1o74t61kfepb8h2ud1qb1rbus Query : use flama_phc
20240606@081912.1890 f1o74t61kfepb8h2ud1qb1rbus Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@083612.3641 ajti921ta3ebnagd5b1q9u1m1a Query : use flama_phc
20240606@083612.3985 ajti921ta3ebnagd5b1q9u1m1a Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@083612.4039 ajti921ta3ebnagd5b1q9u1m1a Query : use flama_phc
20240606@083612.4042 ajti921ta3ebnagd5b1q9u1m1a Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@091911.1890 gqs7qqb98qvkm0gjmtn29a4ahm Query : use flama_phc
20240606@091911.1940 gqs7qqb98qvkm0gjmtn29a4ahm Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@091911.2490 gqs7qqb98qvkm0gjmtn29a4ahm Query : use flama_phc
20240606@091911.2520 gqs7qqb98qvkm0gjmtn29a4ahm Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@093355.3486 arfk7e2jdah1rdcdbsj12vhdc6 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@093355.3515 arfk7e2jdah1rdcdbsj12vhdc6 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@093355.3560 arfk7e2jdah1rdcdbsj12vhdc6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='247';
20240606@093355.3596 arfk7e2jdah1rdcdbsj12vhdc6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='247';
20240606@093355.3620 arfk7e2jdah1rdcdbsj12vhdc6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='247';
20240606@093355.3632 arfk7e2jdah1rdcdbsj12vhdc6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='247';
20240606@093355.3644 arfk7e2jdah1rdcdbsj12vhdc6 Query : use flama_phc
20240606@093355.3648 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@093355.3693 arfk7e2jdah1rdcdbsj12vhdc6 Query : use flama_phc
20240606@093355.3696 arfk7e2jdah1rdcdbsj12vhdc6 Query : select no, estab,szadrsdesc from szadrs where u_coddest=2138
20240606@093355.3764 arfk7e2jdah1rdcdbsj12vhdc6 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'
20240606@093355.3911 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='304.422.00.07' and bi.lordem =1
20240606@093355.4228 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1834.00.1'
20240606@093355.4478 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.1834.00.1' and bi.lordem =2
20240606@093355.4794 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.497.00.01'
20240606@093355.4940 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.497.00.01' and bi.lordem =3
20240606@093355.5257 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1716.00.1'
20240606@093355.5443 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.1716.00.1' and bi.lordem =4
20240606@093355.6903 arfk7e2jdah1rdcdbsj12vhdc6 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'
20240606@093355.7072 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='304.4860.00.1' and bi.lordem =5
20240606@093355.7402 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.988.00.01'
20240606@093355.7549 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.988.00.01' and bi.lordem =6
20240606@093355.7879 arfk7e2jdah1rdcdbsj12vhdc6 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'
20240606@093355.8028 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.1406.00.1' and bi.lordem =7
20240606@093355.8548 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1690.00.1'
20240606@093355.8703 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.1690.00.1' and bi.lordem =8
20240606@093355.9031 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1426.00.1'
20240606@093355.9188 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.1426.00.1' and bi.lordem =9
20240606@093355.9683 arfk7e2jdah1rdcdbsj12vhdc6 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'
20240606@093355.9832 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.727.00.01' and bi.lordem =10
20240606@093356.1530 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.719.00.01'
20240606@093356.3030 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.719.00.01' and bi.lordem =11
20240606@093356.6340 arfk7e2jdah1rdcdbsj12vhdc6 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'
20240606@093356.8720 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.1646.00.1' and bi.lordem =12
20240606@093356.1201 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1407.00.1'
20240606@093356.1350 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.1407.00.1' and bi.lordem =13
20240606@093356.1687 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4840.00.1'
20240606@093356.1936 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.4840.00.1' and bi.lordem =14
20240606@093356.2273 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1643.00.1'
20240606@093356.2578 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.1643.00.1' and bi.lordem =15
20240606@093356.3965 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1831.00.2'
20240606@093356.4260 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.1831.00.2' and bi.lordem =16
20240606@093356.4582 arfk7e2jdah1rdcdbsj12vhdc6 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'
20240606@093356.4730 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.1832.00.2' and bi.lordem =17
20240606@093356.5056 arfk7e2jdah1rdcdbsj12vhdc6 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'
20240606@093356.5066 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.1832.00.2' and bi.lordem =17
20240606@093356.5073 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.945.00.01'
20240606@093356.5322 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.945.00.01' and bi.lordem =18
20240606@093356.5651 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2231.00.1'
20240606@093356.5800 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.2231.00.1' and bi.lordem =19
20240606@093356.6118 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1847.00.1'
20240606@093356.6360 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.1847.00.1' and bi.lordem =20
20240606@093356.6691 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1847.00.1'
20240606@093356.6701 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.1847.00.1' and bi.lordem =20
20240606@093356.6708 arfk7e2jdah1rdcdbsj12vhdc6 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'
20240606@093356.6857 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.657.00.01' and bi.lordem =21
20240606@093356.7174 arfk7e2jdah1rdcdbsj12vhdc6 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'
20240606@093356.7413 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.682.00.01' and bi.lordem =22
20240606@093356.7738 arfk7e2jdah1rdcdbsj12vhdc6 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'
20240606@093356.7896 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.698.00.01' and bi.lordem =23
20240606@093356.8217 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.946.00.01'
20240606@093356.8364 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.946.00.01' and bi.lordem =24
20240606@093356.8781 arfk7e2jdah1rdcdbsj12vhdc6 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'
20240606@093356.8929 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.2232.00.1' and bi.lordem =25
20240606@093356.9255 arfk7e2jdah1rdcdbsj12vhdc6 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'
20240606@093356.9265 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403937 and bi.ref ='324.2232.00.1' and bi.lordem =25
20240606@093356.9273 arfk7e2jdah1rdcdbsj12vhdc6 Query : use flama_phc
20240606@093356.9276 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@093356.9453 arfk7e2jdah1rdcdbsj12vhdc6 Query : use flama_phc
20240606@093356.9456 arfk7e2jdah1rdcdbsj12vhdc6 Query : select top 1 1 valor from td where td.ndoc = 39
20240606@093356.9535 arfk7e2jdah1rdcdbsj12vhdc6 Query : use flama_phc
20240606@093356.9538 arfk7e2jdah1rdcdbsj12vhdc6 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')
20240606@093610.9757 4ar4rdl237378dnqns6699tvh8 Query : use flama_phc
20240606@093610.9762 4ar4rdl237378dnqns6699tvh8 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@093610.9780 4ar4rdl237378dnqns6699tvh8 Query : use flama_phc
20240606@093610.9783 4ar4rdl237378dnqns6699tvh8 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@101910.1708 f77oiqu4o5ojggbjed6j5e305k Query : use flama_phc
20240606@101910.1759 f77oiqu4o5ojggbjed6j5e305k Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@101910.1978 f77oiqu4o5ojggbjed6j5e305k Query : use flama_phc
20240606@101910.1982 f77oiqu4o5ojggbjed6j5e305k Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@103610.9400 ga91qrv4os1n4jfg2oahun26k0 Query : use flama_phc
20240606@103610.9900 ga91qrv4os1n4jfg2oahun26k0 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@103610.1170 ga91qrv4os1n4jfg2oahun26k0 Query : use flama_phc
20240606@103610.2530 ga91qrv4os1n4jfg2oahun26k0 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@104918.3786 bd72rnkg6br0bm1btmafgfvcdg Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@104918.4431 bd72rnkg6br0bm1btmafgfvcdg Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@104918.5005 bd72rnkg6br0bm1btmafgfvcdg Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='248';
20240606@104918.5051 bd72rnkg6br0bm1btmafgfvcdg Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='248';
20240606@104918.5065 bd72rnkg6br0bm1btmafgfvcdg Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='248';
20240606@104918.5077 bd72rnkg6br0bm1btmafgfvcdg Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='248';
20240606@104918.5088 bd72rnkg6br0bm1btmafgfvcdg Query : use flama_phc
20240606@104918.5091 bd72rnkg6br0bm1btmafgfvcdg Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@104918.5107 bd72rnkg6br0bm1btmafgfvcdg Query : use flama_phc
20240606@104918.5110 bd72rnkg6br0bm1btmafgfvcdg Query : select no, estab,szadrsdesc from szadrs where u_coddest=7254
20240606@104918.5188 bd72rnkg6br0bm1btmafgfvcdg Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1690.00.1'
20240606@104918.5205 bd72rnkg6br0bm1btmafgfvcdg Query : use flama_phc
20240606@104918.5208 bd72rnkg6br0bm1btmafgfvcdg Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@104918.5220 bd72rnkg6br0bm1btmafgfvcdg Query : use flama_phc
20240606@104918.5223 bd72rnkg6br0bm1btmafgfvcdg Query : select top 1 1 valor from td where td.ndoc = 39
20240606@104918.5235 bd72rnkg6br0bm1btmafgfvcdg Query : use flama_phc
20240606@104918.5237 bd72rnkg6br0bm1btmafgfvcdg 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')
20240606@105055.8673 u1sggqvs99k38snil235s5kcm6 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@105055.8687 u1sggqvs99k38snil235s5kcm6 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@105055.8702 u1sggqvs99k38snil235s5kcm6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='249';
20240606@105055.8743 u1sggqvs99k38snil235s5kcm6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='249';
20240606@105055.8756 u1sggqvs99k38snil235s5kcm6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='249';
20240606@105055.8770 u1sggqvs99k38snil235s5kcm6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='249';
20240606@105055.8785 u1sggqvs99k38snil235s5kcm6 Query : use flama_phc
20240606@105055.8788 u1sggqvs99k38snil235s5kcm6 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@105055.8803 u1sggqvs99k38snil235s5kcm6 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.679.00.01'
20240606@105055.8921 u1sggqvs99k38snil235s5kcm6 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 = 2400127 and bi.ref ='324.679.00.01' and bi.lordem =10000
20240606@105055.9296 u1sggqvs99k38snil235s5kcm6 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 = 'cps24020170720,947000004 ' 
20240606@105055.9601 u1sggqvs99k38snil235s5kcm6 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.675.00.01'
20240606@105055.9708 u1sggqvs99k38snil235s5kcm6 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 = 2400127 and bi.ref ='324.675.00.01' and bi.lordem =2
20240606@105056.5700 u1sggqvs99k38snil235s5kcm6 Query : use flama_phc
20240606@105056.6000 u1sggqvs99k38snil235s5kcm6 Query : select top 1 1 valor from ts where ts.ndos = 61
20240606@105056.1320 u1sggqvs99k38snil235s5kcm6 Query : use flama_phc
20240606@105056.1350 u1sggqvs99k38snil235s5kcm6 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')
20240606@105056.1530 u1sggqvs99k38snil235s5kcm6 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
20240606@105056.2820 u1sggqvs99k38snil235s5kcm6 Query : use flama_phc
20240606@105056.2860 u1sggqvs99k38snil235s5kcm6 Query : select top 1 ~inactivo valor from fl where no = '202549' and estab = 00 order by inactivo desc
20240606@105056.3700 u1sggqvs99k38snil235s5kcm6 Query : use flama_phc
20240606@105056.3730 u1sggqvs99k38snil235s5kcm6 Query : select 1 valor from ts where ndos = 61
20240606@105056.4400 u1sggqvs99k38snil235s5kcm6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@105056.7340 u1sggqvs99k38snil235s5kcm6 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20240606@105056.8140 u1sggqvs99k38snil235s5kcm6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@105056.8270 u1sggqvs99k38snil235s5kcm6 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20240606@105056.8340 u1sggqvs99k38snil235s5kcm6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@105056.8460 u1sggqvs99k38snil235s5kcm6 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20240606@105056.8520 u1sggqvs99k38snil235s5kcm6 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
20240606@105056.9710 u1sggqvs99k38snil235s5kcm6 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240606@105056.1065 u1sggqvs99k38snil235s5kcm6 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240606@105056.1082 u1sggqvs99k38snil235s5kcm6 Query : use flama_phc
20240606@105056.1085 u1sggqvs99k38snil235s5kcm6 Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202549' and estab=00
20240606@105056.1165 u1sggqvs99k38snil235s5kcm6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@105056.1179 u1sggqvs99k38snil235s5kcm6 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20240606@105056.1208 u1sggqvs99k38snil235s5kcm6 Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6661849162666186801a',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240606@105056.1287 u1sggqvs99k38snil235s5kcm6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@105056.1302 u1sggqvs99k38snil235s5kcm6 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20240606@105056.1310 u1sggqvs99k38snil235s5kcm6 Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6661849162666186801a','--','bo',7.4167573449401523394 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240606@105056.1523 u1sggqvs99k38snil235s5kcm6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@105056.1562 u1sggqvs99k38snil235s5kcm6 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20240606@105056.1569 u1sggqvs99k38snil235s5kcm6 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 ('aut6661849162666186801a','guia r. fornecedor','2024-06-06',61,2401608,?,?,?,?,?,?,?,?,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')
20240606@105056.2139 u1sggqvs99k38snil235s5kcm6 Query : use flama_phc
20240606@105056.2142 u1sggqvs99k38snil235s5kcm6 Query : select st.usalote valor from st where st.ref = '324.679.00.01'
20240606@105056.2257 u1sggqvs99k38snil235s5kcm6 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.679.00.01'
20240606@105056.2398 u1sggqvs99k38snil235s5kcm6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@105056.2412 u1sggqvs99k38snil235s5kcm6 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20240606@105056.2424 u1sggqvs99k38snil235s5kcm6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@105056.2436 u1sggqvs99k38snil235s5kcm6 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20240606@105056.2442 u1sggqvs99k38snil235s5kcm6 Query : select sestamp valor from se where ref ='324.679.00.01' and lote = 'r2400127100a'
20240606@105056.2492 u1sggqvs99k38snil235s5kcm6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@105056.2504 u1sggqvs99k38snil235s5kcm6 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20240606@105056.2511 u1sggqvs99k38snil235s5kcm6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@105056.2525 u1sggqvs99k38snil235s5kcm6 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20240606@105056.2532 u1sggqvs99k38snil235s5kcm6 Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6661844282666186803d',?,?,'20240606',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20240606@105056.3041 u1sggqvs99k38snil235s5kcm6 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240606@105056.3078 u1sggqvs99k38snil235s5kcm6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@105056.3091 u1sggqvs99k38snil235s5kcm6 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20240606@105056.3098 u1sggqvs99k38snil235s5kcm6 Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6661895156666186804b','aut6661849162666186801a',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 = 'aut6661849162666186801a'
20240606@105056.3263 u1sggqvs99k38snil235s5kcm6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@105056.3278 u1sggqvs99k38snil235s5kcm6 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20240606@105056.3292 u1sggqvs99k38snil235s5kcm6 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 'aut6661895156666186804b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 370, 370*.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 ,45.95,45.95*200.48,45.95,45.95*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,45.95*370,45.95*370*200.48 ,.000000,.000000*200.48 ,.000000,.000000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,45.95,45.95*200.48,45.95*370,45.95*370*200.48,'cps24020170720,947000004 ',340.8,340.8*370,340.8,340.8*370,?,?,?,4 from bo bo where bo.bostamp = 'aut6661849162666186801a'
20240606@105109.3727 u1sggqvs99k38snil235s5kcm6 Query : use flama_phc
20240606@105109.3732 u1sggqvs99k38snil235s5kcm6 Query : select st.usalote valor from st where st.ref = '324.675.00.01'
20240606@105109.3746 u1sggqvs99k38snil235s5kcm6 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.675.00.01'
20240606@105109.3892 u1sggqvs99k38snil235s5kcm6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@105109.3905 u1sggqvs99k38snil235s5kcm6 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20240606@105109.3915 u1sggqvs99k38snil235s5kcm6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@105109.3926 u1sggqvs99k38snil235s5kcm6 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20240606@105109.3932 u1sggqvs99k38snil235s5kcm6 Query : select sestamp valor from se where ref ='324.675.00.01' and lote = 'r2400127100a'
20240606@105109.3940 u1sggqvs99k38snil235s5kcm6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@105109.3951 u1sggqvs99k38snil235s5kcm6 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20240606@105109.3957 u1sggqvs99k38snil235s5kcm6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@105109.3968 u1sggqvs99k38snil235s5kcm6 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20240606@105109.3974 u1sggqvs99k38snil235s5kcm6 Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66618323826661868d60',?,?,'20240606',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20240606@105109.4029 u1sggqvs99k38snil235s5kcm6 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240606@105109.4039 u1sggqvs99k38snil235s5kcm6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@105109.4052 u1sggqvs99k38snil235s5kcm6 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20240606@105109.4058 u1sggqvs99k38snil235s5kcm6 Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66618857976661868d62','aut6661849162666186801a',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 = 'aut6661849162666186801a'
20240606@105109.4209 u1sggqvs99k38snil235s5kcm6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@105109.4223 u1sggqvs99k38snil235s5kcm6 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20240606@105109.4234 u1sggqvs99k38snil235s5kcm6 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,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,obistamp ,stipo) select 'aut66618857976661868d62',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 390, 390*.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,20000 ,0,0*200.48,0,0*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,0*390,0*390*200.48 ,.000000,.000000*200.48 ,.000000,.000000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*390,0*390*200.48,'',0,0*390,0,0*390,?,?,?,4 from bo bo where bo.bostamp = 'aut6661849162666186801a'
20240606@105109.4593 u1sggqvs99k38snil235s5kcm6 Query : use flama_phc
20240606@105109.4597 u1sggqvs99k38snil235s5kcm6 Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -110
20240606@105109.4652 u1sggqvs99k38snil235s5kcm6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='249';
20240606@105109.4665 u1sggqvs99k38snil235s5kcm6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='249';
20240606@111910.8605 b0e0f1kk9tkm8cof21o7seaq55 Query : use flama_phc
20240606@111910.8643 b0e0f1kk9tkm8cof21o7seaq55 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@111910.8775 b0e0f1kk9tkm8cof21o7seaq55 Query : use flama_phc
20240606@111910.8782 b0e0f1kk9tkm8cof21o7seaq55 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@113518.3688 oiv8nrc2s28bntuoupagispda4 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@113518.3706 oiv8nrc2s28bntuoupagispda4 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@113518.3723 oiv8nrc2s28bntuoupagispda4 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='250';
20240606@113518.3760 oiv8nrc2s28bntuoupagispda4 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='250';
20240606@113518.3810 oiv8nrc2s28bntuoupagispda4 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='250';
20240606@113518.3979 oiv8nrc2s28bntuoupagispda4 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='250';
20240606@113518.3992 oiv8nrc2s28bntuoupagispda4 Query : use flama_phc
20240606@113518.3996 oiv8nrc2s28bntuoupagispda4 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@113518.4011 oiv8nrc2s28bntuoupagispda4 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.649.00.01'
20240606@113518.4127 oiv8nrc2s28bntuoupagispda4 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 = 2400127 and bi.ref ='324.649.00.01' and bi.lordem =3
20240606@113518.4473 oiv8nrc2s28bntuoupagispda4 Query : use flama_phc
20240606@113518.4477 oiv8nrc2s28bntuoupagispda4 Query : select top 1 1 valor from ts where ts.ndos = 61
20240606@113518.4560 oiv8nrc2s28bntuoupagispda4 Query : use flama_phc
20240606@113518.4563 oiv8nrc2s28bntuoupagispda4 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')
20240606@113518.4585 oiv8nrc2s28bntuoupagispda4 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
20240606@113518.4732 oiv8nrc2s28bntuoupagispda4 Query : use flama_phc
20240606@113518.4736 oiv8nrc2s28bntuoupagispda4 Query : select top 1 ~inactivo valor from fl where no = '202549' and estab = 00 order by inactivo desc
20240606@113518.4823 oiv8nrc2s28bntuoupagispda4 Query : use flama_phc
20240606@113518.4826 oiv8nrc2s28bntuoupagispda4 Query : select 1 valor from ts where ndos = 61
20240606@113518.4904 oiv8nrc2s28bntuoupagispda4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@113518.5439 oiv8nrc2s28bntuoupagispda4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20240606@113518.5475 oiv8nrc2s28bntuoupagispda4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@113518.5490 oiv8nrc2s28bntuoupagispda4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20240606@113518.5498 oiv8nrc2s28bntuoupagispda4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@113518.5515 oiv8nrc2s28bntuoupagispda4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20240606@113518.5522 oiv8nrc2s28bntuoupagispda4 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
20240606@113518.5652 oiv8nrc2s28bntuoupagispda4 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240606@113518.5760 oiv8nrc2s28bntuoupagispda4 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240606@113518.5776 oiv8nrc2s28bntuoupagispda4 Query : use flama_phc
20240606@113518.5779 oiv8nrc2s28bntuoupagispda4 Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202549' and estab=00
20240606@113518.5872 oiv8nrc2s28bntuoupagispda4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@113518.5889 oiv8nrc2s28bntuoupagispda4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20240606@113518.5925 oiv8nrc2s28bntuoupagispda4 Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6661979689666190e68d',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240606@113518.5980 oiv8nrc2s28bntuoupagispda4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@113518.5995 oiv8nrc2s28bntuoupagispda4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20240606@113518.6003 oiv8nrc2s28bntuoupagispda4 Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6661979689666190e68d','--','bo',0 ,0,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240606@113518.6195 oiv8nrc2s28bntuoupagispda4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@113518.6214 oiv8nrc2s28bntuoupagispda4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20240606@113518.6224 oiv8nrc2s28bntuoupagispda4 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 ('aut6661979689666190e68d','guia r. fornecedor','2024-06-06',61,2401615,?,?,?,?,?,?,?,?,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')
20240606@113519.5032 oiv8nrc2s28bntuoupagispda4 Query : use flama_phc
20240606@113519.5037 oiv8nrc2s28bntuoupagispda4 Query : select st.usalote valor from st where st.ref = '324.649.00.01'
20240606@113519.5171 oiv8nrc2s28bntuoupagispda4 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.649.00.01'
20240606@113519.5327 oiv8nrc2s28bntuoupagispda4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@113519.5343 oiv8nrc2s28bntuoupagispda4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20240606@113519.5360 oiv8nrc2s28bntuoupagispda4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@113519.5375 oiv8nrc2s28bntuoupagispda4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20240606@113519.5385 oiv8nrc2s28bntuoupagispda4 Query : select sestamp valor from se where ref ='324.649.00.01' and lote = 'r2400127200a'
20240606@113519.5611 oiv8nrc2s28bntuoupagispda4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@113519.5663 oiv8nrc2s28bntuoupagispda4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20240606@113519.5674 oiv8nrc2s28bntuoupagispda4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@113519.5688 oiv8nrc2s28bntuoupagispda4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20240606@113519.5696 oiv8nrc2s28bntuoupagispda4 Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6661947282666190e78a',?,?,'20240606',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20240606@113519.6300 oiv8nrc2s28bntuoupagispda4 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240606@113519.6344 oiv8nrc2s28bntuoupagispda4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@113519.6359 oiv8nrc2s28bntuoupagispda4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20240606@113519.6373 oiv8nrc2s28bntuoupagispda4 Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6661966843666190e79a','aut6661979689666190e68d',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 = 'aut6661979689666190e68d'
20240606@113519.6545 oiv8nrc2s28bntuoupagispda4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@113519.6564 oiv8nrc2s28bntuoupagispda4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20240606@113519.6580 oiv8nrc2s28bntuoupagispda4 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,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,obistamp ,stipo) select 'aut6661966843666190e79a',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1120, 1120*.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 ,0,0*200.48,0,0*200.48 ,0,0,'un ','' ,bo.marcada,1 ,0*1120,0*1120*200.48 ,.000000,.000000*200.48 ,.000000,.000000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*1120,0*1120*200.48,'',0,0*1120,0,0*1120,?,?,?,4 from bo bo where bo.bostamp = 'aut6661979689666190e68d'
20240606@113519.6958 oiv8nrc2s28bntuoupagispda4 Query : use flama_phc
20240606@113519.6962 oiv8nrc2s28bntuoupagispda4 Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -110
20240606@113519.7975 oiv8nrc2s28bntuoupagispda4 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='250';
20240606@113519.8255 oiv8nrc2s28bntuoupagispda4 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='250';
20240606@113610.4130 81lin4q9kj8dsnfmmapt3u1mdv Query : use flama_phc
20240606@113610.4136 81lin4q9kj8dsnfmmapt3u1mdv Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@113610.4156 81lin4q9kj8dsnfmmapt3u1mdv Query : use flama_phc
20240606@113610.4160 81lin4q9kj8dsnfmmapt3u1mdv Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@121910.8419 djlou628q7p1seq2003ltbilub Query : use flama_phc
20240606@121910.8424 djlou628q7p1seq2003ltbilub Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@121910.8445 djlou628q7p1seq2003ltbilub Query : use flama_phc
20240606@121910.8448 djlou628q7p1seq2003ltbilub Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@123611.3230 hjb0nnpplfuna7f2af1am0u0pm Query : use flama_phc
20240606@123611.3450 hjb0nnpplfuna7f2af1am0u0pm Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@123611.3620 hjb0nnpplfuna7f2af1am0u0pm Query : use flama_phc
20240606@123611.3650 hjb0nnpplfuna7f2af1am0u0pm Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@131910.3627 3rhj0004iltm76e522u2ibp0qm Query : use flama_phc
20240606@131910.3632 3rhj0004iltm76e522u2ibp0qm Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@131910.3650 3rhj0004iltm76e522u2ibp0qm Query : use flama_phc
20240606@131910.3653 3rhj0004iltm76e522u2ibp0qm Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@133610.4901 t7q6he9tc7ac778cspa3ja77dt Query : use flama_phc
20240606@133610.4905 t7q6he9tc7ac778cspa3ja77dt Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@133610.4925 t7q6he9tc7ac778cspa3ja77dt Query : use flama_phc
20240606@133610.4928 t7q6he9tc7ac778cspa3ja77dt Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@141913.1244 k42junp41pj44dtooqoalieot5 Query : use flama_phc
20240606@141913.1250 k42junp41pj44dtooqoalieot5 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@141913.1271 k42junp41pj44dtooqoalieot5 Query : use flama_phc
20240606@141913.1274 k42junp41pj44dtooqoalieot5 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@143613.2963 iksm6huqkn614k1q388is19kib Query : use flama_phc
20240606@143613.2968 iksm6huqkn614k1q388is19kib Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@143613.3036 iksm6huqkn614k1q388is19kib Query : use flama_phc
20240606@143613.3039 iksm6huqkn614k1q388is19kib Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@151914.3816 jm861tdi7fi0nqve5btnnkbsgi Query : use flama_phc
20240606@151914.3821 jm861tdi7fi0nqve5btnnkbsgi Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@151914.3881 jm861tdi7fi0nqve5btnnkbsgi Query : use flama_phc
20240606@151914.3884 jm861tdi7fi0nqve5btnnkbsgi Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@153614.5335 airq5k6du9ec3655hrrf45arbd Query : use flama_phc
20240606@153614.5340 airq5k6du9ec3655hrrf45arbd Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@153614.5358 airq5k6du9ec3655hrrf45arbd Query : use flama_phc
20240606@153614.5362 airq5k6du9ec3655hrrf45arbd Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@161914.7085 q1vm8se0egb1ob7809tji7g0gf Query : use flama_phc
20240606@161914.7121 q1vm8se0egb1ob7809tji7g0gf Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@161914.7298 q1vm8se0egb1ob7809tji7g0gf Query : use flama_phc
20240606@161914.7303 q1vm8se0egb1ob7809tji7g0gf Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@163614.6452 hqspvvg9frntl734jkucparmi9 Query : use flama_phc
20240606@163614.6458 hqspvvg9frntl734jkucparmi9 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@163614.6481 hqspvvg9frntl734jkucparmi9 Query : use flama_phc
20240606@163614.6484 hqspvvg9frntl734jkucparmi9 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@171919.2154 647ds026i10d5ge5oildc6clfm Query : use flama_phc
20240606@171919.2159 647ds026i10d5ge5oildc6clfm Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@171919.2178 647ds026i10d5ge5oildc6clfm Query : use flama_phc
20240606@171919.2181 647ds026i10d5ge5oildc6clfm Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@172110.5752 8ou3npqr18ij9m3bssel97sb2d Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@172110.5784 8ou3npqr18ij9m3bssel97sb2d Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@172110.5852 8ou3npqr18ij9m3bssel97sb2d Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='251';
20240606@172110.5889 8ou3npqr18ij9m3bssel97sb2d Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='251';
20240606@172110.5903 8ou3npqr18ij9m3bssel97sb2d Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='251';
20240606@172110.5917 8ou3npqr18ij9m3bssel97sb2d Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='251';
20240606@172110.5933 8ou3npqr18ij9m3bssel97sb2d Query : use flama_phc
20240606@172110.5937 8ou3npqr18ij9m3bssel97sb2d Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@172110.5994 8ou3npqr18ij9m3bssel97sb2d Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.686.00.01'
20240606@172110.6114 8ou3npqr18ij9m3bssel97sb2d 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 = 2400127 and bi.ref ='324.686.00.01' and bi.lordem =10000
20240606@172110.6481 8ou3npqr18ij9m3bssel97sb2d 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 = 'cps24020170721,348000005 ' 
20240606@172110.6807 8ou3npqr18ij9m3bssel97sb2d Query : use flama_phc
20240606@172110.6811 8ou3npqr18ij9m3bssel97sb2d Query : select top 1 1 valor from ts where ts.ndos = 61
20240606@172110.6829 8ou3npqr18ij9m3bssel97sb2d Query : use flama_phc
20240606@172110.6833 8ou3npqr18ij9m3bssel97sb2d 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')
20240606@172110.6906 8ou3npqr18ij9m3bssel97sb2d 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
20240606@172110.6931 8ou3npqr18ij9m3bssel97sb2d Query : use flama_phc
20240606@172110.6934 8ou3npqr18ij9m3bssel97sb2d Query : select top 1 ~inactivo valor from fl where no = '202549' and estab = 00 order by inactivo desc
20240606@172110.6961 8ou3npqr18ij9m3bssel97sb2d Query : use flama_phc
20240606@172110.6965 8ou3npqr18ij9m3bssel97sb2d Query : select 1 valor from ts where ndos = 61
20240606@172110.6983 8ou3npqr18ij9m3bssel97sb2d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@172110.7012 8ou3npqr18ij9m3bssel97sb2d Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20240606@172110.7047 8ou3npqr18ij9m3bssel97sb2d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@172110.7062 8ou3npqr18ij9m3bssel97sb2d Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20240606@172110.7068 8ou3npqr18ij9m3bssel97sb2d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@172110.7081 8ou3npqr18ij9m3bssel97sb2d Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20240606@172110.7088 8ou3npqr18ij9m3bssel97sb2d 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
20240606@172110.7107 8ou3npqr18ij9m3bssel97sb2d Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240606@172110.7130 8ou3npqr18ij9m3bssel97sb2d Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240606@172110.7147 8ou3npqr18ij9m3bssel97sb2d Query : use flama_phc
20240606@172110.7152 8ou3npqr18ij9m3bssel97sb2d Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202549' and estab=00
20240606@172110.7170 8ou3npqr18ij9m3bssel97sb2d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@172110.7185 8ou3npqr18ij9m3bssel97sb2d Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20240606@172110.7196 8ou3npqr18ij9m3bssel97sb2d Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6661e699486661e1f6ae',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240606@172110.7201 8ou3npqr18ij9m3bssel97sb2d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@172110.7214 8ou3npqr18ij9m3bssel97sb2d Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20240606@172110.7222 8ou3npqr18ij9m3bssel97sb2d Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6661e699486661e1f6ae','--','bo',7.4164615805304894722 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240606@172110.7426 8ou3npqr18ij9m3bssel97sb2d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@172110.7442 8ou3npqr18ij9m3bssel97sb2d Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20240606@172110.7450 8ou3npqr18ij9m3bssel97sb2d 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 ('aut6661e699486661e1f6ae','guia r. fornecedor','2024-06-06',61,2401632,?,?,?,?,?,?,?,?,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')
20240606@172110.8042 8ou3npqr18ij9m3bssel97sb2d Query : use flama_phc
20240606@172110.8047 8ou3npqr18ij9m3bssel97sb2d Query : select st.usalote valor from st where st.ref = '324.686.00.01'
20240606@172110.8072 8ou3npqr18ij9m3bssel97sb2d 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.686.00.01'
20240606@172110.8276 8ou3npqr18ij9m3bssel97sb2d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@172110.8291 8ou3npqr18ij9m3bssel97sb2d Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20240606@172110.8302 8ou3npqr18ij9m3bssel97sb2d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@172110.8316 8ou3npqr18ij9m3bssel97sb2d Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20240606@172110.8322 8ou3npqr18ij9m3bssel97sb2d Query : select sestamp valor from se where ref ='324.686.00.01' and lote = 'r2400127100a'
20240606@172110.8331 8ou3npqr18ij9m3bssel97sb2d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@172110.8344 8ou3npqr18ij9m3bssel97sb2d Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20240606@172110.8351 8ou3npqr18ij9m3bssel97sb2d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@172110.8365 8ou3npqr18ij9m3bssel97sb2d Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20240606@172110.8371 8ou3npqr18ij9m3bssel97sb2d Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6661e044736661e1f6cb',?,?,'20240606',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20240606@172110.9534 8ou3npqr18ij9m3bssel97sb2d Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240606@172110.9552 8ou3npqr18ij9m3bssel97sb2d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@172110.9625 8ou3npqr18ij9m3bssel97sb2d Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20240606@172110.9633 8ou3npqr18ij9m3bssel97sb2d Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6661e344676661e1f6e9','aut6661e699486661e1f6ae',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 = 'aut6661e699486661e1f6ae'
20240606@172110.9891 8ou3npqr18ij9m3bssel97sb2d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240606@172110.9930 8ou3npqr18ij9m3bssel97sb2d Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20240606@172110.9941 8ou3npqr18ij9m3bssel97sb2d 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 'aut6661e344676661e1f6e9',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 815, 815*.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 ,36.57,36.57*200.48,36.57,36.57*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,36.57*815,36.57*815*200.48 ,.000000,.000000*200.48 ,.000000,.000000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,36.57,36.57*200.48,36.57*815,36.57*815*200.48,'cps24020170721,348000005 ',271.22,271.22*815,271.22,271.22*815,?,?,?,4 from bo bo where bo.bostamp = 'aut6661e699486661e1f6ae'
20240606@172120.4644 8ou3npqr18ij9m3bssel97sb2d Query : use flama_phc
20240606@172120.4651 8ou3npqr18ij9m3bssel97sb2d Query : declare @bostamp varchar(25) = 'aut6661e699486661e1f6ae' ,@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 
20240606@172129.1530 8ou3npqr18ij9m3bssel97sb2d Query : use flama_phc
20240606@172129.1580 8ou3npqr18ij9m3bssel97sb2d Query : select 1 valor from bo where bo.bostamp = 'aut6661e699486661e1f6ae'
20240606@172129.2830 8ou3npqr18ij9m3bssel97sb2d 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) = 'aut6661e699486661e1f6ae' 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 
20240606@172129.4055 8ou3npqr18ij9m3bssel97sb2d Query : use flama_phc
20240606@172129.4060 8ou3npqr18ij9m3bssel97sb2d Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@172129.4073 8ou3npqr18ij9m3bssel97sb2d Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='251';
20240606@172129.4089 8ou3npqr18ij9m3bssel97sb2d Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='251';
20240606@173619.3752 9g37k4hblu3mphc83n4m99fjsa Query : use flama_phc
20240606@173619.3760 9g37k4hblu3mphc83n4m99fjsa Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@173619.3782 9g37k4hblu3mphc83n4m99fjsa Query : use flama_phc
20240606@173619.3786 9g37k4hblu3mphc83n4m99fjsa Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@181915.9370 knnosu6nkenl538qfq1peidcev Query : use flama_phc
20240606@181915.9374 knnosu6nkenl538qfq1peidcev Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@181915.9391 knnosu6nkenl538qfq1peidcev Query : use flama_phc
20240606@181915.9399 knnosu6nkenl538qfq1peidcev Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@183522.5259 f7en9gg406sopg0ebhe9b01h9l Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183522.5275 f7en9gg406sopg0ebhe9b01h9l Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183522.5293 f7en9gg406sopg0ebhe9b01h9l Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='252';
20240606@183522.5332 f7en9gg406sopg0ebhe9b01h9l Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='252';
20240606@183522.5349 f7en9gg406sopg0ebhe9b01h9l Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='252';
20240606@183522.5360 f7en9gg406sopg0ebhe9b01h9l Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='252';
20240606@183522.5372 f7en9gg406sopg0ebhe9b01h9l Query : use flama_phc
20240606@183522.5374 f7en9gg406sopg0ebhe9b01h9l Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183522.5392 f7en9gg406sopg0ebhe9b01h9l Query : use flama_phc
20240606@183522.5395 f7en9gg406sopg0ebhe9b01h9l Query : select no, estab,szadrsdesc from szadrs where u_coddest=2498
20240606@183522.5473 f7en9gg406sopg0ebhe9b01h9l 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'
20240606@183522.6944 f7en9gg406sopg0ebhe9b01h9l 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'
20240606@183522.6957 f7en9gg406sopg0ebhe9b01h9l Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4930.00.1'
20240606@183522.7121 f7en9gg406sopg0ebhe9b01h9l Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.945.00.01'
20240606@183522.7250 f7en9gg406sopg0ebhe9b01h9l Query : use flama_phc
20240606@183522.7266 f7en9gg406sopg0ebhe9b01h9l Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183522.7456 f7en9gg406sopg0ebhe9b01h9l Query : use flama_phc
20240606@183522.7460 f7en9gg406sopg0ebhe9b01h9l Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183522.7541 f7en9gg406sopg0ebhe9b01h9l Query : use flama_phc
20240606@183522.7544 f7en9gg406sopg0ebhe9b01h9l 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')
20240606@183522.8035 hckt3v2b894jugi0piubcsvcje Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183522.8051 hckt3v2b894jugi0piubcsvcje Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183522.8071 hckt3v2b894jugi0piubcsvcje Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='253';
20240606@183522.8112 hckt3v2b894jugi0piubcsvcje Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='253';
20240606@183522.8124 hckt3v2b894jugi0piubcsvcje Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='253';
20240606@183522.8152 hckt3v2b894jugi0piubcsvcje Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='253';
20240606@183522.8166 hckt3v2b894jugi0piubcsvcje Query : use flama_phc
20240606@183522.8172 hckt3v2b894jugi0piubcsvcje Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183522.8189 hckt3v2b894jugi0piubcsvcje Query : use flama_phc
20240606@183522.8192 hckt3v2b894jugi0piubcsvcje Query : select no, estab,szadrsdesc from szadrs where u_coddest=1476
20240606@183522.8271 hckt3v2b894jugi0piubcsvcje 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'
20240606@183522.8441 hckt3v2b894jugi0piubcsvcje 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'
20240606@183522.8572 hckt3v2b894jugi0piubcsvcje Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '326.597.00.01'
20240606@183522.8680 hckt3v2b894jugi0piubcsvcje Query : use flama_phc
20240606@183522.8684 hckt3v2b894jugi0piubcsvcje Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183522.8697 hckt3v2b894jugi0piubcsvcje Query : use flama_phc
20240606@183522.8704 hckt3v2b894jugi0piubcsvcje Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183522.8716 hckt3v2b894jugi0piubcsvcje Query : use flama_phc
20240606@183522.8719 hckt3v2b894jugi0piubcsvcje 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')
20240606@183522.9189 a9vi1a960aen7jt9214bc4jl7s Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183522.9202 a9vi1a960aen7jt9214bc4jl7s Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183522.9218 a9vi1a960aen7jt9214bc4jl7s Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='254';
20240606@183522.9258 a9vi1a960aen7jt9214bc4jl7s Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='254';
20240606@183522.9270 a9vi1a960aen7jt9214bc4jl7s Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='254';
20240606@183522.9283 a9vi1a960aen7jt9214bc4jl7s Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='254';
20240606@183522.9294 a9vi1a960aen7jt9214bc4jl7s Query : use flama_phc
20240606@183522.9297 a9vi1a960aen7jt9214bc4jl7s Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183522.9311 a9vi1a960aen7jt9214bc4jl7s Query : use flama_phc
20240606@183522.9314 a9vi1a960aen7jt9214bc4jl7s Query : select no, estab,szadrsdesc from szadrs where u_coddest=3155
20240606@183522.9386 a9vi1a960aen7jt9214bc4jl7s 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'
20240606@183522.9544 a9vi1a960aen7jt9214bc4jl7s 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'
20240606@183522.9555 a9vi1a960aen7jt9214bc4jl7s 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'
20240606@183522.9676 a9vi1a960aen7jt9214bc4jl7s Query : use flama_phc
20240606@183522.9679 a9vi1a960aen7jt9214bc4jl7s Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183522.9692 a9vi1a960aen7jt9214bc4jl7s Query : use flama_phc
20240606@183522.9695 a9vi1a960aen7jt9214bc4jl7s Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183522.9706 a9vi1a960aen7jt9214bc4jl7s Query : use flama_phc
20240606@183522.9708 a9vi1a960aen7jt9214bc4jl7s 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')
20240606@183523.1710 j21f7iftj77vd8498k663l81bg Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183523.1840 j21f7iftj77vd8498k663l81bg Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183523.2000 j21f7iftj77vd8498k663l81bg Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='255';
20240606@183523.2450 j21f7iftj77vd8498k663l81bg Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='255';
20240606@183523.2580 j21f7iftj77vd8498k663l81bg Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='255';
20240606@183523.2690 j21f7iftj77vd8498k663l81bg Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='255';
20240606@183523.2880 j21f7iftj77vd8498k663l81bg Query : use flama_phc
20240606@183523.2910 j21f7iftj77vd8498k663l81bg Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183523.3050 j21f7iftj77vd8498k663l81bg Query : use flama_phc
20240606@183523.3080 j21f7iftj77vd8498k663l81bg Query : select no, estab,szadrsdesc from szadrs where u_coddest=4197
20240606@183523.3850 j21f7iftj77vd8498k663l81bg 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'
20240606@183523.5520 j21f7iftj77vd8498k663l81bg 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'
20240606@183523.5620 j21f7iftj77vd8498k663l81bg Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.497.00.01'
20240606@183523.6940 j21f7iftj77vd8498k663l81bg Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1716.00.1'
20240606@183523.8150 j21f7iftj77vd8498k663l81bg 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'
20240606@183523.8250 j21f7iftj77vd8498k663l81bg Query : use flama_phc
20240606@183523.8280 j21f7iftj77vd8498k663l81bg Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183523.8410 j21f7iftj77vd8498k663l81bg Query : use flama_phc
20240606@183523.8440 j21f7iftj77vd8498k663l81bg Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183523.8550 j21f7iftj77vd8498k663l81bg Query : use flama_phc
20240606@183523.8570 j21f7iftj77vd8498k663l81bg 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')
20240606@183523.1376 r083gvpt593m41pvc12132oj2l Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183523.1391 r083gvpt593m41pvc12132oj2l Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183523.1409 r083gvpt593m41pvc12132oj2l Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='256';
20240606@183523.1460 r083gvpt593m41pvc12132oj2l Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='256';
20240606@183523.1472 r083gvpt593m41pvc12132oj2l Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='256';
20240606@183523.1484 r083gvpt593m41pvc12132oj2l Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='256';
20240606@183523.1497 r083gvpt593m41pvc12132oj2l Query : use flama_phc
20240606@183523.1500 r083gvpt593m41pvc12132oj2l Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183523.1516 r083gvpt593m41pvc12132oj2l Query : use flama_phc
20240606@183523.1519 r083gvpt593m41pvc12132oj2l Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240606@183523.1595 r083gvpt593m41pvc12132oj2l Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.4006.00.2'
20240606@183523.1759 r083gvpt593m41pvc12132oj2l Query : use flama_phc
20240606@183523.1768 r083gvpt593m41pvc12132oj2l Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183523.1781 r083gvpt593m41pvc12132oj2l Query : use flama_phc
20240606@183523.1784 r083gvpt593m41pvc12132oj2l Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183523.1796 r083gvpt593m41pvc12132oj2l Query : use flama_phc
20240606@183523.1799 r083gvpt593m41pvc12132oj2l 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')
20240606@183523.2279 1t6kel9525h1e7cqbfvi70iktp Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183523.2295 1t6kel9525h1e7cqbfvi70iktp Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183523.2312 1t6kel9525h1e7cqbfvi70iktp Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='257';
20240606@183523.2527 1t6kel9525h1e7cqbfvi70iktp Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='257';
20240606@183523.3495 1t6kel9525h1e7cqbfvi70iktp Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='257';
20240606@183523.3511 1t6kel9525h1e7cqbfvi70iktp Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='257';
20240606@183523.3524 1t6kel9525h1e7cqbfvi70iktp Query : use flama_phc
20240606@183523.3527 1t6kel9525h1e7cqbfvi70iktp Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183523.3541 1t6kel9525h1e7cqbfvi70iktp Query : use flama_phc
20240606@183523.3544 1t6kel9525h1e7cqbfvi70iktp Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240606@183523.3575 1t6kel9525h1e7cqbfvi70iktp Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.4007.00.2'
20240606@183523.3737 1t6kel9525h1e7cqbfvi70iktp Query : use flama_phc
20240606@183523.3740 1t6kel9525h1e7cqbfvi70iktp Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183523.3753 1t6kel9525h1e7cqbfvi70iktp Query : use flama_phc
20240606@183523.3756 1t6kel9525h1e7cqbfvi70iktp Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183523.3766 1t6kel9525h1e7cqbfvi70iktp Query : use flama_phc
20240606@183523.3768 1t6kel9525h1e7cqbfvi70iktp 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')
20240606@183523.5396 h8lihf7djmp0kfv2m6gqipa7tj Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183523.5410 h8lihf7djmp0kfv2m6gqipa7tj Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183523.5425 h8lihf7djmp0kfv2m6gqipa7tj Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='258';
20240606@183523.5464 h8lihf7djmp0kfv2m6gqipa7tj Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='258';
20240606@183523.5475 h8lihf7djmp0kfv2m6gqipa7tj Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='258';
20240606@183523.5486 h8lihf7djmp0kfv2m6gqipa7tj Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='258';
20240606@183523.5497 h8lihf7djmp0kfv2m6gqipa7tj Query : use flama_phc
20240606@183523.5500 h8lihf7djmp0kfv2m6gqipa7tj Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183523.5513 h8lihf7djmp0kfv2m6gqipa7tj Query : use flama_phc
20240606@183523.5516 h8lihf7djmp0kfv2m6gqipa7tj Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240606@183523.5549 h8lihf7djmp0kfv2m6gqipa7tj Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4840.00.1'
20240606@183523.5744 h8lihf7djmp0kfv2m6gqipa7tj Query : use flama_phc
20240606@183523.5747 h8lihf7djmp0kfv2m6gqipa7tj Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183523.5760 h8lihf7djmp0kfv2m6gqipa7tj Query : use flama_phc
20240606@183523.5763 h8lihf7djmp0kfv2m6gqipa7tj Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183523.5774 h8lihf7djmp0kfv2m6gqipa7tj Query : use flama_phc
20240606@183523.5776 h8lihf7djmp0kfv2m6gqipa7tj 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')
20240606@183523.6281 vk205f705vf9c3r8hcdvjdjh5s Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183523.6294 vk205f705vf9c3r8hcdvjdjh5s Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183523.6310 vk205f705vf9c3r8hcdvjdjh5s Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='259';
20240606@183523.6348 vk205f705vf9c3r8hcdvjdjh5s Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='259';
20240606@183523.6361 vk205f705vf9c3r8hcdvjdjh5s Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='259';
20240606@183523.6372 vk205f705vf9c3r8hcdvjdjh5s Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='259';
20240606@183523.6382 vk205f705vf9c3r8hcdvjdjh5s Query : use flama_phc
20240606@183523.6385 vk205f705vf9c3r8hcdvjdjh5s Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183523.6402 vk205f705vf9c3r8hcdvjdjh5s Query : use flama_phc
20240606@183523.6404 vk205f705vf9c3r8hcdvjdjh5s Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240606@183523.6436 vk205f705vf9c3r8hcdvjdjh5s 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'
20240606@183523.6624 vk205f705vf9c3r8hcdvjdjh5s 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'
20240606@183523.6634 vk205f705vf9c3r8hcdvjdjh5s Query : use flama_phc
20240606@183523.6637 vk205f705vf9c3r8hcdvjdjh5s Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183523.6652 vk205f705vf9c3r8hcdvjdjh5s Query : use flama_phc
20240606@183523.6655 vk205f705vf9c3r8hcdvjdjh5s Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183523.6665 vk205f705vf9c3r8hcdvjdjh5s Query : use flama_phc
20240606@183523.6668 vk205f705vf9c3r8hcdvjdjh5s 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')
20240606@183523.7154 dm4nlrbln716jbl36lh0922s65 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183523.7168 dm4nlrbln716jbl36lh0922s65 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183523.7183 dm4nlrbln716jbl36lh0922s65 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='260';
20240606@183523.7225 dm4nlrbln716jbl36lh0922s65 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='260';
20240606@183523.7238 dm4nlrbln716jbl36lh0922s65 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='260';
20240606@183523.7251 dm4nlrbln716jbl36lh0922s65 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='260';
20240606@183523.7268 dm4nlrbln716jbl36lh0922s65 Query : use flama_phc
20240606@183523.7272 dm4nlrbln716jbl36lh0922s65 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183523.7288 dm4nlrbln716jbl36lh0922s65 Query : use flama_phc
20240606@183523.7291 dm4nlrbln716jbl36lh0922s65 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240606@183523.7332 dm4nlrbln716jbl36lh0922s65 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'
20240606@183523.7496 dm4nlrbln716jbl36lh0922s65 Query : use flama_phc
20240606@183523.7499 dm4nlrbln716jbl36lh0922s65 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183523.7513 dm4nlrbln716jbl36lh0922s65 Query : use flama_phc
20240606@183523.7516 dm4nlrbln716jbl36lh0922s65 Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183523.7526 dm4nlrbln716jbl36lh0922s65 Query : use flama_phc
20240606@183523.7529 dm4nlrbln716jbl36lh0922s65 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')
20240606@183523.8030 1ul85952t4afbs5908mc68k9qf Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183523.8044 1ul85952t4afbs5908mc68k9qf Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183523.8064 1ul85952t4afbs5908mc68k9qf Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='261';
20240606@183523.8104 1ul85952t4afbs5908mc68k9qf Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='261';
20240606@183523.8116 1ul85952t4afbs5908mc68k9qf Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='261';
20240606@183523.8127 1ul85952t4afbs5908mc68k9qf Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='261';
20240606@183523.8138 1ul85952t4afbs5908mc68k9qf Query : use flama_phc
20240606@183523.8141 1ul85952t4afbs5908mc68k9qf Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183523.8156 1ul85952t4afbs5908mc68k9qf Query : use flama_phc
20240606@183523.8159 1ul85952t4afbs5908mc68k9qf Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240606@183523.8193 1ul85952t4afbs5908mc68k9qf 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'
20240606@183523.8364 1ul85952t4afbs5908mc68k9qf 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'
20240606@183523.8399 1ul85952t4afbs5908mc68k9qf Query : use flama_phc
20240606@183523.8402 1ul85952t4afbs5908mc68k9qf Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183523.8416 1ul85952t4afbs5908mc68k9qf Query : use flama_phc
20240606@183523.8419 1ul85952t4afbs5908mc68k9qf Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183523.8433 1ul85952t4afbs5908mc68k9qf Query : use flama_phc
20240606@183523.8436 1ul85952t4afbs5908mc68k9qf 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')
20240606@183523.8916 5nm8hncfic79k5dkp2ikn3bdo8 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183523.8930 5nm8hncfic79k5dkp2ikn3bdo8 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183523.8946 5nm8hncfic79k5dkp2ikn3bdo8 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='262';
20240606@183523.8988 5nm8hncfic79k5dkp2ikn3bdo8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='262';
20240606@183523.9000 5nm8hncfic79k5dkp2ikn3bdo8 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='262';
20240606@183523.9012 5nm8hncfic79k5dkp2ikn3bdo8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='262';
20240606@183523.9023 5nm8hncfic79k5dkp2ikn3bdo8 Query : use flama_phc
20240606@183523.9026 5nm8hncfic79k5dkp2ikn3bdo8 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183523.9118 5nm8hncfic79k5dkp2ikn3bdo8 Query : use flama_phc
20240606@183523.9121 5nm8hncfic79k5dkp2ikn3bdo8 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240606@183523.9157 5nm8hncfic79k5dkp2ikn3bdo8 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'
20240606@183523.9168 5nm8hncfic79k5dkp2ikn3bdo8 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'
20240606@183523.9179 5nm8hncfic79k5dkp2ikn3bdo8 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'
20240606@183523.9189 5nm8hncfic79k5dkp2ikn3bdo8 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'
20240606@183523.9200 5nm8hncfic79k5dkp2ikn3bdo8 Query : use flama_phc
20240606@183523.9203 5nm8hncfic79k5dkp2ikn3bdo8 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183523.9216 5nm8hncfic79k5dkp2ikn3bdo8 Query : use flama_phc
20240606@183523.9219 5nm8hncfic79k5dkp2ikn3bdo8 Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183523.9234 5nm8hncfic79k5dkp2ikn3bdo8 Query : use flama_phc
20240606@183523.9237 5nm8hncfic79k5dkp2ikn3bdo8 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')
20240606@183523.9739 59eimoq4vnrn2cgik7v0bhbab4 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183523.9753 59eimoq4vnrn2cgik7v0bhbab4 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183523.9769 59eimoq4vnrn2cgik7v0bhbab4 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='263';
20240606@183523.9808 59eimoq4vnrn2cgik7v0bhbab4 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='263';
20240606@183523.9822 59eimoq4vnrn2cgik7v0bhbab4 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='263';
20240606@183523.9834 59eimoq4vnrn2cgik7v0bhbab4 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='263';
20240606@183523.9845 59eimoq4vnrn2cgik7v0bhbab4 Query : use flama_phc
20240606@183523.9848 59eimoq4vnrn2cgik7v0bhbab4 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183523.9903 59eimoq4vnrn2cgik7v0bhbab4 Query : use flama_phc
20240606@183523.9907 59eimoq4vnrn2cgik7v0bhbab4 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240606@183523.9939 59eimoq4vnrn2cgik7v0bhbab4 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'
20240606@183524.1070 59eimoq4vnrn2cgik7v0bhbab4 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'
20240606@183524.1180 59eimoq4vnrn2cgik7v0bhbab4 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'
20240606@183524.1280 59eimoq4vnrn2cgik7v0bhbab4 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'
20240606@183524.1380 59eimoq4vnrn2cgik7v0bhbab4 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'
20240606@183524.1490 59eimoq4vnrn2cgik7v0bhbab4 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'
20240606@183524.7780 59eimoq4vnrn2cgik7v0bhbab4 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'
20240606@183524.1335 59eimoq4vnrn2cgik7v0bhbab4 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'
20240606@183524.1346 59eimoq4vnrn2cgik7v0bhbab4 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'
20240606@183524.1356 59eimoq4vnrn2cgik7v0bhbab4 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'
20240606@183524.1366 59eimoq4vnrn2cgik7v0bhbab4 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'
20240606@183524.1375 59eimoq4vnrn2cgik7v0bhbab4 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'
20240606@183524.1384 59eimoq4vnrn2cgik7v0bhbab4 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'
20240606@183524.1394 59eimoq4vnrn2cgik7v0bhbab4 Query : use flama_phc
20240606@183524.1398 59eimoq4vnrn2cgik7v0bhbab4 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183524.1411 59eimoq4vnrn2cgik7v0bhbab4 Query : use flama_phc
20240606@183524.1414 59eimoq4vnrn2cgik7v0bhbab4 Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183524.1424 59eimoq4vnrn2cgik7v0bhbab4 Query : use flama_phc
20240606@183524.1427 59eimoq4vnrn2cgik7v0bhbab4 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')
20240606@183524.1968 lclcvg430eql50uncguvq73kmq Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183524.1984 lclcvg430eql50uncguvq73kmq Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183524.1999 lclcvg430eql50uncguvq73kmq Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='264';
20240606@183524.2043 lclcvg430eql50uncguvq73kmq Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='264';
20240606@183524.2055 lclcvg430eql50uncguvq73kmq Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='264';
20240606@183524.2066 lclcvg430eql50uncguvq73kmq Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='264';
20240606@183524.2076 lclcvg430eql50uncguvq73kmq Query : use flama_phc
20240606@183524.2079 lclcvg430eql50uncguvq73kmq Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183524.2092 lclcvg430eql50uncguvq73kmq Query : use flama_phc
20240606@183524.2095 lclcvg430eql50uncguvq73kmq Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240606@183524.2126 lclcvg430eql50uncguvq73kmq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1470.00.1'
20240606@183524.2293 lclcvg430eql50uncguvq73kmq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1470.00.1'
20240606@183524.2303 lclcvg430eql50uncguvq73kmq Query : use flama_phc
20240606@183524.2306 lclcvg430eql50uncguvq73kmq Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183524.2319 lclcvg430eql50uncguvq73kmq Query : use flama_phc
20240606@183524.2322 lclcvg430eql50uncguvq73kmq Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183524.2332 lclcvg430eql50uncguvq73kmq Query : use flama_phc
20240606@183524.2334 lclcvg430eql50uncguvq73kmq 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')
20240606@183524.2801 g1ami6b4j862d39fbofnk24eet Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183524.2814 g1ami6b4j862d39fbofnk24eet Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183524.2829 g1ami6b4j862d39fbofnk24eet Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='265';
20240606@183524.2869 g1ami6b4j862d39fbofnk24eet Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='265';
20240606@183524.2880 g1ami6b4j862d39fbofnk24eet Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='265';
20240606@183524.2893 g1ami6b4j862d39fbofnk24eet Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='265';
20240606@183524.2904 g1ami6b4j862d39fbofnk24eet Query : use flama_phc
20240606@183524.2907 g1ami6b4j862d39fbofnk24eet Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183524.2920 g1ami6b4j862d39fbofnk24eet Query : use flama_phc
20240606@183524.2923 g1ami6b4j862d39fbofnk24eet Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240606@183524.2956 g1ami6b4j862d39fbofnk24eet 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'
20240606@183524.3175 g1ami6b4j862d39fbofnk24eet 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'
20240606@183524.3191 g1ami6b4j862d39fbofnk24eet 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'
20240606@183524.3216 g1ami6b4j862d39fbofnk24eet 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'
20240606@183524.3225 g1ami6b4j862d39fbofnk24eet 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'
20240606@183524.3235 g1ami6b4j862d39fbofnk24eet Query : use flama_phc
20240606@183524.3239 g1ami6b4j862d39fbofnk24eet Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183524.3252 g1ami6b4j862d39fbofnk24eet Query : use flama_phc
20240606@183524.3255 g1ami6b4j862d39fbofnk24eet Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183524.3265 g1ami6b4j862d39fbofnk24eet Query : use flama_phc
20240606@183524.3268 g1ami6b4j862d39fbofnk24eet 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')
20240606@183524.3762 hgk3kdqkv8tnfjds8hlp5pa2nh Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183524.3775 hgk3kdqkv8tnfjds8hlp5pa2nh Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183524.3790 hgk3kdqkv8tnfjds8hlp5pa2nh Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='266';
20240606@183524.3835 hgk3kdqkv8tnfjds8hlp5pa2nh Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='266';
20240606@183524.3847 hgk3kdqkv8tnfjds8hlp5pa2nh Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='266';
20240606@183524.3858 hgk3kdqkv8tnfjds8hlp5pa2nh Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='266';
20240606@183524.3871 hgk3kdqkv8tnfjds8hlp5pa2nh Query : use flama_phc
20240606@183524.3873 hgk3kdqkv8tnfjds8hlp5pa2nh Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183524.3887 hgk3kdqkv8tnfjds8hlp5pa2nh Query : use flama_phc
20240606@183524.3890 hgk3kdqkv8tnfjds8hlp5pa2nh Query : select no, estab,szadrsdesc from szadrs where u_coddest=4801
20240606@183524.3964 hgk3kdqkv8tnfjds8hlp5pa2nh Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1834.00.1'
20240606@183524.4122 hgk3kdqkv8tnfjds8hlp5pa2nh 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'
20240606@183524.4261 hgk3kdqkv8tnfjds8hlp5pa2nh 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'
20240606@183524.4271 hgk3kdqkv8tnfjds8hlp5pa2nh Query : use flama_phc
20240606@183524.4274 hgk3kdqkv8tnfjds8hlp5pa2nh Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183524.4286 hgk3kdqkv8tnfjds8hlp5pa2nh Query : use flama_phc
20240606@183524.4288 hgk3kdqkv8tnfjds8hlp5pa2nh Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183524.4299 hgk3kdqkv8tnfjds8hlp5pa2nh Query : use flama_phc
20240606@183524.4301 hgk3kdqkv8tnfjds8hlp5pa2nh 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')
20240606@183524.4758 4ma2nosvj2cpu0m7eplaa1v15v Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183524.4771 4ma2nosvj2cpu0m7eplaa1v15v Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183524.4788 4ma2nosvj2cpu0m7eplaa1v15v Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='267';
20240606@183524.4828 4ma2nosvj2cpu0m7eplaa1v15v Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='267';
20240606@183524.4840 4ma2nosvj2cpu0m7eplaa1v15v Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='267';
20240606@183524.4852 4ma2nosvj2cpu0m7eplaa1v15v Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='267';
20240606@183524.4863 4ma2nosvj2cpu0m7eplaa1v15v Query : use flama_phc
20240606@183524.4867 4ma2nosvj2cpu0m7eplaa1v15v Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183524.4888 4ma2nosvj2cpu0m7eplaa1v15v Query : use flama_phc
20240606@183524.4891 4ma2nosvj2cpu0m7eplaa1v15v Query : select no, estab,szadrsdesc from szadrs where u_coddest=4801
20240606@183524.4925 4ma2nosvj2cpu0m7eplaa1v15v 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'
20240606@183524.4936 4ma2nosvj2cpu0m7eplaa1v15v 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'
20240606@183524.5151 4ma2nosvj2cpu0m7eplaa1v15v Query : use flama_phc
20240606@183524.5155 4ma2nosvj2cpu0m7eplaa1v15v Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183524.5169 4ma2nosvj2cpu0m7eplaa1v15v Query : use flama_phc
20240606@183524.5172 4ma2nosvj2cpu0m7eplaa1v15v Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183524.5183 4ma2nosvj2cpu0m7eplaa1v15v Query : use flama_phc
20240606@183524.5186 4ma2nosvj2cpu0m7eplaa1v15v 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')
20240606@183524.5677 rt7auvqdbgdg5h8icpoj4ti731 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183524.5690 rt7auvqdbgdg5h8icpoj4ti731 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183524.5712 rt7auvqdbgdg5h8icpoj4ti731 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='268';
20240606@183524.5752 rt7auvqdbgdg5h8icpoj4ti731 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='268';
20240606@183524.5765 rt7auvqdbgdg5h8icpoj4ti731 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='268';
20240606@183524.5777 rt7auvqdbgdg5h8icpoj4ti731 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='268';
20240606@183524.5788 rt7auvqdbgdg5h8icpoj4ti731 Query : use flama_phc
20240606@183524.5791 rt7auvqdbgdg5h8icpoj4ti731 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183524.5808 rt7auvqdbgdg5h8icpoj4ti731 Query : use flama_phc
20240606@183524.5811 rt7auvqdbgdg5h8icpoj4ti731 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4801
20240606@183524.5845 rt7auvqdbgdg5h8icpoj4ti731 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'
20240606@183524.5857 rt7auvqdbgdg5h8icpoj4ti731 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'
20240606@183524.6020 rt7auvqdbgdg5h8icpoj4ti731 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'
20240606@183524.6032 rt7auvqdbgdg5h8icpoj4ti731 Query : use flama_phc
20240606@183524.6042 rt7auvqdbgdg5h8icpoj4ti731 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183524.6065 rt7auvqdbgdg5h8icpoj4ti731 Query : use flama_phc
20240606@183524.6068 rt7auvqdbgdg5h8icpoj4ti731 Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183524.6207 rt7auvqdbgdg5h8icpoj4ti731 Query : use flama_phc
20240606@183524.6210 rt7auvqdbgdg5h8icpoj4ti731 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')
20240606@183524.7551 uro51eb1h37ar5hfclveiqpqt3 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183524.7565 uro51eb1h37ar5hfclveiqpqt3 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183524.7580 uro51eb1h37ar5hfclveiqpqt3 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='269';
20240606@183524.7621 uro51eb1h37ar5hfclveiqpqt3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='269';
20240606@183524.7633 uro51eb1h37ar5hfclveiqpqt3 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='269';
20240606@183524.7656 uro51eb1h37ar5hfclveiqpqt3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='269';
20240606@183524.7669 uro51eb1h37ar5hfclveiqpqt3 Query : use flama_phc
20240606@183524.7672 uro51eb1h37ar5hfclveiqpqt3 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183524.7687 uro51eb1h37ar5hfclveiqpqt3 Query : use flama_phc
20240606@183524.7690 uro51eb1h37ar5hfclveiqpqt3 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4801
20240606@183524.7732 uro51eb1h37ar5hfclveiqpqt3 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'
20240606@183524.7742 uro51eb1h37ar5hfclveiqpqt3 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'
20240606@183524.7753 uro51eb1h37ar5hfclveiqpqt3 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'
20240606@183524.7764 uro51eb1h37ar5hfclveiqpqt3 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'
20240606@183524.7775 uro51eb1h37ar5hfclveiqpqt3 Query : use flama_phc
20240606@183524.7778 uro51eb1h37ar5hfclveiqpqt3 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183524.7791 uro51eb1h37ar5hfclveiqpqt3 Query : use flama_phc
20240606@183524.7794 uro51eb1h37ar5hfclveiqpqt3 Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183524.7805 uro51eb1h37ar5hfclveiqpqt3 Query : use flama_phc
20240606@183524.7808 uro51eb1h37ar5hfclveiqpqt3 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')
20240606@183524.8270 4h48gdhe5agft4irtofql4sbun Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183524.8284 4h48gdhe5agft4irtofql4sbun Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183524.8299 4h48gdhe5agft4irtofql4sbun Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='270';
20240606@183524.8338 4h48gdhe5agft4irtofql4sbun Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='270';
20240606@183524.8349 4h48gdhe5agft4irtofql4sbun Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='270';
20240606@183524.8360 4h48gdhe5agft4irtofql4sbun Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='270';
20240606@183524.8371 4h48gdhe5agft4irtofql4sbun Query : use flama_phc
20240606@183524.8374 4h48gdhe5agft4irtofql4sbun Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183524.8388 4h48gdhe5agft4irtofql4sbun Query : use flama_phc
20240606@183524.8390 4h48gdhe5agft4irtofql4sbun Query : select no, estab,szadrsdesc from szadrs where u_coddest=4801
20240606@183524.8422 4h48gdhe5agft4irtofql4sbun 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'
20240606@183524.8434 4h48gdhe5agft4irtofql4sbun 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'
20240606@183524.8444 4h48gdhe5agft4irtofql4sbun Query : use flama_phc
20240606@183524.8447 4h48gdhe5agft4irtofql4sbun Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183524.8460 4h48gdhe5agft4irtofql4sbun Query : use flama_phc
20240606@183524.8466 4h48gdhe5agft4irtofql4sbun Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183524.8477 4h48gdhe5agft4irtofql4sbun Query : use flama_phc
20240606@183524.8480 4h48gdhe5agft4irtofql4sbun 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')
20240606@183524.8939 8i4vii5v3dm12uh66blvk4p8kc Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183524.8953 8i4vii5v3dm12uh66blvk4p8kc Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183524.8968 8i4vii5v3dm12uh66blvk4p8kc Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='271';
20240606@183524.9007 8i4vii5v3dm12uh66blvk4p8kc Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='271';
20240606@183524.9019 8i4vii5v3dm12uh66blvk4p8kc Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='271';
20240606@183524.9029 8i4vii5v3dm12uh66blvk4p8kc Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='271';
20240606@183524.9040 8i4vii5v3dm12uh66blvk4p8kc Query : use flama_phc
20240606@183524.9043 8i4vii5v3dm12uh66blvk4p8kc Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183524.9057 8i4vii5v3dm12uh66blvk4p8kc Query : use flama_phc
20240606@183524.9060 8i4vii5v3dm12uh66blvk4p8kc Query : select no, estab,szadrsdesc from szadrs where u_coddest=4801
20240606@183524.9091 8i4vii5v3dm12uh66blvk4p8kc 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'
20240606@183524.9101 8i4vii5v3dm12uh66blvk4p8kc 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'
20240606@183524.9117 8i4vii5v3dm12uh66blvk4p8kc Query : use flama_phc
20240606@183524.9120 8i4vii5v3dm12uh66blvk4p8kc Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183524.9132 8i4vii5v3dm12uh66blvk4p8kc Query : use flama_phc
20240606@183524.9135 8i4vii5v3dm12uh66blvk4p8kc Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183524.9148 8i4vii5v3dm12uh66blvk4p8kc Query : use flama_phc
20240606@183524.9151 8i4vii5v3dm12uh66blvk4p8kc 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')
20240606@183524.9698 p9gcaplqa1qg8d42ilaa10r3rh Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183524.9711 p9gcaplqa1qg8d42ilaa10r3rh Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183524.9726 p9gcaplqa1qg8d42ilaa10r3rh Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='272';
20240606@183524.9765 p9gcaplqa1qg8d42ilaa10r3rh Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='272';
20240606@183524.9777 p9gcaplqa1qg8d42ilaa10r3rh Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='272';
20240606@183524.9788 p9gcaplqa1qg8d42ilaa10r3rh Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='272';
20240606@183524.9798 p9gcaplqa1qg8d42ilaa10r3rh Query : use flama_phc
20240606@183524.9802 p9gcaplqa1qg8d42ilaa10r3rh Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183524.9815 p9gcaplqa1qg8d42ilaa10r3rh Query : use flama_phc
20240606@183524.9818 p9gcaplqa1qg8d42ilaa10r3rh Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240606@183524.9849 p9gcaplqa1qg8d42ilaa10r3rh 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'
20240606@183525.2800 p9gcaplqa1qg8d42ilaa10r3rh Query : use flama_phc
20240606@183525.3100 p9gcaplqa1qg8d42ilaa10r3rh Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183525.4500 p9gcaplqa1qg8d42ilaa10r3rh Query : use flama_phc
20240606@183525.4800 p9gcaplqa1qg8d42ilaa10r3rh Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183525.5800 p9gcaplqa1qg8d42ilaa10r3rh Query : use flama_phc
20240606@183525.6100 p9gcaplqa1qg8d42ilaa10r3rh 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')
20240606@183525.6050 miaurko32ilg0l128fe2oe5it7 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183525.6200 miaurko32ilg0l128fe2oe5it7 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183525.6350 miaurko32ilg0l128fe2oe5it7 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='273';
20240606@183525.6740 miaurko32ilg0l128fe2oe5it7 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='273';
20240606@183525.6860 miaurko32ilg0l128fe2oe5it7 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='273';
20240606@183525.6970 miaurko32ilg0l128fe2oe5it7 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='273';
20240606@183525.7080 miaurko32ilg0l128fe2oe5it7 Query : use flama_phc
20240606@183525.7110 miaurko32ilg0l128fe2oe5it7 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183525.7240 miaurko32ilg0l128fe2oe5it7 Query : use flama_phc
20240606@183525.7280 miaurko32ilg0l128fe2oe5it7 Query : select no, estab,szadrsdesc from szadrs where u_coddest=2448
20240606@183525.8060 miaurko32ilg0l128fe2oe5it7 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'
20240606@183525.9630 miaurko32ilg0l128fe2oe5it7 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'
20240606@183525.9730 miaurko32ilg0l128fe2oe5it7 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'
20240606@183525.1131 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1256.00.1'
20240606@183525.1289 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1266.00.1'
20240606@183525.1460 miaurko32ilg0l128fe2oe5it7 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'
20240606@183525.1622 miaurko32ilg0l128fe2oe5it7 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'
20240606@183525.1632 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1462.00.1'
20240606@183525.1777 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1407.00.1'
20240606@183525.1915 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1417.00.1'
20240606@183525.2045 miaurko32ilg0l128fe2oe5it7 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'
20240606@183525.2168 miaurko32ilg0l128fe2oe5it7 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'
20240606@183525.2292 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1685.00.1'
20240606@183525.2426 miaurko32ilg0l128fe2oe5it7 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'
20240606@183525.2566 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1690.00.1'
20240606@183525.2709 miaurko32ilg0l128fe2oe5it7 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'
20240606@183525.2838 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1643.00.1'
20240606@183525.2952 miaurko32ilg0l128fe2oe5it7 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'
20240606@183525.3071 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1716.00.1'
20240606@183525.3081 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1834.00.1'
20240606@183525.3092 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1834.00.1'
20240606@183525.3102 miaurko32ilg0l128fe2oe5it7 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'
20240606@183525.3222 miaurko32ilg0l128fe2oe5it7 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'
20240606@183525.3232 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2221.00.1'
20240606@183525.3355 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2222.00.1'
20240606@183525.3466 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2223.00.1'
20240606@183525.3579 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2224.00.1'
20240606@183525.3696 miaurko32ilg0l128fe2oe5it7 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'
20240606@183525.3872 miaurko32ilg0l128fe2oe5it7 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'
20240606@183525.3999 miaurko32ilg0l128fe2oe5it7 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'
20240606@183525.4010 miaurko32ilg0l128fe2oe5it7 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'
20240606@183525.4162 miaurko32ilg0l128fe2oe5it7 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'
20240606@183525.4173 miaurko32ilg0l128fe2oe5it7 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'
20240606@183525.4184 miaurko32ilg0l128fe2oe5it7 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'
20240606@183525.4339 miaurko32ilg0l128fe2oe5it7 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'
20240606@183525.4352 miaurko32ilg0l128fe2oe5it7 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'
20240606@183525.4362 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.4861.00.1'
20240606@183525.4511 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.497.00.01'
20240606@183525.4521 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4900.00.1'
20240606@183525.4662 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4960.00.1'
20240606@183525.4816 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4901.00.1'
20240606@183525.4941 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4961.00.1'
20240606@183525.5061 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4962.00.1'
20240606@183525.6393 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4963.00.1'
20240606@183525.6554 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.5540.00.1'
20240606@183525.6699 miaurko32ilg0l128fe2oe5it7 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'
20240606@183525.6824 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.642.00.01'
20240606@183525.6950 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20240606@183525.7134 miaurko32ilg0l128fe2oe5it7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20240606@183525.7144 miaurko32ilg0l128fe2oe5it7 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'
20240606@183525.7292 miaurko32ilg0l128fe2oe5it7 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'
20240606@183525.7304 miaurko32ilg0l128fe2oe5it7 Query : use flama_phc
20240606@183525.7307 miaurko32ilg0l128fe2oe5it7 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183525.7321 miaurko32ilg0l128fe2oe5it7 Query : use flama_phc
20240606@183525.7324 miaurko32ilg0l128fe2oe5it7 Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183525.7335 miaurko32ilg0l128fe2oe5it7 Query : use flama_phc
20240606@183525.7338 miaurko32ilg0l128fe2oe5it7 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')
20240606@183525.7810 i4363f1hb25nb15vf3udnimev1 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183525.7823 i4363f1hb25nb15vf3udnimev1 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183525.7839 i4363f1hb25nb15vf3udnimev1 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='274';
20240606@183525.7878 i4363f1hb25nb15vf3udnimev1 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='274';
20240606@183525.7891 i4363f1hb25nb15vf3udnimev1 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='274';
20240606@183525.7902 i4363f1hb25nb15vf3udnimev1 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='274';
20240606@183525.7913 i4363f1hb25nb15vf3udnimev1 Query : use flama_phc
20240606@183525.7915 i4363f1hb25nb15vf3udnimev1 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183525.7928 i4363f1hb25nb15vf3udnimev1 Query : use flama_phc
20240606@183525.7933 i4363f1hb25nb15vf3udnimev1 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240606@183525.7965 i4363f1hb25nb15vf3udnimev1 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'
20240606@183525.8127 i4363f1hb25nb15vf3udnimev1 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'
20240606@183525.8137 i4363f1hb25nb15vf3udnimev1 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2223.00.1'
20240606@183525.8147 i4363f1hb25nb15vf3udnimev1 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2224.00.1'
20240606@183525.8159 i4363f1hb25nb15vf3udnimev1 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2224.00.1'
20240606@183525.8168 i4363f1hb25nb15vf3udnimev1 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4840.00.1'
20240606@183525.8178 i4363f1hb25nb15vf3udnimev1 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4840.00.1'
20240606@183525.8194 i4363f1hb25nb15vf3udnimev1 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2221.00.1'
20240606@183525.8205 i4363f1hb25nb15vf3udnimev1 Query : use flama_phc
20240606@183525.8208 i4363f1hb25nb15vf3udnimev1 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183525.8220 i4363f1hb25nb15vf3udnimev1 Query : use flama_phc
20240606@183525.8223 i4363f1hb25nb15vf3udnimev1 Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183525.8233 i4363f1hb25nb15vf3udnimev1 Query : use flama_phc
20240606@183525.8235 i4363f1hb25nb15vf3udnimev1 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')
20240606@183525.8742 92suqsqje8995vesdbrjajhev4 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183525.8756 92suqsqje8995vesdbrjajhev4 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183525.8771 92suqsqje8995vesdbrjajhev4 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='275';
20240606@183525.8811 92suqsqje8995vesdbrjajhev4 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='275';
20240606@183525.8823 92suqsqje8995vesdbrjajhev4 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='275';
20240606@183525.8835 92suqsqje8995vesdbrjajhev4 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='275';
20240606@183525.8845 92suqsqje8995vesdbrjajhev4 Query : use flama_phc
20240606@183525.8848 92suqsqje8995vesdbrjajhev4 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183525.8861 92suqsqje8995vesdbrjajhev4 Query : use flama_phc
20240606@183525.8864 92suqsqje8995vesdbrjajhev4 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4774
20240606@183525.8942 92suqsqje8995vesdbrjajhev4 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'
20240606@183525.9100 92suqsqje8995vesdbrjajhev4 Query : use flama_phc
20240606@183525.9103 92suqsqje8995vesdbrjajhev4 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183525.9116 92suqsqje8995vesdbrjajhev4 Query : use flama_phc
20240606@183525.9118 92suqsqje8995vesdbrjajhev4 Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183525.9129 92suqsqje8995vesdbrjajhev4 Query : use flama_phc
20240606@183525.9131 92suqsqje8995vesdbrjajhev4 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')
20240606@183525.9612 295hl685ua8t96u61q93grbcga Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183525.9625 295hl685ua8t96u61q93grbcga Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183525.9645 295hl685ua8t96u61q93grbcga Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='276';
20240606@183525.9683 295hl685ua8t96u61q93grbcga Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='276';
20240606@183525.9696 295hl685ua8t96u61q93grbcga Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='276';
20240606@183525.9707 295hl685ua8t96u61q93grbcga Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='276';
20240606@183525.9719 295hl685ua8t96u61q93grbcga Query : use flama_phc
20240606@183525.9721 295hl685ua8t96u61q93grbcga Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183525.9735 295hl685ua8t96u61q93grbcga Query : use flama_phc
20240606@183525.9739 295hl685ua8t96u61q93grbcga Query : select no, estab,szadrsdesc from szadrs where u_coddest=6852
20240606@183525.9813 295hl685ua8t96u61q93grbcga 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'
20240606@183525.9968 295hl685ua8t96u61q93grbcga Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '328.9306.00.1'
20240606@183526.8800 295hl685ua8t96u61q93grbcga 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'
20240606@183526.2150 295hl685ua8t96u61q93grbcga Query : use flama_phc
20240606@183526.2230 295hl685ua8t96u61q93grbcga Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183526.2360 295hl685ua8t96u61q93grbcga Query : use flama_phc
20240606@183526.2390 295hl685ua8t96u61q93grbcga Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183526.2500 295hl685ua8t96u61q93grbcga Query : use flama_phc
20240606@183526.2530 295hl685ua8t96u61q93grbcga 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')
20240606@183526.1554 ppiuf3nikh13jhcpjm5tpk54b9 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183526.1569 ppiuf3nikh13jhcpjm5tpk54b9 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183526.1584 ppiuf3nikh13jhcpjm5tpk54b9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='277';
20240606@183526.1629 ppiuf3nikh13jhcpjm5tpk54b9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='277';
20240606@183526.1641 ppiuf3nikh13jhcpjm5tpk54b9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='277';
20240606@183526.1652 ppiuf3nikh13jhcpjm5tpk54b9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='277';
20240606@183526.1663 ppiuf3nikh13jhcpjm5tpk54b9 Query : use flama_phc
20240606@183526.1666 ppiuf3nikh13jhcpjm5tpk54b9 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183526.1680 ppiuf3nikh13jhcpjm5tpk54b9 Query : use flama_phc
20240606@183526.1683 ppiuf3nikh13jhcpjm5tpk54b9 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4500
20240606@183526.1755 ppiuf3nikh13jhcpjm5tpk54b9 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'
20240606@183526.1766 ppiuf3nikh13jhcpjm5tpk54b9 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'
20240606@183526.1776 ppiuf3nikh13jhcpjm5tpk54b9 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'
20240606@183526.1787 ppiuf3nikh13jhcpjm5tpk54b9 Query : use flama_phc
20240606@183526.1790 ppiuf3nikh13jhcpjm5tpk54b9 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183526.1802 ppiuf3nikh13jhcpjm5tpk54b9 Query : use flama_phc
20240606@183526.1805 ppiuf3nikh13jhcpjm5tpk54b9 Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183526.1816 ppiuf3nikh13jhcpjm5tpk54b9 Query : use flama_phc
20240606@183526.1818 ppiuf3nikh13jhcpjm5tpk54b9 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')
20240606@183526.2280 jpv19rs45oek777udr0vg0f6es Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183526.2296 jpv19rs45oek777udr0vg0f6es Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183526.2312 jpv19rs45oek777udr0vg0f6es Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='278';
20240606@183526.2356 jpv19rs45oek777udr0vg0f6es Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='278';
20240606@183526.2367 jpv19rs45oek777udr0vg0f6es Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='278';
20240606@183526.2378 jpv19rs45oek777udr0vg0f6es Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='278';
20240606@183526.2390 jpv19rs45oek777udr0vg0f6es Query : use flama_phc
20240606@183526.2393 jpv19rs45oek777udr0vg0f6es Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183526.2407 jpv19rs45oek777udr0vg0f6es Query : use flama_phc
20240606@183526.2410 jpv19rs45oek777udr0vg0f6es Query : select no, estab,szadrsdesc from szadrs where u_coddest=1474
20240606@183526.2483 jpv19rs45oek777udr0vg0f6es Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1831.00.2'
20240606@183526.2644 jpv19rs45oek777udr0vg0f6es Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1831.00.2'
20240606@183526.2654 jpv19rs45oek777udr0vg0f6es Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1831.00.2'
20240606@183526.2664 jpv19rs45oek777udr0vg0f6es Query : use flama_phc
20240606@183526.2668 jpv19rs45oek777udr0vg0f6es Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183526.2681 jpv19rs45oek777udr0vg0f6es Query : use flama_phc
20240606@183526.2684 jpv19rs45oek777udr0vg0f6es Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183526.2694 jpv19rs45oek777udr0vg0f6es Query : use flama_phc
20240606@183526.2697 jpv19rs45oek777udr0vg0f6es 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')
20240606@183526.3145 76g6na94senq76utkcmjtb1u3q Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183526.3160 76g6na94senq76utkcmjtb1u3q Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183526.3177 76g6na94senq76utkcmjtb1u3q Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='279';
20240606@183526.3217 76g6na94senq76utkcmjtb1u3q Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='279';
20240606@183526.3228 76g6na94senq76utkcmjtb1u3q Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='279';
20240606@183526.3239 76g6na94senq76utkcmjtb1u3q Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='279';
20240606@183526.3259 76g6na94senq76utkcmjtb1u3q Query : use flama_phc
20240606@183526.3262 76g6na94senq76utkcmjtb1u3q Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183526.3276 76g6na94senq76utkcmjtb1u3q Query : use flama_phc
20240606@183526.3278 76g6na94senq76utkcmjtb1u3q Query : select no, estab,szadrsdesc from szadrs where u_coddest=7254
20240606@183526.3352 76g6na94senq76utkcmjtb1u3q Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1831.00.2'
20240606@183526.3363 76g6na94senq76utkcmjtb1u3q Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1831.00.2'
20240606@183526.3375 76g6na94senq76utkcmjtb1u3q Query : use flama_phc
20240606@183526.3378 76g6na94senq76utkcmjtb1u3q Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183526.3391 76g6na94senq76utkcmjtb1u3q Query : use flama_phc
20240606@183526.3394 76g6na94senq76utkcmjtb1u3q Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183526.3404 76g6na94senq76utkcmjtb1u3q Query : use flama_phc
20240606@183526.3407 76g6na94senq76utkcmjtb1u3q 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')
20240606@183526.3882 tm9e127i2njfra84ddpnhp51qf Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183526.3895 tm9e127i2njfra84ddpnhp51qf Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183526.3913 tm9e127i2njfra84ddpnhp51qf Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='280';
20240606@183526.3958 tm9e127i2njfra84ddpnhp51qf Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='280';
20240606@183526.3970 tm9e127i2njfra84ddpnhp51qf Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='280';
20240606@183526.3982 tm9e127i2njfra84ddpnhp51qf Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='280';
20240606@183526.3993 tm9e127i2njfra84ddpnhp51qf Query : use flama_phc
20240606@183526.3996 tm9e127i2njfra84ddpnhp51qf Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183526.4010 tm9e127i2njfra84ddpnhp51qf Query : use flama_phc
20240606@183526.4013 tm9e127i2njfra84ddpnhp51qf Query : select no, estab,szadrsdesc from szadrs where u_coddest=3304
20240606@183526.4087 tm9e127i2njfra84ddpnhp51qf 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'
20240606@183526.4099 tm9e127i2njfra84ddpnhp51qf Query : use flama_phc
20240606@183526.4101 tm9e127i2njfra84ddpnhp51qf Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183526.4115 tm9e127i2njfra84ddpnhp51qf Query : use flama_phc
20240606@183526.4118 tm9e127i2njfra84ddpnhp51qf Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183526.4128 tm9e127i2njfra84ddpnhp51qf Query : use flama_phc
20240606@183526.4131 tm9e127i2njfra84ddpnhp51qf 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')
20240606@183526.4679 8m5dm0t5dobm5l6geud5r4rjvd Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183526.4692 8m5dm0t5dobm5l6geud5r4rjvd Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183526.4709 8m5dm0t5dobm5l6geud5r4rjvd Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='281';
20240606@183526.4748 8m5dm0t5dobm5l6geud5r4rjvd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='281';
20240606@183526.4763 8m5dm0t5dobm5l6geud5r4rjvd Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='281';
20240606@183526.4774 8m5dm0t5dobm5l6geud5r4rjvd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='281';
20240606@183526.4794 8m5dm0t5dobm5l6geud5r4rjvd Query : use flama_phc
20240606@183526.4797 8m5dm0t5dobm5l6geud5r4rjvd Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183526.4811 8m5dm0t5dobm5l6geud5r4rjvd Query : use flama_phc
20240606@183526.4814 8m5dm0t5dobm5l6geud5r4rjvd Query : select no, estab,szadrsdesc from szadrs where u_coddest=4779
20240606@183526.4971 8m5dm0t5dobm5l6geud5r4rjvd 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'
20240606@183526.4982 8m5dm0t5dobm5l6geud5r4rjvd 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'
20240606@183526.4999 8m5dm0t5dobm5l6geud5r4rjvd Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4960.00.1'
20240606@183526.5010 8m5dm0t5dobm5l6geud5r4rjvd Query : use flama_phc
20240606@183526.5013 8m5dm0t5dobm5l6geud5r4rjvd Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183526.5026 8m5dm0t5dobm5l6geud5r4rjvd Query : use flama_phc
20240606@183526.5029 8m5dm0t5dobm5l6geud5r4rjvd Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183526.5040 8m5dm0t5dobm5l6geud5r4rjvd Query : use flama_phc
20240606@183526.5043 8m5dm0t5dobm5l6geud5r4rjvd 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')
20240606@183526.5491 puh0sm7kl06l6cdmvhmhvdaig3 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183526.5506 puh0sm7kl06l6cdmvhmhvdaig3 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183526.5522 puh0sm7kl06l6cdmvhmhvdaig3 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='282';
20240606@183526.5563 puh0sm7kl06l6cdmvhmhvdaig3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='282';
20240606@183526.5575 puh0sm7kl06l6cdmvhmhvdaig3 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='282';
20240606@183526.5586 puh0sm7kl06l6cdmvhmhvdaig3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='282';
20240606@183526.5597 puh0sm7kl06l6cdmvhmhvdaig3 Query : use flama_phc
20240606@183526.5600 puh0sm7kl06l6cdmvhmhvdaig3 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183526.5615 puh0sm7kl06l6cdmvhmhvdaig3 Query : use flama_phc
20240606@183526.5617 puh0sm7kl06l6cdmvhmhvdaig3 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4790
20240606@183526.5690 puh0sm7kl06l6cdmvhmhvdaig3 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'
20240606@183526.5704 puh0sm7kl06l6cdmvhmhvdaig3 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'
20240606@183526.5714 puh0sm7kl06l6cdmvhmhvdaig3 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'
20240606@183526.5724 puh0sm7kl06l6cdmvhmhvdaig3 Query : use flama_phc
20240606@183526.5727 puh0sm7kl06l6cdmvhmhvdaig3 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183526.5739 puh0sm7kl06l6cdmvhmhvdaig3 Query : use flama_phc
20240606@183526.5748 puh0sm7kl06l6cdmvhmhvdaig3 Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183526.5759 puh0sm7kl06l6cdmvhmhvdaig3 Query : use flama_phc
20240606@183526.5762 puh0sm7kl06l6cdmvhmhvdaig3 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')
20240606@183526.6220 6jrjhre1f790t635iugiess162 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183526.6233 6jrjhre1f790t635iugiess162 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
