20240714@121908.2737 pdfon6thtvrr6mr6khf9fd2eib Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240714@121908.2756 pdfon6thtvrr6mr6khf9fd2eib Query : use flama_phc
20240714@121908.2759 pdfon6thtvrr6mr6khf9fd2eib Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240714@123608.1945 cbh93m94npnoat4b0q1gagi00p Query : use flama_phc
20240714@123608.1951 cbh93m94npnoat4b0q1gagi00p Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240714@123608.1968 cbh93m94npnoat4b0q1gagi00p Query : use flama_phc
20240714@123608.1971 cbh93m94npnoat4b0q1gagi00p Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240714@131919.1983 fibtud9t7o4gqrsij7ev48h5km Query : use flama_phc
20240714@131919.1988 fibtud9t7o4gqrsij7ev48h5km Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240714@131919.2014 fibtud9t7o4gqrsij7ev48h5km Query : use flama_phc
20240714@131919.2017 fibtud9t7o4gqrsij7ev48h5km Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240714@133618.8579 l2u0n363tlue0995q77r3aq6sc Query : use flama_phc
20240714@133618.8584 l2u0n363tlue0995q77r3aq6sc Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240714@133618.8601 l2u0n363tlue0995q77r3aq6sc Query : use flama_phc
20240714@133618.8605 l2u0n363tlue0995q77r3aq6sc Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240714@141909.7530 7thtbmenmfu9mrvi8b0humc0od Query : use flama_phc
20240714@141909.7580 7thtbmenmfu9mrvi8b0humc0od Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240714@141909.7750 7thtbmenmfu9mrvi8b0humc0od Query : use flama_phc
20240714@141909.7780 7thtbmenmfu9mrvi8b0humc0od Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240714@143609.1899 864i3omi8e8rvrl1kvh3dpntsk Query : use flama_phc
20240714@143609.1903 864i3omi8e8rvrl1kvh3dpntsk Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240714@143609.1923 864i3omi8e8rvrl1kvh3dpntsk Query : use flama_phc
20240714@143609.1926 864i3omi8e8rvrl1kvh3dpntsk Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240714@151908.9428 mhac8so1g6atp5q1khe66b0f4f Query : use flama_phc
20240714@151908.9433 mhac8so1g6atp5q1khe66b0f4f Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240714@151908.9450 mhac8so1g6atp5q1khe66b0f4f Query : use flama_phc
20240714@151908.9453 mhac8so1g6atp5q1khe66b0f4f Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240714@153609.2080 plc37eo5j84sjumpv70328pvbv Query : use flama_phc
20240714@153609.2130 plc37eo5j84sjumpv70328pvbv Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240714@153609.2300 plc37eo5j84sjumpv70328pvbv Query : use flama_phc
20240714@153609.2330 plc37eo5j84sjumpv70328pvbv Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240714@161909.9404 eagnmk5ja6gu99pt6pqmuc64je Query : use flama_phc
20240714@161909.9409 eagnmk5ja6gu99pt6pqmuc64je Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240714@161909.9426 eagnmk5ja6gu99pt6pqmuc64je Query : use flama_phc
20240714@161909.9429 eagnmk5ja6gu99pt6pqmuc64je Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240714@163609.8054 946k21tfgdme2nbe8e0ov1t49o Query : use flama_phc
20240714@163609.8060 946k21tfgdme2nbe8e0ov1t49o Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240714@163609.8081 946k21tfgdme2nbe8e0ov1t49o Query : use flama_phc
20240714@163609.8084 946k21tfgdme2nbe8e0ov1t49o Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240714@171912.4968 v8a64nbp8o2tet9r10piudoqd8 Query : use flama_phc
20240714@171912.4974 v8a64nbp8o2tet9r10piudoqd8 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240714@171912.4996 v8a64nbp8o2tet9r10piudoqd8 Query : use flama_phc
20240714@171912.5000 v8a64nbp8o2tet9r10piudoqd8 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240714@173612.6503 rquasmp3euhf3cnvu741hlp759 Query : use flama_phc
20240714@173612.6509 rquasmp3euhf3cnvu741hlp759 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240714@173612.6535 rquasmp3euhf3cnvu741hlp759 Query : use flama_phc
20240714@173612.6539 rquasmp3euhf3cnvu741hlp759 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240714@181909.9287 4ikr69k2718df9pj7joihm0d6k Query : use flama_phc
20240714@181909.9291 4ikr69k2718df9pj7joihm0d6k Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240714@181909.9311 4ikr69k2718df9pj7joihm0d6k Query : use flama_phc
20240714@181909.9314 4ikr69k2718df9pj7joihm0d6k Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240714@183610.2351 q3uqnq3kk4q7js4kc26p4m1n34 Query : use flama_phc
20240714@183610.2357 q3uqnq3kk4q7js4kc26p4m1n34 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240714@183610.2378 q3uqnq3kk4q7js4kc26p4m1n34 Query : use flama_phc
20240714@183610.2382 q3uqnq3kk4q7js4kc26p4m1n34 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240714@191909.6642 jd2cu12fnafp77u9eb0p49h9tp Query : use flama_phc
20240714@191909.6651 jd2cu12fnafp77u9eb0p49h9tp Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240714@191909.6668 jd2cu12fnafp77u9eb0p49h9tp Query : use flama_phc
20240714@191909.6671 jd2cu12fnafp77u9eb0p49h9tp Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240714@193609.8343 5itda3sn70srmovjrjbtccb8vl Query : use flama_phc
20240714@193609.8348 5itda3sn70srmovjrjbtccb8vl Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240714@193609.8366 5itda3sn70srmovjrjbtccb8vl Query : use flama_phc
20240714@193609.8369 5itda3sn70srmovjrjbtccb8vl Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240714@201909.9682 n407vlbikl4bha2ckkbc2t98v9 Query : use flama_phc
20240714@201909.9687 n407vlbikl4bha2ckkbc2t98v9 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240714@201909.9705 n407vlbikl4bha2ckkbc2t98v9 Query : use flama_phc
20240714@201909.9708 n407vlbikl4bha2ckkbc2t98v9 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240714@203609.6774 7g234n30hkfenq5r4nunk9odiv Query : use flama_phc
20240714@203609.6780 7g234n30hkfenq5r4nunk9odiv Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240714@203609.6800 7g234n30hkfenq5r4nunk9odiv Query : use flama_phc
20240714@203609.6804 7g234n30hkfenq5r4nunk9odiv Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240714@211909.7268 rmnh7r20hju1lj3cgdsosggmh6 Query : use flama_phc
20240714@211909.7273 rmnh7r20hju1lj3cgdsosggmh6 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240714@211909.7292 rmnh7r20hju1lj3cgdsosggmh6 Query : use flama_phc
20240714@211909.7295 rmnh7r20hju1lj3cgdsosggmh6 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240714@213609.8675 57m667fc2ad5kulgbve5uhasas Query : use flama_phc
20240714@213609.8680 57m667fc2ad5kulgbve5uhasas Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240714@213609.8698 57m667fc2ad5kulgbve5uhasas Query : use flama_phc
20240714@213609.8701 57m667fc2ad5kulgbve5uhasas Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240714@221909.9112 c5t9j4op0c9bt79dvcj112m002 Query : use flama_phc
20240714@221909.9117 c5t9j4op0c9bt79dvcj112m002 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240714@221909.9133 c5t9j4op0c9bt79dvcj112m002 Query : use flama_phc
20240714@221909.9136 c5t9j4op0c9bt79dvcj112m002 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240714@223610.9770 ob7o938le3ui204d6f4f8h7jcg Query : use flama_phc
20240714@223610.9810 ob7o938le3ui204d6f4f8h7jcg Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240714@223610.9980 ob7o938le3ui204d6f4f8h7jcg Query : use flama_phc
20240714@223610.1001 ob7o938le3ui204d6f4f8h7jcg Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240714@231909.4502 el32fnjqjl4gs5aq34jnvpn79r Query : use flama_phc
20240714@231909.4506 el32fnjqjl4gs5aq34jnvpn79r Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240714@231909.4524 el32fnjqjl4gs5aq34jnvpn79r Query : use flama_phc
20240714@231909.4527 el32fnjqjl4gs5aq34jnvpn79r Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240714@233609.1949 384qm5oo446chi7is0343msvsp Query : use flama_phc
20240714@233609.1953 384qm5oo446chi7is0343msvsp Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240714@233609.1970 384qm5oo446chi7is0343msvsp Query : use flama_phc
20240714@233609.1973 384qm5oo446chi7is0343msvsp Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@071911.1102 b7u53ickp6sltdcuoevddankqm Query : use flama_phc
20240715@071911.1107 b7u53ickp6sltdcuoevddankqm Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@071911.1141 b7u53ickp6sltdcuoevddankqm Query : use flama_phc
20240715@071911.1144 b7u53ickp6sltdcuoevddankqm Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@073614.3026 mgs37q06pkdocvh3g1camm43dq Query : use flama_phc
20240715@073614.3031 mgs37q06pkdocvh3g1camm43dq Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@073614.3052 mgs37q06pkdocvh3g1camm43dq Query : use flama_phc
20240715@073614.3055 mgs37q06pkdocvh3g1camm43dq Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@074543.4104 prfl8pq9j3tvtrmmbfcpcekk0m Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@074543.4744 prfl8pq9j3tvtrmmbfcpcekk0m Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@074543.4861 prfl8pq9j3tvtrmmbfcpcekk0m Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='909';
20240715@074543.5099 prfl8pq9j3tvtrmmbfcpcekk0m Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='909';
20240715@074543.5134 prfl8pq9j3tvtrmmbfcpcekk0m Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='909';
20240715@074543.5148 prfl8pq9j3tvtrmmbfcpcekk0m Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='909';
20240715@074543.5163 prfl8pq9j3tvtrmmbfcpcekk0m Query : use flama_phc
20240715@074543.5166 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@074543.5219 prfl8pq9j3tvtrmmbfcpcekk0m Query : use flama_phc
20240715@074543.5222 prfl8pq9j3tvtrmmbfcpcekk0m Query : select no, estab,szadrsdesc from szadrs where u_coddest=4537
20240715@074543.5301 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2907.00.1'
20240715@074543.5409 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404647 and bi.ref ='324.2907.00.1' and bi.lordem =1
20240715@074543.5708 prfl8pq9j3tvtrmmbfcpcekk0m 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'
20240715@074543.5806 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404647 and bi.ref ='324.691.00.01' and bi.lordem =2
20240715@074543.6082 prfl8pq9j3tvtrmmbfcpcekk0m 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'
20240715@074543.6180 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404647 and bi.ref ='324.1406.00.1' and bi.lordem =3
20240715@074543.6457 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1705.00.1'
20240715@074543.6566 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404647 and bi.ref ='324.1705.00.1' and bi.lordem =4
20240715@074543.7059 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240715@074543.7224 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404647 and bi.ref ='324.1816.00.1' and bi.lordem =5
20240715@074543.7506 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240715@074543.7517 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404647 and bi.ref ='324.1816.00.1' and bi.lordem =5
20240715@074543.7524 prfl8pq9j3tvtrmmbfcpcekk0m 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'
20240715@074543.7627 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404647 and bi.ref ='324.2031.00.1' and bi.lordem =6
20240715@074543.7902 prfl8pq9j3tvtrmmbfcpcekk0m 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'
20240715@074543.8000 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404647 and bi.ref ='324.5396.00.1' and bi.lordem =7
20240715@074543.8272 prfl8pq9j3tvtrmmbfcpcekk0m 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'
20240715@074543.8897 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404647 and bi.ref ='324.658.00.01' and bi.lordem =8
20240715@074543.9230 prfl8pq9j3tvtrmmbfcpcekk0m 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'
20240715@074543.9241 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404647 and bi.ref ='324.691.00.01' and bi.lordem =9
20240715@074543.9748 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.939.00.01'
20240715@074543.9849 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404647 and bi.ref ='324.939.00.01' and bi.lordem =10
20240715@074544.1290 prfl8pq9j3tvtrmmbfcpcekk0m 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'
20240715@074544.2280 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404647 and bi.ref ='304.4320.00.1' and bi.lordem =11
20240715@074544.5010 prfl8pq9j3tvtrmmbfcpcekk0m 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'
20240715@074544.6510 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404647 and bi.ref ='324.4521.00.1' and bi.lordem =12
20240715@074544.9160 prfl8pq9j3tvtrmmbfcpcekk0m 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'
20240715@074544.1013 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404647 and bi.ref ='324.4930.00.1' and bi.lordem =13
20240715@074544.1285 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4970.00.1'
20240715@074544.1397 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404647 and bi.ref ='324.4970.00.1' and bi.lordem =14
20240715@074544.1668 prfl8pq9j3tvtrmmbfcpcekk0m Query : use flama_phc
20240715@074544.1671 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@074544.1809 prfl8pq9j3tvtrmmbfcpcekk0m Query : use flama_phc
20240715@074544.1813 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 1 valor from td where td.ndoc = 39
20240715@074544.1859 prfl8pq9j3tvtrmmbfcpcekk0m Query : use flama_phc
20240715@074544.1862 prfl8pq9j3tvtrmmbfcpcekk0m 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')
20240715@074544.1952 prfl8pq9j3tvtrmmbfcpcekk0m Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@074544.2066 prfl8pq9j3tvtrmmbfcpcekk0m Query : use flama_phc
20240715@074544.2069 prfl8pq9j3tvtrmmbfcpcekk0m Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@074544.2112 prfl8pq9j3tvtrmmbfcpcekk0m Query : use flama_phc
20240715@074544.2115 prfl8pq9j3tvtrmmbfcpcekk0m Query : select szadrsstamp valor from szadrs where szadrsdesc='novaem distec, s.l.u-entrega'
20240715@074544.2127 prfl8pq9j3tvtrmmbfcpcekk0m Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='909';
20240715@074544.2142 prfl8pq9j3tvtrmmbfcpcekk0m Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='909';
20240715@074544.2641 n79p24th53i8k4vsvqdqplbknr Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@074544.2654 n79p24th53i8k4vsvqdqplbknr Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@074544.2672 n79p24th53i8k4vsvqdqplbknr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='910';
20240715@074544.2711 n79p24th53i8k4vsvqdqplbknr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='910';
20240715@074544.2727 n79p24th53i8k4vsvqdqplbknr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='910';
20240715@074544.2739 n79p24th53i8k4vsvqdqplbknr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='910';
20240715@074544.2753 n79p24th53i8k4vsvqdqplbknr Query : use flama_phc
20240715@074544.2756 n79p24th53i8k4vsvqdqplbknr Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@074544.2770 n79p24th53i8k4vsvqdqplbknr Query : use flama_phc
20240715@074544.2775 n79p24th53i8k4vsvqdqplbknr Query : select no, estab,szadrsdesc from szadrs where u_coddest=2915
20240715@074544.2845 n79p24th53i8k4vsvqdqplbknr 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'
20240715@074544.2944 n79p24th53i8k4vsvqdqplbknr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404648 and bi.ref ='324.1824.00.1' and bi.lordem =1
20240715@074544.3214 n79p24th53i8k4vsvqdqplbknr Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4970.00.1'
20240715@074544.3226 n79p24th53i8k4vsvqdqplbknr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404648 and bi.ref ='324.4970.00.1' and bi.lordem =2
20240715@074544.3498 n79p24th53i8k4vsvqdqplbknr Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1705.00.1'
20240715@074544.3509 n79p24th53i8k4vsvqdqplbknr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404648 and bi.ref ='324.1705.00.1' and bi.lordem =3
20240715@074544.3795 n79p24th53i8k4vsvqdqplbknr Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4964.00.1'
20240715@074544.3893 n79p24th53i8k4vsvqdqplbknr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404648 and bi.ref ='324.4964.00.1' and bi.lordem =4
20240715@074544.4382 n79p24th53i8k4vsvqdqplbknr 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'
20240715@074544.4486 n79p24th53i8k4vsvqdqplbknr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404648 and bi.ref ='324.642.00.01' and bi.lordem =5
20240715@074544.4763 n79p24th53i8k4vsvqdqplbknr 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'
20240715@074544.4775 n79p24th53i8k4vsvqdqplbknr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404648 and bi.ref ='324.4521.00.1' and bi.lordem =6
20240715@074544.5054 n79p24th53i8k4vsvqdqplbknr 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'
20240715@074544.5172 n79p24th53i8k4vsvqdqplbknr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404648 and bi.ref ='324.5342.00.1' and bi.lordem =7
20240715@074544.5464 n79p24th53i8k4vsvqdqplbknr 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'
20240715@074544.5562 n79p24th53i8k4vsvqdqplbknr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404648 and bi.ref ='324.1805.00.1' and bi.lordem =8
20240715@074544.5834 n79p24th53i8k4vsvqdqplbknr 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'
20240715@074544.6527 n79p24th53i8k4vsvqdqplbknr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404648 and bi.ref ='324.945.00.01' and bi.lordem =9
20240715@074544.6804 n79p24th53i8k4vsvqdqplbknr 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'
20240715@074544.6976 n79p24th53i8k4vsvqdqplbknr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404648 and bi.ref ='324.5396.00.1' and bi.lordem =10
20240715@074544.7323 n79p24th53i8k4vsvqdqplbknr 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'
20240715@074544.7420 n79p24th53i8k4vsvqdqplbknr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404648 and bi.ref ='324.1896.00.1' and bi.lordem =11
20240715@074544.7691 n79p24th53i8k4vsvqdqplbknr Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240715@074544.7702 n79p24th53i8k4vsvqdqplbknr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404648 and bi.ref ='324.1816.00.1' and bi.lordem =12
20240715@074544.7978 n79p24th53i8k4vsvqdqplbknr Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240715@074544.7988 n79p24th53i8k4vsvqdqplbknr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404648 and bi.ref ='324.1816.00.1' and bi.lordem =12
20240715@074544.7996 n79p24th53i8k4vsvqdqplbknr Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.939.00.01'
20240715@074544.8015 n79p24th53i8k4vsvqdqplbknr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404648 and bi.ref ='324.939.00.01' and bi.lordem =13
20240715@074544.8298 n79p24th53i8k4vsvqdqplbknr Query : use flama_phc
20240715@074544.8302 n79p24th53i8k4vsvqdqplbknr Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@074544.8315 n79p24th53i8k4vsvqdqplbknr Query : use flama_phc
20240715@074544.8319 n79p24th53i8k4vsvqdqplbknr Query : select top 1 1 valor from td where td.ndoc = 39
20240715@074544.8330 n79p24th53i8k4vsvqdqplbknr Query : use flama_phc
20240715@074544.8333 n79p24th53i8k4vsvqdqplbknr 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')
20240715@074544.8351 n79p24th53i8k4vsvqdqplbknr Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@074544.8367 n79p24th53i8k4vsvqdqplbknr Query : use flama_phc
20240715@074544.8371 n79p24th53i8k4vsvqdqplbknr Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@074544.8382 n79p24th53i8k4vsvqdqplbknr Query : use flama_phc
20240715@074544.8385 n79p24th53i8k4vsvqdqplbknr Query : select szadrsstamp valor from szadrs where szadrsdesc='vitoriadis, s.l.'
20240715@074544.8397 n79p24th53i8k4vsvqdqplbknr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='910';
20240715@074544.8412 n79p24th53i8k4vsvqdqplbknr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='910';
20240715@074544.8900 4b7l592fbk31oj7jcjdcljhtal Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@074544.8914 4b7l592fbk31oj7jcjdcljhtal Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@074544.8948 4b7l592fbk31oj7jcjdcljhtal Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='911';
20240715@074544.8986 4b7l592fbk31oj7jcjdcljhtal Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='911';
20240715@074544.9002 4b7l592fbk31oj7jcjdcljhtal Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='911';
20240715@074544.9016 4b7l592fbk31oj7jcjdcljhtal Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='911';
20240715@074544.9030 4b7l592fbk31oj7jcjdcljhtal Query : use flama_phc
20240715@074544.9033 4b7l592fbk31oj7jcjdcljhtal Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@074544.9048 4b7l592fbk31oj7jcjdcljhtal Query : use flama_phc
20240715@074544.9051 4b7l592fbk31oj7jcjdcljhtal Query : select no, estab,szadrsdesc from szadrs where u_coddest=416
20240715@074544.9128 4b7l592fbk31oj7jcjdcljhtal 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'
20240715@074544.9237 4b7l592fbk31oj7jcjdcljhtal Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404650 and bi.ref ='304.4211.00.1' and bi.lordem =1
20240715@074544.9531 4b7l592fbk31oj7jcjdcljhtal Query : use flama_phc
20240715@074544.9534 4b7l592fbk31oj7jcjdcljhtal Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@074544.9550 4b7l592fbk31oj7jcjdcljhtal Query : use flama_phc
20240715@074544.9553 4b7l592fbk31oj7jcjdcljhtal Query : select top 1 1 valor from td where td.ndoc = 39
20240715@074544.9564 4b7l592fbk31oj7jcjdcljhtal Query : use flama_phc
20240715@074544.9566 4b7l592fbk31oj7jcjdcljhtal 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')
20240715@074544.9586 4b7l592fbk31oj7jcjdcljhtal Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@074544.9602 4b7l592fbk31oj7jcjdcljhtal Query : use flama_phc
20240715@074544.9605 4b7l592fbk31oj7jcjdcljhtal Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@074544.9616 4b7l592fbk31oj7jcjdcljhtal Query : use flama_phc
20240715@074544.9619 4b7l592fbk31oj7jcjdcljhtal Query : select szadrsstamp valor from szadrs where szadrsdesc='bragajav, lda.'
20240715@074544.9631 4b7l592fbk31oj7jcjdcljhtal Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='911';
20240715@074544.9647 4b7l592fbk31oj7jcjdcljhtal Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='911';
20240715@074545.2860 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@074545.3000 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@074545.3180 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='912';
20240715@074545.3690 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='912';
20240715@074545.3850 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='912';
20240715@074545.3990 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='912';
20240715@074545.4130 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : use flama_phc
20240715@074545.4160 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@074545.4320 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : use flama_phc
20240715@074545.4350 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select no, estab,szadrsdesc from szadrs where u_coddest=201
20240715@074545.5070 3jujj5qlhjp0e8n5hjrs5m8ta5 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'
20240715@074545.6130 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404652 and bi.ref ='324.1685.00.1' and bi.lordem =1
20240715@074545.9140 3jujj5qlhjp0e8n5hjrs5m8ta5 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'
20240715@074545.2291 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404652 and bi.ref ='324.1667.00.1' and bi.lordem =2
20240715@074545.2750 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2907.00.1'
20240715@074545.2762 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404652 and bi.ref ='324.2907.00.1' and bi.lordem =3
20240715@074545.3545 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '325.7002.00.1'
20240715@074545.3661 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404652 and bi.ref ='325.7002.00.1' and bi.lordem =4
20240715@074545.3934 3jujj5qlhjp0e8n5hjrs5m8ta5 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'
20240715@074545.4234 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404652 and bi.ref ='324.645.00.01' and bi.lordem =5
20240715@074545.4524 3jujj5qlhjp0e8n5hjrs5m8ta5 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'
20240715@074545.4535 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404652 and bi.ref ='324.645.00.01' and bi.lordem =5
20240715@074545.4543 3jujj5qlhjp0e8n5hjrs5m8ta5 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'
20240715@074545.4650 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404652 and bi.ref ='324.646.00.01' and bi.lordem =6
20240715@074545.4936 3jujj5qlhjp0e8n5hjrs5m8ta5 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'
20240715@074545.4948 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404652 and bi.ref ='324.646.00.01' and bi.lordem =6
20240715@074545.4955 3jujj5qlhjp0e8n5hjrs5m8ta5 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'
20240715@074545.4965 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404652 and bi.ref ='324.646.00.01' and bi.lordem =6
20240715@074545.4972 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.4020.00.1'
20240715@074545.5076 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404652 and bi.ref ='304.4020.00.1' and bi.lordem =7
20240715@074545.5346 3jujj5qlhjp0e8n5hjrs5m8ta5 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'
20240715@074545.5451 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404652 and bi.ref ='324.4723.00.2' and bi.lordem =8
20240715@074545.5735 3jujj5qlhjp0e8n5hjrs5m8ta5 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'
20240715@074545.5830 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404652 and bi.ref ='304.422.00.07' and bi.lordem =9
20240715@074545.6121 3jujj5qlhjp0e8n5hjrs5m8ta5 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'
20240715@074545.6233 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404652 and bi.ref ='324.4840.00.1' and bi.lordem =10
20240715@074545.6512 3jujj5qlhjp0e8n5hjrs5m8ta5 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'
20240715@074545.6523 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404652 and bi.ref ='304.4320.00.1' and bi.lordem =11
20240715@074545.6794 3jujj5qlhjp0e8n5hjrs5m8ta5 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'
20240715@074545.6889 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404652 and bi.ref ='304.421.00.04' and bi.lordem =12
20240715@074545.7153 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '322.227.26.01'
20240715@074545.7253 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404652 and bi.ref ='322.227.26.01' and bi.lordem =13
20240715@074545.7533 3jujj5qlhjp0e8n5hjrs5m8ta5 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'
20240715@074545.7636 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404652 and bi.ref ='324.727.00.01' and bi.lordem =14
20240715@074545.7909 3jujj5qlhjp0e8n5hjrs5m8ta5 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'
20240715@074545.8008 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404652 and bi.ref ='324.4901.00.1' and bi.lordem =15
20240715@074545.8752 3jujj5qlhjp0e8n5hjrs5m8ta5 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'
20240715@074545.8856 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404652 and bi.ref ='324.1462.00.1' and bi.lordem =16
20240715@074545.9130 3jujj5qlhjp0e8n5hjrs5m8ta5 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'
20240715@074545.9231 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404652 and bi.ref ='324.4980.00.1' and bi.lordem =17
20240715@074545.9495 3jujj5qlhjp0e8n5hjrs5m8ta5 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'
20240715@074545.9600 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404652 and bi.ref ='324.4960.00.1' and bi.lordem =18
20240715@074545.9872 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2066.00.1'
20240715@074545.9973 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404652 and bi.ref ='324.2066.00.1' and bi.lordem =19
20240715@074546.1204 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : use flama_phc
20240715@074546.1208 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@074546.1222 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : use flama_phc
20240715@074546.1225 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 1 valor from td where td.ndoc = 39
20240715@074546.1236 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : use flama_phc
20240715@074546.1238 3jujj5qlhjp0e8n5hjrs5m8ta5 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')
20240715@074546.1257 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@074546.1273 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : use flama_phc
20240715@074546.1275 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@074546.1286 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : use flama_phc
20240715@074546.1289 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select szadrsstamp valor from szadrs where szadrsdesc='sorefoz - electrod. e equipamentos, s.a.'
20240715@074546.1303 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='912';
20240715@074546.1317 3jujj5qlhjp0e8n5hjrs5m8ta5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='912';
20240715@074546.1817 fesphdml7bvk816nhp2jtcc9ij Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@074546.1831 fesphdml7bvk816nhp2jtcc9ij Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@074546.1848 fesphdml7bvk816nhp2jtcc9ij Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='913';
20240715@074546.1887 fesphdml7bvk816nhp2jtcc9ij Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='913';
20240715@074546.1904 fesphdml7bvk816nhp2jtcc9ij Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='913';
20240715@074546.1916 fesphdml7bvk816nhp2jtcc9ij Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='913';
20240715@074546.1930 fesphdml7bvk816nhp2jtcc9ij Query : use flama_phc
20240715@074546.1933 fesphdml7bvk816nhp2jtcc9ij Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@074546.1948 fesphdml7bvk816nhp2jtcc9ij Query : use flama_phc
20240715@074546.1951 fesphdml7bvk816nhp2jtcc9ij Query : select no, estab,szadrsdesc from szadrs where u_coddest=6737
20240715@074546.2023 fesphdml7bvk816nhp2jtcc9ij 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'
20240715@074546.2122 fesphdml7bvk816nhp2jtcc9ij Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404653 and bi.ref ='328.9326.00.1' and bi.lordem =1
20240715@074546.2516 fesphdml7bvk816nhp2jtcc9ij Query : use flama_phc
20240715@074546.2519 fesphdml7bvk816nhp2jtcc9ij Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@074546.2533 fesphdml7bvk816nhp2jtcc9ij Query : use flama_phc
20240715@074546.2535 fesphdml7bvk816nhp2jtcc9ij Query : select top 1 1 valor from td where td.ndoc = 39
20240715@074546.2546 fesphdml7bvk816nhp2jtcc9ij Query : use flama_phc
20240715@074546.2549 fesphdml7bvk816nhp2jtcc9ij 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')
20240715@074546.2569 fesphdml7bvk816nhp2jtcc9ij Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@074546.2584 fesphdml7bvk816nhp2jtcc9ij Query : use flama_phc
20240715@074546.2587 fesphdml7bvk816nhp2jtcc9ij Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@074546.2598 fesphdml7bvk816nhp2jtcc9ij Query : use flama_phc
20240715@074546.2600 fesphdml7bvk816nhp2jtcc9ij Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-plaza large formats rainha'
20240715@074546.2612 fesphdml7bvk816nhp2jtcc9ij Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='913';
20240715@074546.2627 fesphdml7bvk816nhp2jtcc9ij Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='913';
20240715@074546.3097 2rg4j9m9efuivduhnbem87lm6a Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@074546.3110 2rg4j9m9efuivduhnbem87lm6a Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@074546.3128 2rg4j9m9efuivduhnbem87lm6a Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='914';
20240715@074546.3167 2rg4j9m9efuivduhnbem87lm6a Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='914';
20240715@074546.3185 2rg4j9m9efuivduhnbem87lm6a Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='914';
20240715@074546.3197 2rg4j9m9efuivduhnbem87lm6a Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='914';
20240715@074546.3213 2rg4j9m9efuivduhnbem87lm6a Query : use flama_phc
20240715@074546.3216 2rg4j9m9efuivduhnbem87lm6a Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@074546.3231 2rg4j9m9efuivduhnbem87lm6a Query : use flama_phc
20240715@074546.3234 2rg4j9m9efuivduhnbem87lm6a Query : select no, estab,szadrsdesc from szadrs where u_coddest=2064
20240715@074546.3301 2rg4j9m9efuivduhnbem87lm6a Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8261.00.1'
20240715@074546.3403 2rg4j9m9efuivduhnbem87lm6a Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404654 and bi.ref ='327.8261.00.1' and bi.lordem =1
20240715@074546.4192 2rg4j9m9efuivduhnbem87lm6a Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8261.00.1'
20240715@074546.4273 2rg4j9m9efuivduhnbem87lm6a Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404654 and bi.ref ='327.8261.00.1' and bi.lordem =1
20240715@074546.4281 2rg4j9m9efuivduhnbem87lm6a Query : use flama_phc
20240715@074546.4284 2rg4j9m9efuivduhnbem87lm6a Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@074546.4299 2rg4j9m9efuivduhnbem87lm6a Query : use flama_phc
20240715@074546.4302 2rg4j9m9efuivduhnbem87lm6a Query : select top 1 1 valor from td where td.ndoc = 39
20240715@074546.4312 2rg4j9m9efuivduhnbem87lm6a Query : use flama_phc
20240715@074546.4316 2rg4j9m9efuivduhnbem87lm6a 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')
20240715@074546.4334 2rg4j9m9efuivduhnbem87lm6a Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@074546.4349 2rg4j9m9efuivduhnbem87lm6a Query : use flama_phc
20240715@074546.4352 2rg4j9m9efuivduhnbem87lm6a Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@074546.4362 2rg4j9m9efuivduhnbem87lm6a Query : use flama_phc
20240715@074546.4365 2rg4j9m9efuivduhnbem87lm6a Query : select szadrsstamp valor from szadrs where szadrsdesc='macorlux - electrodomÉsticos, s.a.'
20240715@074546.4377 2rg4j9m9efuivduhnbem87lm6a Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='914';
20240715@074546.4391 2rg4j9m9efuivduhnbem87lm6a Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='914';
20240715@074546.4918 057vi6mdti3bdp7fpl2j1oakdn Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@074546.4931 057vi6mdti3bdp7fpl2j1oakdn Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@074546.4949 057vi6mdti3bdp7fpl2j1oakdn Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='915';
20240715@074546.4990 057vi6mdti3bdp7fpl2j1oakdn Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='915';
20240715@074546.5006 057vi6mdti3bdp7fpl2j1oakdn Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='915';
20240715@074546.5018 057vi6mdti3bdp7fpl2j1oakdn Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='915';
20240715@074546.5032 057vi6mdti3bdp7fpl2j1oakdn Query : use flama_phc
20240715@074546.5035 057vi6mdti3bdp7fpl2j1oakdn Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@074546.5050 057vi6mdti3bdp7fpl2j1oakdn Query : use flama_phc
20240715@074546.5054 057vi6mdti3bdp7fpl2j1oakdn Query : select no, estab,szadrsdesc from szadrs where u_coddest=6975
20240715@074546.5122 057vi6mdti3bdp7fpl2j1oakdn 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'
20240715@074546.5221 057vi6mdti3bdp7fpl2j1oakdn Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404655 and bi.ref ='324.1608.00.1' and bi.lordem =1
20240715@074546.5498 057vi6mdti3bdp7fpl2j1oakdn 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'
20240715@074546.6656 057vi6mdti3bdp7fpl2j1oakdn Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404655 and bi.ref ='324.1684.00.1' and bi.lordem =2
20240715@074546.6931 057vi6mdti3bdp7fpl2j1oakdn 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'
20240715@074546.6942 057vi6mdti3bdp7fpl2j1oakdn Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404655 and bi.ref ='324.1684.00.1' and bi.lordem =2
20240715@074546.6949 057vi6mdti3bdp7fpl2j1oakdn 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'
20240715@074546.7046 057vi6mdti3bdp7fpl2j1oakdn Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404655 and bi.ref ='324.2222.00.1' and bi.lordem =3
20240715@074546.7340 057vi6mdti3bdp7fpl2j1oakdn 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'
20240715@074546.7351 057vi6mdti3bdp7fpl2j1oakdn Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404655 and bi.ref ='324.646.00.01' and bi.lordem =4
20240715@074546.7633 057vi6mdti3bdp7fpl2j1oakdn 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'
20240715@074546.7644 057vi6mdti3bdp7fpl2j1oakdn Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404655 and bi.ref ='324.646.00.01' and bi.lordem =4
20240715@074546.7651 057vi6mdti3bdp7fpl2j1oakdn 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'
20240715@074546.7661 057vi6mdti3bdp7fpl2j1oakdn Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404655 and bi.ref ='324.4521.00.1' and bi.lordem =5
20240715@074546.7942 057vi6mdti3bdp7fpl2j1oakdn 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'
20240715@074546.8044 057vi6mdti3bdp7fpl2j1oakdn Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404655 and bi.ref ='324.719.00.01' and bi.lordem =6
20240715@074546.8322 057vi6mdti3bdp7fpl2j1oakdn 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'
20240715@074546.8332 057vi6mdti3bdp7fpl2j1oakdn Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404655 and bi.ref ='324.5342.00.1' and bi.lordem =7
20240715@074546.8604 057vi6mdti3bdp7fpl2j1oakdn Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.948.00.01'
20240715@074546.8704 057vi6mdti3bdp7fpl2j1oakdn Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404655 and bi.ref ='324.948.00.01' and bi.lordem =8
20240715@074546.8996 057vi6mdti3bdp7fpl2j1oakdn 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'
20240715@074546.9600 057vi6mdti3bdp7fpl2j1oakdn Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404655 and bi.ref ='324.1667.00.1' and bi.lordem =9
20240715@074546.9880 057vi6mdti3bdp7fpl2j1oakdn Query : use flama_phc
20240715@074546.9883 057vi6mdti3bdp7fpl2j1oakdn Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@074546.9897 057vi6mdti3bdp7fpl2j1oakdn Query : use flama_phc
20240715@074546.9900 057vi6mdti3bdp7fpl2j1oakdn Query : select top 1 1 valor from td where td.ndoc = 39
20240715@074546.9910 057vi6mdti3bdp7fpl2j1oakdn Query : use flama_phc
20240715@074546.9913 057vi6mdti3bdp7fpl2j1oakdn 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')
20240715@074546.9932 057vi6mdti3bdp7fpl2j1oakdn Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@074546.9948 057vi6mdti3bdp7fpl2j1oakdn Query : use flama_phc
20240715@074546.9951 057vi6mdti3bdp7fpl2j1oakdn Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@074546.9962 057vi6mdti3bdp7fpl2j1oakdn Query : use flama_phc
20240715@074546.9964 057vi6mdti3bdp7fpl2j1oakdn Query : select szadrsstamp valor from szadrs where szadrsdesc='eldisser, s.a. - tarragona'
20240715@074546.9977 057vi6mdti3bdp7fpl2j1oakdn Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='915';
20240715@074546.9991 057vi6mdti3bdp7fpl2j1oakdn Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='915';
20240715@074547.4550 2pgdfi2ot50u4eeef7mkpuu16h Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@074547.4680 2pgdfi2ot50u4eeef7mkpuu16h Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@074547.4860 2pgdfi2ot50u4eeef7mkpuu16h Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='916';
20240715@074547.5260 2pgdfi2ot50u4eeef7mkpuu16h Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='916';
20240715@074547.5420 2pgdfi2ot50u4eeef7mkpuu16h Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='916';
20240715@074547.5540 2pgdfi2ot50u4eeef7mkpuu16h Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='916';
20240715@074547.5670 2pgdfi2ot50u4eeef7mkpuu16h Query : use flama_phc
20240715@074547.5700 2pgdfi2ot50u4eeef7mkpuu16h Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@074547.5850 2pgdfi2ot50u4eeef7mkpuu16h Query : use flama_phc
20240715@074547.5880 2pgdfi2ot50u4eeef7mkpuu16h Query : select no, estab,szadrsdesc from szadrs where u_coddest=6625
20240715@074547.6620 2pgdfi2ot50u4eeef7mkpuu16h 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'
20240715@074547.6720 2pgdfi2ot50u4eeef7mkpuu16h Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404656 and bi.ref ='324.2222.00.1' and bi.lordem =1
20240715@074547.9500 2pgdfi2ot50u4eeef7mkpuu16h 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'
20240715@074547.9610 2pgdfi2ot50u4eeef7mkpuu16h Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404656 and bi.ref ='324.642.00.01' and bi.lordem =2
20240715@074547.1234 2pgdfi2ot50u4eeef7mkpuu16h 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'
20240715@074547.1260 2pgdfi2ot50u4eeef7mkpuu16h Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404656 and bi.ref ='324.642.00.01' and bi.lordem =2
20240715@074547.1267 2pgdfi2ot50u4eeef7mkpuu16h 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'
20240715@074547.1277 2pgdfi2ot50u4eeef7mkpuu16h Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404656 and bi.ref ='324.4521.00.1' and bi.lordem =3
20240715@074547.1563 2pgdfi2ot50u4eeef7mkpuu16h 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'
20240715@074547.1666 2pgdfi2ot50u4eeef7mkpuu16h Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404656 and bi.ref ='324.969.00.01' and bi.lordem =4
20240715@074547.1952 2pgdfi2ot50u4eeef7mkpuu16h Query : use flama_phc
20240715@074547.1955 2pgdfi2ot50u4eeef7mkpuu16h Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@074547.1968 2pgdfi2ot50u4eeef7mkpuu16h Query : use flama_phc
20240715@074547.1971 2pgdfi2ot50u4eeef7mkpuu16h Query : select top 1 1 valor from td where td.ndoc = 39
20240715@074547.1981 2pgdfi2ot50u4eeef7mkpuu16h Query : use flama_phc
20240715@074547.1984 2pgdfi2ot50u4eeef7mkpuu16h 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')
20240715@074547.2002 2pgdfi2ot50u4eeef7mkpuu16h Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@074547.2018 2pgdfi2ot50u4eeef7mkpuu16h Query : use flama_phc
20240715@074547.2021 2pgdfi2ot50u4eeef7mkpuu16h Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@074547.2031 2pgdfi2ot50u4eeef7mkpuu16h Query : use flama_phc
20240715@074547.2034 2pgdfi2ot50u4eeef7mkpuu16h Query : select szadrsstamp valor from szadrs where szadrsdesc='eldisser - mesur'
20240715@074547.2047 2pgdfi2ot50u4eeef7mkpuu16h Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='916';
20240715@074547.2063 2pgdfi2ot50u4eeef7mkpuu16h Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='916';
20240715@074547.3419 tcjuhgo5154eq4sed9urdq4qk1 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@074547.3431 tcjuhgo5154eq4sed9urdq4qk1 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@074547.3449 tcjuhgo5154eq4sed9urdq4qk1 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='917';
20240715@074547.3489 tcjuhgo5154eq4sed9urdq4qk1 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='917';
20240715@074547.3505 tcjuhgo5154eq4sed9urdq4qk1 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='917';
20240715@074547.3517 tcjuhgo5154eq4sed9urdq4qk1 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='917';
20240715@074547.3530 tcjuhgo5154eq4sed9urdq4qk1 Query : use flama_phc
20240715@074547.3533 tcjuhgo5154eq4sed9urdq4qk1 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@074547.3547 tcjuhgo5154eq4sed9urdq4qk1 Query : use flama_phc
20240715@074547.3550 tcjuhgo5154eq4sed9urdq4qk1 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240715@074547.3635 tcjuhgo5154eq4sed9urdq4qk1 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'
20240715@074547.3645 tcjuhgo5154eq4sed9urdq4qk1 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404660 and bi.ref ='324.4980.00.1' and bi.lordem =1
20240715@074547.3917 tcjuhgo5154eq4sed9urdq4qk1 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'
20240715@074547.4017 tcjuhgo5154eq4sed9urdq4qk1 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404660 and bi.ref ='324.966.00.01' and bi.lordem =2
20240715@074547.4862 tcjuhgo5154eq4sed9urdq4qk1 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'
20240715@074547.4877 tcjuhgo5154eq4sed9urdq4qk1 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404660 and bi.ref ='324.966.00.01' and bi.lordem =2
20240715@074547.4885 tcjuhgo5154eq4sed9urdq4qk1 Query : use flama_phc
20240715@074547.4889 tcjuhgo5154eq4sed9urdq4qk1 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@074547.4904 tcjuhgo5154eq4sed9urdq4qk1 Query : use flama_phc
20240715@074547.4907 tcjuhgo5154eq4sed9urdq4qk1 Query : select top 1 1 valor from td where td.ndoc = 39
20240715@074547.4918 tcjuhgo5154eq4sed9urdq4qk1 Query : use flama_phc
20240715@074547.4924 tcjuhgo5154eq4sed9urdq4qk1 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')
20240715@074547.4947 tcjuhgo5154eq4sed9urdq4qk1 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@074547.4963 tcjuhgo5154eq4sed9urdq4qk1 Query : use flama_phc
20240715@074547.4965 tcjuhgo5154eq4sed9urdq4qk1 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@074547.4976 tcjuhgo5154eq4sed9urdq4qk1 Query : use flama_phc
20240715@074547.4979 tcjuhgo5154eq4sed9urdq4qk1 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240715@074547.4992 tcjuhgo5154eq4sed9urdq4qk1 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='917';
20240715@074547.5012 tcjuhgo5154eq4sed9urdq4qk1 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='917';
20240715@074547.5473 tapqj6ilc8cmca4s254fpcod9p Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@074547.5487 tapqj6ilc8cmca4s254fpcod9p Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@074547.5504 tapqj6ilc8cmca4s254fpcod9p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='918';
20240715@074547.5544 tapqj6ilc8cmca4s254fpcod9p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='918';
20240715@074547.5562 tapqj6ilc8cmca4s254fpcod9p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='918';
20240715@074547.5575 tapqj6ilc8cmca4s254fpcod9p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='918';
20240715@074547.5597 tapqj6ilc8cmca4s254fpcod9p Query : use flama_phc
20240715@074547.5599 tapqj6ilc8cmca4s254fpcod9p Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@074547.5616 tapqj6ilc8cmca4s254fpcod9p Query : use flama_phc
20240715@074547.5619 tapqj6ilc8cmca4s254fpcod9p Query : select no, estab,szadrsdesc from szadrs where u_coddest=6737
20240715@074547.5659 tapqj6ilc8cmca4s254fpcod9p 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'
20240715@074547.5761 tapqj6ilc8cmca4s254fpcod9p Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404661 and bi.ref ='327.8152.00.1' and bi.lordem =1
20240715@074547.6034 tapqj6ilc8cmca4s254fpcod9p Query : use flama_phc
20240715@074547.6037 tapqj6ilc8cmca4s254fpcod9p Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@074547.6051 tapqj6ilc8cmca4s254fpcod9p Query : use flama_phc
20240715@074547.6055 tapqj6ilc8cmca4s254fpcod9p Query : select top 1 1 valor from td where td.ndoc = 39
20240715@074547.6066 tapqj6ilc8cmca4s254fpcod9p Query : use flama_phc
20240715@074547.6068 tapqj6ilc8cmca4s254fpcod9p 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')
20240715@074547.6087 tapqj6ilc8cmca4s254fpcod9p Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@074547.6103 tapqj6ilc8cmca4s254fpcod9p Query : use flama_phc
20240715@074547.6106 tapqj6ilc8cmca4s254fpcod9p Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@074547.6117 tapqj6ilc8cmca4s254fpcod9p Query : use flama_phc
20240715@074547.6126 tapqj6ilc8cmca4s254fpcod9p Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-plaza large formats rainha'
20240715@074547.6137 tapqj6ilc8cmca4s254fpcod9p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='918';
20240715@074547.6151 tapqj6ilc8cmca4s254fpcod9p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='918';
20240715@074547.6645 3lh519o73alajfrtqofbqtqm97 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@074547.6659 3lh519o73alajfrtqofbqtqm97 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@074547.6676 3lh519o73alajfrtqofbqtqm97 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='919';
20240715@074547.6719 3lh519o73alajfrtqofbqtqm97 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='919';
20240715@074547.6735 3lh519o73alajfrtqofbqtqm97 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='919';
20240715@074547.6747 3lh519o73alajfrtqofbqtqm97 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='919';
20240715@074547.6761 3lh519o73alajfrtqofbqtqm97 Query : use flama_phc
20240715@074547.6764 3lh519o73alajfrtqofbqtqm97 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@074547.6779 3lh519o73alajfrtqofbqtqm97 Query : use flama_phc
20240715@074547.6781 3lh519o73alajfrtqofbqtqm97 Query : select no, estab,szadrsdesc from szadrs where u_coddest=6737
20240715@074547.6810 3lh519o73alajfrtqofbqtqm97 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8410.00.1'
20240715@074547.6910 3lh519o73alajfrtqofbqtqm97 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404662 and bi.ref ='327.8410.00.1' and bi.lordem =1
20240715@074547.7201 3lh519o73alajfrtqofbqtqm97 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8410.00.1'
20240715@074547.7213 3lh519o73alajfrtqofbqtqm97 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404662 and bi.ref ='327.8410.00.1' and bi.lordem =1
20240715@074547.7221 3lh519o73alajfrtqofbqtqm97 Query : use flama_phc
20240715@074547.7225 3lh519o73alajfrtqofbqtqm97 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@074547.7239 3lh519o73alajfrtqofbqtqm97 Query : use flama_phc
20240715@074547.7242 3lh519o73alajfrtqofbqtqm97 Query : select top 1 1 valor from td where td.ndoc = 39
20240715@074547.7253 3lh519o73alajfrtqofbqtqm97 Query : use flama_phc
20240715@074547.7256 3lh519o73alajfrtqofbqtqm97 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')
20240715@074547.7275 3lh519o73alajfrtqofbqtqm97 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@074547.7291 3lh519o73alajfrtqofbqtqm97 Query : use flama_phc
20240715@074547.7294 3lh519o73alajfrtqofbqtqm97 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@074547.7306 3lh519o73alajfrtqofbqtqm97 Query : use flama_phc
20240715@074547.7308 3lh519o73alajfrtqofbqtqm97 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-plaza large formats rainha'
20240715@074547.7320 3lh519o73alajfrtqofbqtqm97 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='919';
20240715@074547.7335 3lh519o73alajfrtqofbqtqm97 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='919';
20240715@074547.7808 m61k6upbjfhvn0083n78gfmjhe Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@074547.7823 m61k6upbjfhvn0083n78gfmjhe Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@074547.7841 m61k6upbjfhvn0083n78gfmjhe Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='920';
20240715@074547.7882 m61k6upbjfhvn0083n78gfmjhe Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='920';
20240715@074547.7908 m61k6upbjfhvn0083n78gfmjhe Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='920';
20240715@074547.7922 m61k6upbjfhvn0083n78gfmjhe Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='920';
20240715@074547.7937 m61k6upbjfhvn0083n78gfmjhe Query : use flama_phc
20240715@074547.7940 m61k6upbjfhvn0083n78gfmjhe Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@074547.7955 m61k6upbjfhvn0083n78gfmjhe Query : use flama_phc
20240715@074547.7958 m61k6upbjfhvn0083n78gfmjhe Query : select no, estab,szadrsdesc from szadrs where u_coddest=6917
20240715@074547.8024 m61k6upbjfhvn0083n78gfmjhe Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.600.94.01'
20240715@074547.8153 m61k6upbjfhvn0083n78gfmjhe Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404663 and bi.ref ='324.600.94.01' and bi.lordem =1
20240715@074547.8441 m61k6upbjfhvn0083n78gfmjhe Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2000.94.1'
20240715@074547.8544 m61k6upbjfhvn0083n78gfmjhe Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404663 and bi.ref ='324.2000.94.1' and bi.lordem =2
20240715@074547.8830 m61k6upbjfhvn0083n78gfmjhe Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.900.94.01'
20240715@074547.8928 m61k6upbjfhvn0083n78gfmjhe Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404663 and bi.ref ='324.900.94.01' and bi.lordem =3
20240715@074547.9222 m61k6upbjfhvn0083n78gfmjhe Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.700.94.01'
20240715@074547.9323 m61k6upbjfhvn0083n78gfmjhe Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404663 and bi.ref ='324.700.94.01' and bi.lordem =4
20240715@074547.9594 m61k6upbjfhvn0083n78gfmjhe Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2200.94.1'
20240715@074547.9694 m61k6upbjfhvn0083n78gfmjhe Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404663 and bi.ref ='324.2200.94.1' and bi.lordem =5
20240715@074547.9969 m61k6upbjfhvn0083n78gfmjhe Query : use flama_phc
20240715@074547.9972 m61k6upbjfhvn0083n78gfmjhe Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@074547.9988 m61k6upbjfhvn0083n78gfmjhe Query : use flama_phc
20240715@074547.9990 m61k6upbjfhvn0083n78gfmjhe Query : select top 1 1 valor from td where td.ndoc = 39
20240715@074548.1000 m61k6upbjfhvn0083n78gfmjhe Query : use flama_phc
20240715@074548.4000 m61k6upbjfhvn0083n78gfmjhe 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')
20240715@074548.2200 m61k6upbjfhvn0083n78gfmjhe Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@074548.3800 m61k6upbjfhvn0083n78gfmjhe Query : use flama_phc
20240715@074548.4100 m61k6upbjfhvn0083n78gfmjhe Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@074548.5500 m61k6upbjfhvn0083n78gfmjhe Query : use flama_phc
20240715@074548.5700 m61k6upbjfhvn0083n78gfmjhe Query : select szadrsstamp valor from szadrs where szadrsdesc='740 ent vnr bligeiro'
20240715@074548.7000 m61k6upbjfhvn0083n78gfmjhe Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='920';
20240715@074548.8400 m61k6upbjfhvn0083n78gfmjhe Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='920';
20240715@074548.5800 8haemk08nme8lt7jq85qvmplui Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@074548.6030 8haemk08nme8lt7jq85qvmplui Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@074548.6200 8haemk08nme8lt7jq85qvmplui Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='921';
20240715@074548.6600 8haemk08nme8lt7jq85qvmplui Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='921';
20240715@074548.6760 8haemk08nme8lt7jq85qvmplui Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='921';
20240715@074548.6880 8haemk08nme8lt7jq85qvmplui Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='921';
20240715@074548.7020 8haemk08nme8lt7jq85qvmplui Query : use flama_phc
20240715@074548.7050 8haemk08nme8lt7jq85qvmplui Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@074548.7190 8haemk08nme8lt7jq85qvmplui Query : use flama_phc
20240715@074548.7220 8haemk08nme8lt7jq85qvmplui Query : select no, estab,szadrsdesc from szadrs where u_coddest=5187
20240715@074548.7870 8haemk08nme8lt7jq85qvmplui 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'
20240715@074548.7990 8haemk08nme8lt7jq85qvmplui Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404664 and bi.ref ='324.1684.00.1' and bi.lordem =1
20240715@074548.1061 8haemk08nme8lt7jq85qvmplui 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'
20240715@074548.1072 8haemk08nme8lt7jq85qvmplui Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404664 and bi.ref ='324.2222.00.1' and bi.lordem =2
20240715@074548.1341 8haemk08nme8lt7jq85qvmplui 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'
20240715@074548.1351 8haemk08nme8lt7jq85qvmplui Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404664 and bi.ref ='324.646.00.01' and bi.lordem =3
20240715@074548.1619 8haemk08nme8lt7jq85qvmplui 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'
20240715@074548.1630 8haemk08nme8lt7jq85qvmplui Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404664 and bi.ref ='324.642.00.01' and bi.lordem =4
20240715@074548.1913 8haemk08nme8lt7jq85qvmplui 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'
20240715@074548.1923 8haemk08nme8lt7jq85qvmplui Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404664 and bi.ref ='324.4521.00.1' and bi.lordem =5
20240715@074548.2195 8haemk08nme8lt7jq85qvmplui 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'
20240715@074548.2206 8haemk08nme8lt7jq85qvmplui Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404664 and bi.ref ='324.4521.00.1' and bi.lordem =5
20240715@074548.2213 8haemk08nme8lt7jq85qvmplui 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'
20240715@074548.3394 8haemk08nme8lt7jq85qvmplui Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404664 and bi.ref ='324.1528.00.1' and bi.lordem =6
20240715@074548.3663 8haemk08nme8lt7jq85qvmplui 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'
20240715@074548.3760 8haemk08nme8lt7jq85qvmplui Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404664 and bi.ref ='324.1536.00.1' and bi.lordem =7
20240715@074548.4066 8haemk08nme8lt7jq85qvmplui 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'
20240715@074548.4090 8haemk08nme8lt7jq85qvmplui Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404664 and bi.ref ='324.1536.00.1' and bi.lordem =7
20240715@074548.4097 8haemk08nme8lt7jq85qvmplui Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1705.00.1'
20240715@074548.4108 8haemk08nme8lt7jq85qvmplui Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404664 and bi.ref ='324.1705.00.1' and bi.lordem =8
20240715@074548.4390 8haemk08nme8lt7jq85qvmplui Query : use flama_phc
20240715@074548.4393 8haemk08nme8lt7jq85qvmplui Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@074548.4407 8haemk08nme8lt7jq85qvmplui Query : use flama_phc
20240715@074548.4410 8haemk08nme8lt7jq85qvmplui Query : select top 1 1 valor from td where td.ndoc = 39
20240715@074548.4420 8haemk08nme8lt7jq85qvmplui Query : use flama_phc
20240715@074548.4423 8haemk08nme8lt7jq85qvmplui 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')
20240715@074548.4442 8haemk08nme8lt7jq85qvmplui Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@074548.4457 8haemk08nme8lt7jq85qvmplui Query : use flama_phc
20240715@074548.4460 8haemk08nme8lt7jq85qvmplui Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@074548.4471 8haemk08nme8lt7jq85qvmplui Query : use flama_phc
20240715@074548.4474 8haemk08nme8lt7jq85qvmplui Query : select szadrsstamp valor from szadrs where szadrsdesc='eldisser, s.a. - grucoga'
20240715@074548.4486 8haemk08nme8lt7jq85qvmplui Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='921';
20240715@074548.4500 8haemk08nme8lt7jq85qvmplui Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='921';
20240715@074548.5001 qbdu8va2qfn4svntiqfbc6e6o6 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@074548.5015 qbdu8va2qfn4svntiqfbc6e6o6 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@074548.5032 qbdu8va2qfn4svntiqfbc6e6o6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='922';
20240715@074548.5232 qbdu8va2qfn4svntiqfbc6e6o6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='922';
20240715@074548.5249 qbdu8va2qfn4svntiqfbc6e6o6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='922';
20240715@074548.5261 qbdu8va2qfn4svntiqfbc6e6o6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='922';
20240715@074548.5278 qbdu8va2qfn4svntiqfbc6e6o6 Query : use flama_phc
20240715@074548.5281 qbdu8va2qfn4svntiqfbc6e6o6 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@074548.5296 qbdu8va2qfn4svntiqfbc6e6o6 Query : use flama_phc
20240715@074548.5299 qbdu8va2qfn4svntiqfbc6e6o6 Query : select no, estab,szadrsdesc from szadrs where u_coddest=170
20240715@074548.5365 qbdu8va2qfn4svntiqfbc6e6o6 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1416.00.1'
20240715@074548.5464 qbdu8va2qfn4svntiqfbc6e6o6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404665 and bi.ref ='324.1416.00.1' and bi.lordem =1
20240715@074548.5740 qbdu8va2qfn4svntiqfbc6e6o6 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'
20240715@074548.5752 qbdu8va2qfn4svntiqfbc6e6o6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404665 and bi.ref ='324.642.00.01' and bi.lordem =3
20240715@074548.6043 qbdu8va2qfn4svntiqfbc6e6o6 Query : use flama_phc
20240715@074548.6046 qbdu8va2qfn4svntiqfbc6e6o6 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@074548.6060 qbdu8va2qfn4svntiqfbc6e6o6 Query : use flama_phc
20240715@074548.6063 qbdu8va2qfn4svntiqfbc6e6o6 Query : select top 1 1 valor from td where td.ndoc = 39
20240715@074548.6084 qbdu8va2qfn4svntiqfbc6e6o6 Query : use flama_phc
20240715@074548.6087 qbdu8va2qfn4svntiqfbc6e6o6 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')
20240715@074548.6107 qbdu8va2qfn4svntiqfbc6e6o6 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@074548.6123 qbdu8va2qfn4svntiqfbc6e6o6 Query : use flama_phc
20240715@074548.6126 qbdu8va2qfn4svntiqfbc6e6o6 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@074548.6138 qbdu8va2qfn4svntiqfbc6e6o6 Query : use flama_phc
20240715@074548.6141 qbdu8va2qfn4svntiqfbc6e6o6 Query : select szadrsstamp valor from szadrs where szadrsdesc='magalhÃes & vinha, lda.'
20240715@074548.6153 qbdu8va2qfn4svntiqfbc6e6o6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='922';
20240715@074548.6168 qbdu8va2qfn4svntiqfbc6e6o6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='922';
20240715@074548.6650 f3f0lm47pnumiqi7opgn60gbv3 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@074548.6663 f3f0lm47pnumiqi7opgn60gbv3 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@074548.6681 f3f0lm47pnumiqi7opgn60gbv3 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='923';
20240715@074548.6721 f3f0lm47pnumiqi7opgn60gbv3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='923';
20240715@074548.6736 f3f0lm47pnumiqi7opgn60gbv3 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='923';
20240715@074548.6749 f3f0lm47pnumiqi7opgn60gbv3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='923';
20240715@074548.6772 f3f0lm47pnumiqi7opgn60gbv3 Query : use flama_phc
20240715@074548.6775 f3f0lm47pnumiqi7opgn60gbv3 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@074548.6790 f3f0lm47pnumiqi7opgn60gbv3 Query : use flama_phc
20240715@074548.6793 f3f0lm47pnumiqi7opgn60gbv3 Query : select no, estab,szadrsdesc from szadrs where u_coddest=16
20240715@074548.6856 f3f0lm47pnumiqi7opgn60gbv3 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'
20240715@074548.6866 f3f0lm47pnumiqi7opgn60gbv3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404666 and bi.ref ='304.421.00.04' and bi.lordem =1
20240715@074548.7129 f3f0lm47pnumiqi7opgn60gbv3 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'
20240715@074548.7141 f3f0lm47pnumiqi7opgn60gbv3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404666 and bi.ref ='304.421.00.04' and bi.lordem =1
20240715@074548.7149 f3f0lm47pnumiqi7opgn60gbv3 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'
20240715@074548.7158 f3f0lm47pnumiqi7opgn60gbv3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404666 and bi.ref ='324.4723.00.2' and bi.lordem =3
20240715@074548.7423 f3f0lm47pnumiqi7opgn60gbv3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4970.00.1'
20240715@074548.7433 f3f0lm47pnumiqi7opgn60gbv3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404666 and bi.ref ='324.4970.00.1' and bi.lordem =5
20240715@074548.7699 f3f0lm47pnumiqi7opgn60gbv3 Query : use flama_phc
20240715@074548.7702 f3f0lm47pnumiqi7opgn60gbv3 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@074548.7715 f3f0lm47pnumiqi7opgn60gbv3 Query : use flama_phc
20240715@074548.7718 f3f0lm47pnumiqi7opgn60gbv3 Query : select top 1 1 valor from td where td.ndoc = 39
20240715@074548.7729 f3f0lm47pnumiqi7opgn60gbv3 Query : use flama_phc
20240715@074548.7732 f3f0lm47pnumiqi7opgn60gbv3 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')
20240715@074548.7750 f3f0lm47pnumiqi7opgn60gbv3 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@074548.7766 f3f0lm47pnumiqi7opgn60gbv3 Query : use flama_phc
20240715@074548.7769 f3f0lm47pnumiqi7opgn60gbv3 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@074548.7779 f3f0lm47pnumiqi7opgn60gbv3 Query : use flama_phc
20240715@074548.7782 f3f0lm47pnumiqi7opgn60gbv3 Query : select szadrsstamp valor from szadrs where szadrsdesc='discoteca juvenil, lda.'
20240715@074548.7794 f3f0lm47pnumiqi7opgn60gbv3 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='923';
20240715@074548.7808 f3f0lm47pnumiqi7opgn60gbv3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='923';
20240715@074548.8277 d43ssqgigm8oiajfdhn01oqpg1 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@074548.8290 d43ssqgigm8oiajfdhn01oqpg1 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@074548.8310 d43ssqgigm8oiajfdhn01oqpg1 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='924';
20240715@074548.8352 d43ssqgigm8oiajfdhn01oqpg1 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='924';
20240715@074548.8370 d43ssqgigm8oiajfdhn01oqpg1 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='924';
20240715@074548.8383 d43ssqgigm8oiajfdhn01oqpg1 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='924';
20240715@074548.8399 d43ssqgigm8oiajfdhn01oqpg1 Query : use flama_phc
20240715@074548.8401 d43ssqgigm8oiajfdhn01oqpg1 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@074548.8418 d43ssqgigm8oiajfdhn01oqpg1 Query : use flama_phc
20240715@074548.8421 d43ssqgigm8oiajfdhn01oqpg1 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240715@074548.8452 d43ssqgigm8oiajfdhn01oqpg1 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'
20240715@074548.8554 d43ssqgigm8oiajfdhn01oqpg1 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404668 and bi.ref ='324.5347.00.1' and bi.lordem =1
20240715@074548.8827 d43ssqgigm8oiajfdhn01oqpg1 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'
20240715@074548.8838 d43ssqgigm8oiajfdhn01oqpg1 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404668 and bi.ref ='324.5347.00.1' and bi.lordem =1
20240715@074548.8845 d43ssqgigm8oiajfdhn01oqpg1 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'
20240715@074548.8856 d43ssqgigm8oiajfdhn01oqpg1 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404668 and bi.ref ='324.5342.00.1' and bi.lordem =2
20240715@074548.9126 d43ssqgigm8oiajfdhn01oqpg1 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'
20240715@074548.9224 d43ssqgigm8oiajfdhn01oqpg1 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404668 and bi.ref ='324.1690.00.1' and bi.lordem =3
20240715@074548.9504 d43ssqgigm8oiajfdhn01oqpg1 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'
20240715@074548.9604 d43ssqgigm8oiajfdhn01oqpg1 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404668 and bi.ref ='324.5500.00.1' and bi.lordem =4
20240715@074548.9885 d43ssqgigm8oiajfdhn01oqpg1 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'
20240715@074548.9983 d43ssqgigm8oiajfdhn01oqpg1 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404668 and bi.ref ='324.5501.00.1' and bi.lordem =5
20240715@074549.2610 d43ssqgigm8oiajfdhn01oqpg1 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'
20240715@074549.2730 d43ssqgigm8oiajfdhn01oqpg1 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404668 and bi.ref ='324.5501.00.1' and bi.lordem =5
20240715@074549.2800 d43ssqgigm8oiajfdhn01oqpg1 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'
20240715@074549.2910 d43ssqgigm8oiajfdhn01oqpg1 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404668 and bi.ref ='324.5396.00.1' and bi.lordem =6
20240715@074549.5820 d43ssqgigm8oiajfdhn01oqpg1 Query : use flama_phc
20240715@074549.7060 d43ssqgigm8oiajfdhn01oqpg1 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@074549.1690 d43ssqgigm8oiajfdhn01oqpg1 Query : use flama_phc
20240715@074549.1693 d43ssqgigm8oiajfdhn01oqpg1 Query : select top 1 1 valor from td where td.ndoc = 39
20240715@074549.1704 d43ssqgigm8oiajfdhn01oqpg1 Query : use flama_phc
20240715@074549.1707 d43ssqgigm8oiajfdhn01oqpg1 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')
20240715@074549.1726 d43ssqgigm8oiajfdhn01oqpg1 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@074549.1742 d43ssqgigm8oiajfdhn01oqpg1 Query : use flama_phc
20240715@074549.1745 d43ssqgigm8oiajfdhn01oqpg1 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@074549.1766 d43ssqgigm8oiajfdhn01oqpg1 Query : use flama_phc
20240715@074549.1768 d43ssqgigm8oiajfdhn01oqpg1 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240715@074549.1780 d43ssqgigm8oiajfdhn01oqpg1 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='924';
20240715@074549.1794 d43ssqgigm8oiajfdhn01oqpg1 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='924';
20240715@081910.2653 ql2gqhmcbpqtf7nqv2op3olmfi Query : use flama_phc
20240715@081910.2658 ql2gqhmcbpqtf7nqv2op3olmfi Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@081910.2879 ql2gqhmcbpqtf7nqv2op3olmfi Query : use flama_phc
20240715@081910.2910 ql2gqhmcbpqtf7nqv2op3olmfi Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@083610.6390 p1lsa4mp7dfm02ja60mppsf9o7 Query : use flama_phc
20240715@083610.6395 p1lsa4mp7dfm02ja60mppsf9o7 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@083610.6446 p1lsa4mp7dfm02ja60mppsf9o7 Query : use flama_phc
20240715@083610.6450 p1lsa4mp7dfm02ja60mppsf9o7 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@091910.2040 r2u96ikoust4ktiqc0ei0gjalg Query : use flama_phc
20240715@091910.2090 r2u96ikoust4ktiqc0ei0gjalg Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@091910.2270 r2u96ikoust4ktiqc0ei0gjalg Query : use flama_phc
20240715@091910.2310 r2u96ikoust4ktiqc0ei0gjalg Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@093609.9076 nmjkt2o2j372m032jtkqgng7bu Query : use flama_phc
20240715@093609.9082 nmjkt2o2j372m032jtkqgng7bu Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@093609.9230 nmjkt2o2j372m032jtkqgng7bu Query : use flama_phc
20240715@093609.9233 nmjkt2o2j372m032jtkqgng7bu Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@101912.2093 hun64jsm7a6r30osjhm44bn4gh Query : use flama_phc
20240715@101912.2099 hun64jsm7a6r30osjhm44bn4gh Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@101912.2119 hun64jsm7a6r30osjhm44bn4gh Query : use flama_phc
20240715@101912.2122 hun64jsm7a6r30osjhm44bn4gh Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@103612.4036 4kium34f172pos91scsjjc876h Query : use flama_phc
20240715@103612.4044 4kium34f172pos91scsjjc876h Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@103612.4064 4kium34f172pos91scsjjc876h Query : use flama_phc
20240715@103612.4068 4kium34f172pos91scsjjc876h Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@111908.6907 9au4mv07kgo35vdnjct57hlge1 Query : use flama_phc
20240715@111908.6911 9au4mv07kgo35vdnjct57hlge1 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@111908.6929 9au4mv07kgo35vdnjct57hlge1 Query : use flama_phc
20240715@111908.6932 9au4mv07kgo35vdnjct57hlge1 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@112122.8669 d24n84saliemn3u0c76faqj2pt Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@112122.8704 d24n84saliemn3u0c76faqj2pt Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@112122.8820 d24n84saliemn3u0c76faqj2pt Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='925';
20240715@112122.8868 d24n84saliemn3u0c76faqj2pt Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='925';
20240715@112122.8900 d24n84saliemn3u0c76faqj2pt Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='925';
20240715@112122.8913 d24n84saliemn3u0c76faqj2pt Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='925';
20240715@112122.8935 d24n84saliemn3u0c76faqj2pt Query : use flama_phc
20240715@112122.8938 d24n84saliemn3u0c76faqj2pt Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@112122.8988 d24n84saliemn3u0c76faqj2pt Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '304.422.00.07'
20240715@112122.9062 d24n84saliemn3u0c76faqj2pt Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =005 and bo.boano =2024 and bo.obrano = 0000379 and bi.ref ='304.422.00.07' and bi.lordem =30000
20240715@112122.9349 d24n84saliemn3u0c76faqj2pt 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 = 'az24071247995,357000003 ' 
20240715@112122.9611 d24n84saliemn3u0c76faqj2pt Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '304.421.00.04'
20240715@112122.9686 d24n84saliemn3u0c76faqj2pt Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =005 and bo.boano =2024 and bo.obrano = 0000379 and bi.ref ='304.421.00.04' and bi.lordem =40000
20240715@112123.2800 d24n84saliemn3u0c76faqj2pt 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 = 'az24071247997,335000004 ' 
20240715@112123.3020 d24n84saliemn3u0c76faqj2pt Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '304.4320.00.1'
20240715@112123.3790 d24n84saliemn3u0c76faqj2pt Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =005 and bo.boano =2024 and bo.obrano = 0000379 and bi.ref ='304.4320.00.1' and bi.lordem =50000
20240715@112123.6570 d24n84saliemn3u0c76faqj2pt 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 = 'az24071248041,769000005 ' 
20240715@112123.1279 d24n84saliemn3u0c76faqj2pt Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '304.422.00.07'
20240715@112123.2115 d24n84saliemn3u0c76faqj2pt Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =005 and bo.boano =2024 and bo.obrano = 0000379 and bi.ref ='304.422.00.07' and bi.lordem =20000
20240715@112123.2391 d24n84saliemn3u0c76faqj2pt 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 = 'az24071247988,214000002 ' 
20240715@112123.2642 d24n84saliemn3u0c76faqj2pt Query : use flama_phc
20240715@112123.2645 d24n84saliemn3u0c76faqj2pt Query : select top 1 1 valor from ts where ts.ndos = 61
20240715@112123.2773 d24n84saliemn3u0c76faqj2pt Query : use flama_phc
20240715@112123.2777 d24n84saliemn3u0c76faqj2pt 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')
20240715@112123.2841 d24n84saliemn3u0c76faqj2pt 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
20240715@112123.2967 d24n84saliemn3u0c76faqj2pt Query : use flama_phc
20240715@112123.2970 d24n84saliemn3u0c76faqj2pt Query : select top 1 ~inactivo valor from fl where no = '4775' and estab = 75 order by inactivo desc
20240715@112123.3027 d24n84saliemn3u0c76faqj2pt Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='925';
20240715@112123.3042 d24n84saliemn3u0c76faqj2pt Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='925';
20240715@112123.3522 6tt846rf6f4slriatj2n66g99s Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@112123.3535 6tt846rf6f4slriatj2n66g99s Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@112123.3553 6tt846rf6f4slriatj2n66g99s Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='926';
20240715@112123.3592 6tt846rf6f4slriatj2n66g99s Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='926';
20240715@112123.3608 6tt846rf6f4slriatj2n66g99s Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='926';
20240715@112123.3620 6tt846rf6f4slriatj2n66g99s Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='926';
20240715@112123.3634 6tt846rf6f4slriatj2n66g99s Query : use flama_phc
20240715@112123.3637 6tt846rf6f4slriatj2n66g99s Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@112123.3653 6tt846rf6f4slriatj2n66g99s Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.2200.94.1'
20240715@112123.3725 6tt846rf6f4slriatj2n66g99s 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 = 2400293 and bi.ref ='324.2200.94.1' and bi.lordem =10000
20240715@112123.4034 6tt846rf6f4slriatj2n66g99s 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 = 'cps24031534613,970000004 ' 
20240715@112123.4295 6tt846rf6f4slriatj2n66g99s Query : use flama_phc
20240715@112123.4298 6tt846rf6f4slriatj2n66g99s Query : select top 1 1 valor from ts where ts.ndos = 61
20240715@112123.4310 6tt846rf6f4slriatj2n66g99s Query : use flama_phc
20240715@112123.4313 6tt846rf6f4slriatj2n66g99s 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')
20240715@112123.4331 6tt846rf6f4slriatj2n66g99s 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
20240715@112123.4347 6tt846rf6f4slriatj2n66g99s Query : use flama_phc
20240715@112123.4350 6tt846rf6f4slriatj2n66g99s Query : select top 1 ~inactivo valor from fl where no = '202375' and estab = 00 order by inactivo desc
20240715@112123.4414 6tt846rf6f4slriatj2n66g99s Query : use flama_phc
20240715@112123.4417 6tt846rf6f4slriatj2n66g99s Query : select 1 valor from ts where ndos = 61
20240715@112123.4478 6tt846rf6f4slriatj2n66g99s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240715@112123.4790 6tt846rf6f4slriatj2n66g99s Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20240715@112123.4853 6tt846rf6f4slriatj2n66g99s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240715@112123.4865 6tt846rf6f4slriatj2n66g99s Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20240715@112123.4872 6tt846rf6f4slriatj2n66g99s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240715@112123.4885 6tt846rf6f4slriatj2n66g99s Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20240715@112123.4892 6tt846rf6f4slriatj2n66g99s 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
20240715@112123.4993 6tt846rf6f4slriatj2n66g99s Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240715@112123.5057 6tt846rf6f4slriatj2n66g99s Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240715@112123.5074 6tt846rf6f4slriatj2n66g99s Query : use flama_phc
20240715@112123.5077 6tt846rf6f4slriatj2n66g99s Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202375' and estab=00
20240715@112123.5138 6tt846rf6f4slriatj2n66g99s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240715@112123.5152 6tt846rf6f4slriatj2n66g99s Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20240715@112123.5184 6tt846rf6f4slriatj2n66g99s Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6694f738716694f8237b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240715@112123.5242 6tt846rf6f4slriatj2n66g99s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240715@112123.5320 6tt846rf6f4slriatj2n66g99s Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20240715@112123.5328 6tt846rf6f4slriatj2n66g99s Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6694f738716694f8237b','--','bo',1.0945709281961471103 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240715@112123.5685 6tt846rf6f4slriatj2n66g99s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240715@112123.5700 6tt846rf6f4slriatj2n66g99s Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20240715@112123.5709 6tt846rf6f4slriatj2n66g99s 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 ('aut6694f738716694f8237b','guia r. fornecedor','2024-07-15',61,2402060,?,?,?,?,?,?,?,?,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')
20240715@112125.7856 6tt846rf6f4slriatj2n66g99s Query : use flama_phc
20240715@112125.7860 6tt846rf6f4slriatj2n66g99s Query : select st.usalote valor from st where st.ref = '324.2200.94.1'
20240715@112125.7961 6tt846rf6f4slriatj2n66g99s 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.2200.94.1'
20240715@112125.8071 6tt846rf6f4slriatj2n66g99s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240715@112125.8085 6tt846rf6f4slriatj2n66g99s Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20240715@112125.8098 6tt846rf6f4slriatj2n66g99s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240715@112125.8110 6tt846rf6f4slriatj2n66g99s Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20240715@112125.8117 6tt846rf6f4slriatj2n66g99s Query : select sestamp valor from se where ref ='324.2200.94.1' and lote = 'r2400293100a'
20240715@112125.8173 6tt846rf6f4slriatj2n66g99s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240715@112125.8236 6tt846rf6f4slriatj2n66g99s Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20240715@112125.8245 6tt846rf6f4slriatj2n66g99s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240715@112125.8259 6tt846rf6f4slriatj2n66g99s Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20240715@112125.8304 6tt846rf6f4slriatj2n66g99s Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6694f845236694f825c9',?,?,'20240715',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20240715@112125.9448 6tt846rf6f4slriatj2n66g99s Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240715@112125.9487 6tt846rf6f4slriatj2n66g99s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240715@112125.9501 6tt846rf6f4slriatj2n66g99s Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20240715@112125.9510 6tt846rf6f4slriatj2n66g99s Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6694f954336694f825e7','aut6694f738716694f8237b',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 = 'aut6694f738716694f8237b'
20240715@112125.9650 6tt846rf6f4slriatj2n66g99s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240715@112125.9664 6tt846rf6f4slriatj2n66g99s Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20240715@112125.9677 6tt846rf6f4slriatj2n66g99s 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 'aut6694f954336694f825e7',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1521, 1521*.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 ,11.42,11.42*200.48,11.42,11.42*200.48 ,0,0,'un ','' ,bo.marcada,1 ,11.42*1521,11.42*1521*200.48 ,13.975000,13.975000*200.48 ,13.975000,13.975000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,11.42,11.42*200.48,11.42*1521,11.42*1521*200.48,'cps24031534613,970000004 ',12.5,12.5*1521,12.5,12.5*1521,?,?,?,4 from bo bo where bo.bostamp = 'aut6694f738716694f8237b'
20240715@112137.2152 6tt846rf6f4slriatj2n66g99s Query : use flama_phc
20240715@112137.2157 6tt846rf6f4slriatj2n66g99s Query : declare @bostamp varchar(25) = 'aut6694f738716694f8237b' ,@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 
20240715@112145.7887 6tt846rf6f4slriatj2n66g99s Query : use flama_phc
20240715@112145.7890 6tt846rf6f4slriatj2n66g99s Query : select 1 valor from bo where bo.bostamp = 'aut6694f738716694f8237b'
20240715@112145.9166 6tt846rf6f4slriatj2n66g99s 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) = 'aut6694f738716694f8237b' 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 
20240715@112146.1271 6tt846rf6f4slriatj2n66g99s Query : use flama_phc
20240715@112146.1275 6tt846rf6f4slriatj2n66g99s Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@112146.1288 6tt846rf6f4slriatj2n66g99s Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='926';
20240715@112146.1304 6tt846rf6f4slriatj2n66g99s Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='926';
20240715@113608.8986 lgr7tcpocb2m9er8sn3mdqf087 Query : use flama_phc
20240715@113608.8991 lgr7tcpocb2m9er8sn3mdqf087 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@113608.9010 lgr7tcpocb2m9er8sn3mdqf087 Query : use flama_phc
20240715@113608.9013 lgr7tcpocb2m9er8sn3mdqf087 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@113645.1206 krq67hqdd8om21e56vjohhq52g Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@113645.1377 krq67hqdd8om21e56vjohhq52g Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@113645.1458 krq67hqdd8om21e56vjohhq52g Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='927';
20240715@113645.1498 krq67hqdd8om21e56vjohhq52g Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='927';
20240715@113645.1515 krq67hqdd8om21e56vjohhq52g Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='927';
20240715@113645.1527 krq67hqdd8om21e56vjohhq52g Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='927';
20240715@113645.1542 krq67hqdd8om21e56vjohhq52g Query : use flama_phc
20240715@113645.1583 krq67hqdd8om21e56vjohhq52g Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@113645.1615 krq67hqdd8om21e56vjohhq52g Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.2232.00.1'
20240715@113645.1689 krq67hqdd8om21e56vjohhq52g 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 = 2400241 and bi.ref ='324.2232.00.1' and bi.lordem =10000
20240715@113645.2043 krq67hqdd8om21e56vjohhq52g 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 = 'cps24030136733,706000003 ' 
20240715@113645.2422 krq67hqdd8om21e56vjohhq52g Query : use flama_phc
20240715@113645.2425 krq67hqdd8om21e56vjohhq52g Query : select top 1 1 valor from ts where ts.ndos = 61
20240715@113645.2436 krq67hqdd8om21e56vjohhq52g Query : use flama_phc
20240715@113645.2453 krq67hqdd8om21e56vjohhq52g 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')
20240715@113645.2478 krq67hqdd8om21e56vjohhq52g 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
20240715@113645.2495 krq67hqdd8om21e56vjohhq52g Query : use flama_phc
20240715@113645.2498 krq67hqdd8om21e56vjohhq52g Query : select top 1 ~inactivo valor from fl where no = '202525' and estab = 00 order by inactivo desc
20240715@113645.2565 krq67hqdd8om21e56vjohhq52g Query : use flama_phc
20240715@113645.2568 krq67hqdd8om21e56vjohhq52g Query : select 1 valor from ts where ndos = 61
20240715@113645.2580 krq67hqdd8om21e56vjohhq52g Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240715@113645.2594 krq67hqdd8om21e56vjohhq52g Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20240715@113645.2601 krq67hqdd8om21e56vjohhq52g Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240715@113645.2616 krq67hqdd8om21e56vjohhq52g Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20240715@113645.2622 krq67hqdd8om21e56vjohhq52g Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240715@113645.2635 krq67hqdd8om21e56vjohhq52g Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20240715@113645.2642 krq67hqdd8om21e56vjohhq52g 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
20240715@113645.2654 krq67hqdd8om21e56vjohhq52g Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240715@113645.2670 krq67hqdd8om21e56vjohhq52g Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240715@113645.2686 krq67hqdd8om21e56vjohhq52g Query : use flama_phc
20240715@113645.2689 krq67hqdd8om21e56vjohhq52g Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202525' and estab=00
20240715@113645.2914 krq67hqdd8om21e56vjohhq52g Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240715@113645.2929 krq67hqdd8om21e56vjohhq52g Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20240715@113645.2935 krq67hqdd8om21e56vjohhq52g Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6694f388016694fbbd41',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240715@113645.2940 krq67hqdd8om21e56vjohhq52g Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240715@113645.2953 krq67hqdd8om21e56vjohhq52g Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20240715@113645.2959 krq67hqdd8om21e56vjohhq52g Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6694f388016694fbbd41','--','bo',1.0940695296523517382 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240715@113645.2964 krq67hqdd8om21e56vjohhq52g Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240715@113645.2976 krq67hqdd8om21e56vjohhq52g Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20240715@113645.2983 krq67hqdd8om21e56vjohhq52g 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 ('aut6694f388016694fbbd41','guia r. fornecedor','2024-07-15',61,2402061,?,?,?,?,?,?,?,?,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')
20240715@113645.3376 krq67hqdd8om21e56vjohhq52g Query : use flama_phc
20240715@113645.3379 krq67hqdd8om21e56vjohhq52g Query : select st.usalote valor from st where st.ref = '324.2232.00.1'
20240715@113645.3395 krq67hqdd8om21e56vjohhq52g 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.2232.00.1'
20240715@113645.3502 krq67hqdd8om21e56vjohhq52g Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240715@113645.3515 krq67hqdd8om21e56vjohhq52g Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20240715@113645.3525 krq67hqdd8om21e56vjohhq52g Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240715@113645.3536 krq67hqdd8om21e56vjohhq52g Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20240715@113645.3542 krq67hqdd8om21e56vjohhq52g Query : select sestamp valor from se where ref ='324.2232.00.1' and lote = 'r2400241100a'
20240715@113645.3550 krq67hqdd8om21e56vjohhq52g Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240715@113645.3561 krq67hqdd8om21e56vjohhq52g Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20240715@113645.3567 krq67hqdd8om21e56vjohhq52g Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240715@113645.3579 krq67hqdd8om21e56vjohhq52g Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20240715@113645.3585 krq67hqdd8om21e56vjohhq52g Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6694f367656694fbbd57',?,?,'20240715',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20240715@113645.3638 krq67hqdd8om21e56vjohhq52g Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240715@113645.3649 krq67hqdd8om21e56vjohhq52g Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240715@113645.3662 krq67hqdd8om21e56vjohhq52g Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20240715@113645.3668 krq67hqdd8om21e56vjohhq52g Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6694f073026694fbbd59','aut6694f388016694fbbd41',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 = 'aut6694f388016694fbbd41'
20240715@113645.3779 krq67hqdd8om21e56vjohhq52g Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240715@113645.3793 krq67hqdd8om21e56vjohhq52g Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20240715@113645.3804 krq67hqdd8om21e56vjohhq52g 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 'aut6694f073026694fbbd59',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1246, 1246*.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 ,9.78,9.78*200.48,9.78,9.78*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,9.78*1246,9.78*1246*200.48 ,11.192000,11.192000*200.48 ,11.192000,11.192000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,9.78,9.78*200.48,9.78*1246,9.78*1246*200.48,'cps24030136733,706000003 ',10.7,10.7*1246,10.7,10.7*1246,?,?,?,4 from bo bo where bo.bostamp = 'aut6694f388016694fbbd41'
20240715@113645.4558 krq67hqdd8om21e56vjohhq52g Query : use flama_phc
20240715@113645.4562 krq67hqdd8om21e56vjohhq52g Query : declare @bostamp varchar(25) = 'aut6694f388016694fbbd41' ,@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 
20240715@113645.5901 krq67hqdd8om21e56vjohhq52g Query : use flama_phc
20240715@113645.5904 krq67hqdd8om21e56vjohhq52g Query : select 1 valor from bo where bo.bostamp = 'aut6694f388016694fbbd41'
20240715@113645.5918 krq67hqdd8om21e56vjohhq52g 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) = 'aut6694f388016694fbbd41' 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 
20240715@113645.7715 krq67hqdd8om21e56vjohhq52g Query : use flama_phc
20240715@113645.7719 krq67hqdd8om21e56vjohhq52g Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@113645.7731 krq67hqdd8om21e56vjohhq52g Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='927';
20240715@113645.7746 krq67hqdd8om21e56vjohhq52g Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='927';
20240715@121908.3575 7cire2luprjitn7dvbc7gjjte5 Query : use flama_phc
20240715@121908.3580 7cire2luprjitn7dvbc7gjjte5 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@121908.3597 7cire2luprjitn7dvbc7gjjte5 Query : use flama_phc
20240715@121908.3600 7cire2luprjitn7dvbc7gjjte5 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@123608.3352 36p0a11uppjnu531g0t4qdjks8 Query : use flama_phc
20240715@123608.3357 36p0a11uppjnu531g0t4qdjks8 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@123608.3374 36p0a11uppjnu531g0t4qdjks8 Query : use flama_phc
20240715@123608.3377 36p0a11uppjnu531g0t4qdjks8 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@131910.5278 93q06qpfjnh514srhp790oklpn Query : use flama_phc
20240715@131910.5284 93q06qpfjnh514srhp790oklpn Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@131910.5301 93q06qpfjnh514srhp790oklpn Query : use flama_phc
20240715@131910.5304 93q06qpfjnh514srhp790oklpn Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@133610.3904 4bnjk4aedhd5t3ou4lvd8rmm1c Query : use flama_phc
20240715@133610.3909 4bnjk4aedhd5t3ou4lvd8rmm1c Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@133610.3927 4bnjk4aedhd5t3ou4lvd8rmm1c Query : use flama_phc
20240715@133610.3930 4bnjk4aedhd5t3ou4lvd8rmm1c Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@141909.8479 bo91hvckcb1ossargtl5gjbqdd Query : use flama_phc
20240715@141909.8484 bo91hvckcb1ossargtl5gjbqdd Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@141909.8501 bo91hvckcb1ossargtl5gjbqdd Query : use flama_phc
20240715@141909.8503 bo91hvckcb1ossargtl5gjbqdd Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@143610.1910 4er0ru02eqknod8khih90scbmd Query : use flama_phc
20240715@143610.1915 4er0ru02eqknod8khih90scbmd Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@143610.1935 4er0ru02eqknod8khih90scbmd Query : use flama_phc
20240715@143610.1938 4er0ru02eqknod8khih90scbmd Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@151910.8878 nu1c2f6qnipc6aqc3oplgq429k Query : use flama_phc
20240715@151910.8883 nu1c2f6qnipc6aqc3oplgq429k Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@151910.8957 nu1c2f6qnipc6aqc3oplgq429k Query : use flama_phc
20240715@151910.8961 nu1c2f6qnipc6aqc3oplgq429k Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@153611.2398 543put99qf2ultj5o7q87vb7e1 Query : use flama_phc
20240715@153611.2404 543put99qf2ultj5o7q87vb7e1 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@153611.2462 543put99qf2ultj5o7q87vb7e1 Query : use flama_phc
20240715@153611.2465 543put99qf2ultj5o7q87vb7e1 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@154325.9940 2ld34a2qft566huc8699fbu5od Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@154325.1055 2ld34a2qft566huc8699fbu5od Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@154325.1194 2ld34a2qft566huc8699fbu5od Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='928';
20240715@154325.1240 2ld34a2qft566huc8699fbu5od Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='928';
20240715@154325.1256 2ld34a2qft566huc8699fbu5od Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='928';
20240715@154325.1269 2ld34a2qft566huc8699fbu5od Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='928';
20240715@154325.1286 2ld34a2qft566huc8699fbu5od Query : use flama_phc
20240715@154325.1289 2ld34a2qft566huc8699fbu5od Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@154325.1335 2ld34a2qft566huc8699fbu5od Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '304.421.00.04'
20240715@154325.1403 2ld34a2qft566huc8699fbu5od Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =005 and bo.boano =2024 and bo.obrano = 0000380 and bi.ref ='304.421.00.04' and bi.lordem =10000
20240715@154325.1751 2ld34a2qft566huc8699fbu5od 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 = 'rp24071538586,003000001 ' 
20240715@154325.2007 2ld34a2qft566huc8699fbu5od Query : use flama_phc
20240715@154325.2010 2ld34a2qft566huc8699fbu5od Query : select top 1 1 valor from ts where ts.ndos = 61
20240715@154325.2075 2ld34a2qft566huc8699fbu5od Query : use flama_phc
20240715@154325.2078 2ld34a2qft566huc8699fbu5od 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')
20240715@154325.2137 2ld34a2qft566huc8699fbu5od 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
20240715@154325.2251 2ld34a2qft566huc8699fbu5od Query : use flama_phc
20240715@154325.2254 2ld34a2qft566huc8699fbu5od Query : select top 1 ~inactivo valor from fl where no = '2' and estab = 2 order by inactivo desc
20240715@154325.2326 2ld34a2qft566huc8699fbu5od Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='928';
20240715@154325.2340 2ld34a2qft566huc8699fbu5od Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='928';
20240715@161910.7040 h8khp8dlbq80r2ae8u7uifmfe7 Query : use flama_phc
20240715@161910.7120 h8khp8dlbq80r2ae8u7uifmfe7 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@161910.7380 h8khp8dlbq80r2ae8u7uifmfe7 Query : use flama_phc
20240715@161910.7420 h8khp8dlbq80r2ae8u7uifmfe7 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@163610.5151 74slo1bn8cg6p96905nhl2e4g7 Query : use flama_phc
20240715@163610.5157 74slo1bn8cg6p96905nhl2e4g7 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@163610.5178 74slo1bn8cg6p96905nhl2e4g7 Query : use flama_phc
20240715@163610.5182 74slo1bn8cg6p96905nhl2e4g7 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@171913.2378 l85jq08fdt1lelbhi4bi1q7d11 Query : use flama_phc
20240715@171913.2383 l85jq08fdt1lelbhi4bi1q7d11 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@171913.2400 l85jq08fdt1lelbhi4bi1q7d11 Query : use flama_phc
20240715@171913.2403 l85jq08fdt1lelbhi4bi1q7d11 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@173613.5251 9l2l1aceph9ih0vuajvdpj6gtq Query : use flama_phc
20240715@173613.5324 9l2l1aceph9ih0vuajvdpj6gtq Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@173613.5780 9l2l1aceph9ih0vuajvdpj6gtq Query : use flama_phc
20240715@173613.5858 9l2l1aceph9ih0vuajvdpj6gtq Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@181911.2590 4863hsn9i2anjl23iqf9b4gtas Query : use flama_phc
20240715@181911.2650 4863hsn9i2anjl23iqf9b4gtas Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@181911.2820 4863hsn9i2anjl23iqf9b4gtas Query : use flama_phc
20240715@181911.2850 4863hsn9i2anjl23iqf9b4gtas Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@183611.2815 eve19jnj1h9ok037el199jpqef Query : use flama_phc
20240715@183611.2820 eve19jnj1h9ok037el199jpqef Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@183611.2837 eve19jnj1h9ok037el199jpqef Query : use flama_phc
20240715@183611.2840 eve19jnj1h9ok037el199jpqef Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@185927.7583 rh4eh71l4khgo60lv3bv2hqdfr Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185927.7603 rh4eh71l4khgo60lv3bv2hqdfr Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185927.7660 rh4eh71l4khgo60lv3bv2hqdfr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='929';
20240715@185927.7707 rh4eh71l4khgo60lv3bv2hqdfr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='929';
20240715@185927.7723 rh4eh71l4khgo60lv3bv2hqdfr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='929';
20240715@185927.7735 rh4eh71l4khgo60lv3bv2hqdfr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='929';
20240715@185927.7749 rh4eh71l4khgo60lv3bv2hqdfr Query : use flama_phc
20240715@185927.7752 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185927.7772 rh4eh71l4khgo60lv3bv2hqdfr Query : use flama_phc
20240715@185927.7775 rh4eh71l4khgo60lv3bv2hqdfr Query : select no, estab,szadrsdesc from szadrs where u_coddest=4799
20240715@185927.7842 rh4eh71l4khgo60lv3bv2hqdfr 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'
20240715@185927.7937 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='324.1831.00.2' and bi.lordem =1
20240715@185927.8358 rh4eh71l4khgo60lv3bv2hqdfr 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'
20240715@185927.8532 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='324.1831.00.2' and bi.lordem =1
20240715@185927.8541 rh4eh71l4khgo60lv3bv2hqdfr 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'
20240715@185927.8641 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='324.1832.00.2' and bi.lordem =2
20240715@185927.8904 rh4eh71l4khgo60lv3bv2hqdfr 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'
20240715@185928.1020 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='324.5501.00.1' and bi.lordem =3
20240715@185928.3740 rh4eh71l4khgo60lv3bv2hqdfr 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'
20240715@185928.3860 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='324.5501.00.1' and bi.lordem =3
20240715@185928.3930 rh4eh71l4khgo60lv3bv2hqdfr 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'
20240715@185928.4880 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='304.421.00.04' and bi.lordem =4
20240715@185928.7550 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2907.00.1'
20240715@185928.9450 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='324.2907.00.1' and bi.lordem =5
20240715@185928.1395 rh4eh71l4khgo60lv3bv2hqdfr 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'
20240715@185928.1494 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='324.4961.00.1' and bi.lordem =6
20240715@185928.1764 rh4eh71l4khgo60lv3bv2hqdfr 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'
20240715@185928.1856 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='324.4963.00.1' and bi.lordem =7
20240715@185928.2125 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1705.00.1'
20240715@185928.2219 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='324.1705.00.1' and bi.lordem =8
20240715@185928.2482 rh4eh71l4khgo60lv3bv2hqdfr 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'
20240715@185928.2575 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='324.966.00.01' and bi.lordem =9
20240715@185928.2841 rh4eh71l4khgo60lv3bv2hqdfr 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'
20240715@185928.2958 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='324.2222.00.1' and bi.lordem =10
20240715@185928.3236 rh4eh71l4khgo60lv3bv2hqdfr 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'
20240715@185928.3334 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='324.2223.00.1' and bi.lordem =11
20240715@185928.3679 rh4eh71l4khgo60lv3bv2hqdfr 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'
20240715@185928.3770 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='324.2224.00.1' and bi.lordem =12
20240715@185928.4227 rh4eh71l4khgo60lv3bv2hqdfr 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'
20240715@185928.4323 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='324.5342.00.1' and bi.lordem =13
20240715@185928.4590 rh4eh71l4khgo60lv3bv2hqdfr 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'
20240715@185928.4680 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='324.691.00.01' and bi.lordem =14
20240715@185928.4937 rh4eh71l4khgo60lv3bv2hqdfr 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'
20240715@185928.4948 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='324.691.00.01' and bi.lordem =14
20240715@185928.4955 rh4eh71l4khgo60lv3bv2hqdfr 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'
20240715@185928.4964 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='324.691.00.01' and bi.lordem =14
20240715@185928.4973 rh4eh71l4khgo60lv3bv2hqdfr 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'
20240715@185928.5065 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='324.698.00.01' and bi.lordem =15
20240715@185928.5322 rh4eh71l4khgo60lv3bv2hqdfr 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'
20240715@185928.5333 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='324.698.00.01' and bi.lordem =15
20240715@185928.5340 rh4eh71l4khgo60lv3bv2hqdfr 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'
20240715@185928.5433 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='324.4421.00.1' and bi.lordem =16
20240715@185928.6665 rh4eh71l4khgo60lv3bv2hqdfr 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'
20240715@185928.6769 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='324.4521.00.1' and bi.lordem =17
20240715@185928.7020 rh4eh71l4khgo60lv3bv2hqdfr 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'
20240715@185928.7116 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='324.1684.00.1' and bi.lordem =18
20240715@185928.7412 rh4eh71l4khgo60lv3bv2hqdfr 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'
20240715@185928.7505 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='324.727.00.01' and bi.lordem =19
20240715@185928.7769 rh4eh71l4khgo60lv3bv2hqdfr 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'
20240715@185928.7860 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404649 and bi.ref ='324.1803.00.1' and bi.lordem =20
20240715@185928.8119 rh4eh71l4khgo60lv3bv2hqdfr Query : use flama_phc
20240715@185928.8123 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185928.8266 rh4eh71l4khgo60lv3bv2hqdfr Query : use flama_phc
20240715@185928.8269 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185928.8315 rh4eh71l4khgo60lv3bv2hqdfr Query : use flama_phc
20240715@185928.8317 rh4eh71l4khgo60lv3bv2hqdfr 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')
20240715@185928.8353 rh4eh71l4khgo60lv3bv2hqdfr Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185928.8442 rh4eh71l4khgo60lv3bv2hqdfr Query : use flama_phc
20240715@185928.8446 rh4eh71l4khgo60lv3bv2hqdfr Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185928.8479 rh4eh71l4khgo60lv3bv2hqdfr Query : use flama_phc
20240715@185928.8482 rh4eh71l4khgo60lv3bv2hqdfr Query : select szadrsstamp valor from szadrs where szadrsdesc='comercial prieto cerdan, s.l.-entrega'
20240715@185928.8503 rh4eh71l4khgo60lv3bv2hqdfr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='929';
20240715@185928.8518 rh4eh71l4khgo60lv3bv2hqdfr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='929';
20240715@185928.8970 g8o3t2c6isqgqa1j7gshfdds3g Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185928.8983 g8o3t2c6isqgqa1j7gshfdds3g Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185928.9000 g8o3t2c6isqgqa1j7gshfdds3g Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='930';
20240715@185928.9040 g8o3t2c6isqgqa1j7gshfdds3g Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='930';
20240715@185928.9056 g8o3t2c6isqgqa1j7gshfdds3g Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='930';
20240715@185928.9072 g8o3t2c6isqgqa1j7gshfdds3g Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='930';
20240715@185928.9085 g8o3t2c6isqgqa1j7gshfdds3g Query : use flama_phc
20240715@185928.9088 g8o3t2c6isqgqa1j7gshfdds3g Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185928.9104 g8o3t2c6isqgqa1j7gshfdds3g Query : use flama_phc
20240715@185928.9107 g8o3t2c6isqgqa1j7gshfdds3g Query : select no, estab,szadrsdesc from szadrs where u_coddest=227
20240715@185928.9168 g8o3t2c6isqgqa1j7gshfdds3g 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'
20240715@185928.9262 g8o3t2c6isqgqa1j7gshfdds3g Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404672 and bi.ref ='328.9326.00.1' and bi.lordem =1
20240715@185928.9512 g8o3t2c6isqgqa1j7gshfdds3g 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'
20240715@185928.9600 g8o3t2c6isqgqa1j7gshfdds3g Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404672 and bi.ref ='328.9335.00.1' and bi.lordem =2
20240715@185928.9919 g8o3t2c6isqgqa1j7gshfdds3g 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'
20240715@185928.9930 g8o3t2c6isqgqa1j7gshfdds3g Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404672 and bi.ref ='328.9335.00.1' and bi.lordem =2
20240715@185928.9937 g8o3t2c6isqgqa1j7gshfdds3g 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'
20240715@185928.9947 g8o3t2c6isqgqa1j7gshfdds3g Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404672 and bi.ref ='328.9335.00.1' and bi.lordem =2
20240715@185928.9955 g8o3t2c6isqgqa1j7gshfdds3g Query : use flama_phc
20240715@185928.9958 g8o3t2c6isqgqa1j7gshfdds3g Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185928.9972 g8o3t2c6isqgqa1j7gshfdds3g Query : use flama_phc
20240715@185928.9975 g8o3t2c6isqgqa1j7gshfdds3g Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185928.9986 g8o3t2c6isqgqa1j7gshfdds3g Query : use flama_phc
20240715@185928.9989 g8o3t2c6isqgqa1j7gshfdds3g 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')
20240715@185929.8000 g8o3t2c6isqgqa1j7gshfdds3g Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185929.2300 g8o3t2c6isqgqa1j7gshfdds3g Query : use flama_phc
20240715@185929.2600 g8o3t2c6isqgqa1j7gshfdds3g Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185929.3700 g8o3t2c6isqgqa1j7gshfdds3g Query : use flama_phc
20240715@185929.4000 g8o3t2c6isqgqa1j7gshfdds3g Query : select szadrsstamp valor from szadrs where szadrsdesc='radiobela som, lda'
20240715@185929.5200 g8o3t2c6isqgqa1j7gshfdds3g Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='930';
20240715@185929.6600 g8o3t2c6isqgqa1j7gshfdds3g Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='930';
20240715@185929.1318 h56d2oquofav5348k3u21q0q4t Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185929.1331 h56d2oquofav5348k3u21q0q4t Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185929.1496 h56d2oquofav5348k3u21q0q4t Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='931';
20240715@185929.1675 h56d2oquofav5348k3u21q0q4t Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='931';
20240715@185929.1691 h56d2oquofav5348k3u21q0q4t Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='931';
20240715@185929.1705 h56d2oquofav5348k3u21q0q4t Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='931';
20240715@185929.1720 h56d2oquofav5348k3u21q0q4t Query : use flama_phc
20240715@185929.1723 h56d2oquofav5348k3u21q0q4t Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185929.1738 h56d2oquofav5348k3u21q0q4t Query : use flama_phc
20240715@185929.1740 h56d2oquofav5348k3u21q0q4t Query : select no, estab,szadrsdesc from szadrs where u_coddest=416
20240715@185929.1803 h56d2oquofav5348k3u21q0q4t 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'
20240715@185929.1902 h56d2oquofav5348k3u21q0q4t Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404673 and bi.ref ='324.1675.00.2' and bi.lordem =1
20240715@185929.2165 h56d2oquofav5348k3u21q0q4t 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'
20240715@185929.2175 h56d2oquofav5348k3u21q0q4t Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404673 and bi.ref ='324.1675.00.2' and bi.lordem =2
20240715@185929.2436 h56d2oquofav5348k3u21q0q4t Query : use flama_phc
20240715@185929.2439 h56d2oquofav5348k3u21q0q4t Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185929.2453 h56d2oquofav5348k3u21q0q4t Query : use flama_phc
20240715@185929.2456 h56d2oquofav5348k3u21q0q4t Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185929.2467 h56d2oquofav5348k3u21q0q4t Query : use flama_phc
20240715@185929.2470 h56d2oquofav5348k3u21q0q4t 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')
20240715@185929.2488 h56d2oquofav5348k3u21q0q4t Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185929.2503 h56d2oquofav5348k3u21q0q4t Query : use flama_phc
20240715@185929.2506 h56d2oquofav5348k3u21q0q4t Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185929.2516 h56d2oquofav5348k3u21q0q4t Query : use flama_phc
20240715@185929.2518 h56d2oquofav5348k3u21q0q4t Query : select szadrsstamp valor from szadrs where szadrsdesc='bragajav, lda.'
20240715@185929.2530 h56d2oquofav5348k3u21q0q4t Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='931';
20240715@185929.2543 h56d2oquofav5348k3u21q0q4t Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='931';
20240715@185929.2994 pdvpj85d4agbn6k47qkqsbppmt Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185929.3007 pdvpj85d4agbn6k47qkqsbppmt Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185929.3024 pdvpj85d4agbn6k47qkqsbppmt Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='932';
20240715@185929.3064 pdvpj85d4agbn6k47qkqsbppmt Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='932';
20240715@185929.3082 pdvpj85d4agbn6k47qkqsbppmt Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='932';
20240715@185929.3095 pdvpj85d4agbn6k47qkqsbppmt Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='932';
20240715@185929.3108 pdvpj85d4agbn6k47qkqsbppmt Query : use flama_phc
20240715@185929.3111 pdvpj85d4agbn6k47qkqsbppmt Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185929.3125 pdvpj85d4agbn6k47qkqsbppmt Query : use flama_phc
20240715@185929.3128 pdvpj85d4agbn6k47qkqsbppmt Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240715@185929.3190 pdvpj85d4agbn6k47qkqsbppmt 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'
20240715@185929.3284 pdvpj85d4agbn6k47qkqsbppmt Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404674 and bi.ref ='324.1667.00.1' and bi.lordem =1
20240715@185929.3536 pdvpj85d4agbn6k47qkqsbppmt Query : use flama_phc
20240715@185929.3539 pdvpj85d4agbn6k47qkqsbppmt Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185929.3552 pdvpj85d4agbn6k47qkqsbppmt Query : use flama_phc
20240715@185929.3554 pdvpj85d4agbn6k47qkqsbppmt Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185929.3565 pdvpj85d4agbn6k47qkqsbppmt Query : use flama_phc
20240715@185929.3567 pdvpj85d4agbn6k47qkqsbppmt 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')
20240715@185929.3585 pdvpj85d4agbn6k47qkqsbppmt Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185929.3600 pdvpj85d4agbn6k47qkqsbppmt Query : use flama_phc
20240715@185929.3603 pdvpj85d4agbn6k47qkqsbppmt Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185929.3613 pdvpj85d4agbn6k47qkqsbppmt Query : use flama_phc
20240715@185929.3616 pdvpj85d4agbn6k47qkqsbppmt Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240715@185929.3627 pdvpj85d4agbn6k47qkqsbppmt Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='932';
20240715@185929.3641 pdvpj85d4agbn6k47qkqsbppmt Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='932';
20240715@185929.4080 m8lvmsggvlt0gjnpvoeeo31p3b Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185929.4093 m8lvmsggvlt0gjnpvoeeo31p3b Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185929.4111 m8lvmsggvlt0gjnpvoeeo31p3b Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='933';
20240715@185929.4150 m8lvmsggvlt0gjnpvoeeo31p3b Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='933';
20240715@185929.4165 m8lvmsggvlt0gjnpvoeeo31p3b Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='933';
20240715@185929.4176 m8lvmsggvlt0gjnpvoeeo31p3b Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='933';
20240715@185929.4190 m8lvmsggvlt0gjnpvoeeo31p3b Query : use flama_phc
20240715@185929.4193 m8lvmsggvlt0gjnpvoeeo31p3b Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185929.4207 m8lvmsggvlt0gjnpvoeeo31p3b Query : use flama_phc
20240715@185929.4213 m8lvmsggvlt0gjnpvoeeo31p3b Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240715@185929.4241 m8lvmsggvlt0gjnpvoeeo31p3b 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'
20240715@185929.4386 m8lvmsggvlt0gjnpvoeeo31p3b Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404676 and bi.ref ='324.4910.00.1' and bi.lordem =1
20240715@185929.4646 m8lvmsggvlt0gjnpvoeeo31p3b Query : use flama_phc
20240715@185929.4649 m8lvmsggvlt0gjnpvoeeo31p3b Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185929.4662 m8lvmsggvlt0gjnpvoeeo31p3b Query : use flama_phc
20240715@185929.4665 m8lvmsggvlt0gjnpvoeeo31p3b Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185929.4676 m8lvmsggvlt0gjnpvoeeo31p3b Query : use flama_phc
20240715@185929.4678 m8lvmsggvlt0gjnpvoeeo31p3b 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')
20240715@185929.4696 m8lvmsggvlt0gjnpvoeeo31p3b Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185929.4712 m8lvmsggvlt0gjnpvoeeo31p3b Query : use flama_phc
20240715@185929.4715 m8lvmsggvlt0gjnpvoeeo31p3b Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185929.4726 m8lvmsggvlt0gjnpvoeeo31p3b Query : use flama_phc
20240715@185929.4728 m8lvmsggvlt0gjnpvoeeo31p3b Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240715@185929.4739 m8lvmsggvlt0gjnpvoeeo31p3b Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='933';
20240715@185929.4753 m8lvmsggvlt0gjnpvoeeo31p3b Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='933';
20240715@185929.5186 u6u3lopr5g7q14poeaevi3s1o3 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185929.5200 u6u3lopr5g7q14poeaevi3s1o3 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185929.5217 u6u3lopr5g7q14poeaevi3s1o3 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='934';
20240715@185929.5260 u6u3lopr5g7q14poeaevi3s1o3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='934';
20240715@185929.5276 u6u3lopr5g7q14poeaevi3s1o3 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='934';
20240715@185929.5289 u6u3lopr5g7q14poeaevi3s1o3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='934';
20240715@185929.5302 u6u3lopr5g7q14poeaevi3s1o3 Query : use flama_phc
20240715@185929.5305 u6u3lopr5g7q14poeaevi3s1o3 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185929.5319 u6u3lopr5g7q14poeaevi3s1o3 Query : use flama_phc
20240715@185929.5321 u6u3lopr5g7q14poeaevi3s1o3 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240715@185929.5350 u6u3lopr5g7q14poeaevi3s1o3 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'
20240715@185929.6032 u6u3lopr5g7q14poeaevi3s1o3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404677 and bi.ref ='324.946.00.01' and bi.lordem =1
20240715@185929.6289 u6u3lopr5g7q14poeaevi3s1o3 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'
20240715@185929.6300 u6u3lopr5g7q14poeaevi3s1o3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404677 and bi.ref ='324.946.00.01' and bi.lordem =1
20240715@185929.6307 u6u3lopr5g7q14poeaevi3s1o3 Query : use flama_phc
20240715@185929.6310 u6u3lopr5g7q14poeaevi3s1o3 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185929.6323 u6u3lopr5g7q14poeaevi3s1o3 Query : use flama_phc
20240715@185929.6325 u6u3lopr5g7q14poeaevi3s1o3 Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185929.6335 u6u3lopr5g7q14poeaevi3s1o3 Query : use flama_phc
20240715@185929.6338 u6u3lopr5g7q14poeaevi3s1o3 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')
20240715@185929.6356 u6u3lopr5g7q14poeaevi3s1o3 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185929.6371 u6u3lopr5g7q14poeaevi3s1o3 Query : use flama_phc
20240715@185929.6374 u6u3lopr5g7q14poeaevi3s1o3 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185929.6384 u6u3lopr5g7q14poeaevi3s1o3 Query : use flama_phc
20240715@185929.6386 u6u3lopr5g7q14poeaevi3s1o3 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240715@185929.6396 u6u3lopr5g7q14poeaevi3s1o3 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='934';
20240715@185929.6410 u6u3lopr5g7q14poeaevi3s1o3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='934';
20240715@185929.7640 gglfpoqf4gsn28u2m50pbgrpv7 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185929.7653 gglfpoqf4gsn28u2m50pbgrpv7 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185929.7670 gglfpoqf4gsn28u2m50pbgrpv7 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='935';
20240715@185929.7708 gglfpoqf4gsn28u2m50pbgrpv7 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='935';
20240715@185929.7728 gglfpoqf4gsn28u2m50pbgrpv7 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='935';
20240715@185929.7740 gglfpoqf4gsn28u2m50pbgrpv7 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='935';
20240715@185929.7754 gglfpoqf4gsn28u2m50pbgrpv7 Query : use flama_phc
20240715@185929.7757 gglfpoqf4gsn28u2m50pbgrpv7 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185929.7771 gglfpoqf4gsn28u2m50pbgrpv7 Query : use flama_phc
20240715@185929.7774 gglfpoqf4gsn28u2m50pbgrpv7 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240715@185929.7817 gglfpoqf4gsn28u2m50pbgrpv7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2907.00.1'
20240715@185929.7828 gglfpoqf4gsn28u2m50pbgrpv7 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404678 and bi.ref ='324.2907.00.1' and bi.lordem =1
20240715@185929.8091 gglfpoqf4gsn28u2m50pbgrpv7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2907.00.1'
20240715@185929.8101 gglfpoqf4gsn28u2m50pbgrpv7 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404678 and bi.ref ='324.2907.00.1' and bi.lordem =1
20240715@185929.8109 gglfpoqf4gsn28u2m50pbgrpv7 Query : use flama_phc
20240715@185929.8112 gglfpoqf4gsn28u2m50pbgrpv7 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185929.8125 gglfpoqf4gsn28u2m50pbgrpv7 Query : use flama_phc
20240715@185929.8131 gglfpoqf4gsn28u2m50pbgrpv7 Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185929.8141 gglfpoqf4gsn28u2m50pbgrpv7 Query : use flama_phc
20240715@185929.8144 gglfpoqf4gsn28u2m50pbgrpv7 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')
20240715@185929.8162 gglfpoqf4gsn28u2m50pbgrpv7 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185929.8177 gglfpoqf4gsn28u2m50pbgrpv7 Query : use flama_phc
20240715@185929.8179 gglfpoqf4gsn28u2m50pbgrpv7 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185929.8189 gglfpoqf4gsn28u2m50pbgrpv7 Query : use flama_phc
20240715@185929.8192 gglfpoqf4gsn28u2m50pbgrpv7 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240715@185929.8203 gglfpoqf4gsn28u2m50pbgrpv7 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='935';
20240715@185929.8216 gglfpoqf4gsn28u2m50pbgrpv7 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='935';
20240715@185929.8644 t7h49ovb1dg2eqguflornfmfc6 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185929.8656 t7h49ovb1dg2eqguflornfmfc6 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185929.8673 t7h49ovb1dg2eqguflornfmfc6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='936';
20240715@185929.8712 t7h49ovb1dg2eqguflornfmfc6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='936';
20240715@185929.8727 t7h49ovb1dg2eqguflornfmfc6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='936';
20240715@185929.8739 t7h49ovb1dg2eqguflornfmfc6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='936';
20240715@185929.8753 t7h49ovb1dg2eqguflornfmfc6 Query : use flama_phc
20240715@185929.8756 t7h49ovb1dg2eqguflornfmfc6 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185929.8770 t7h49ovb1dg2eqguflornfmfc6 Query : use flama_phc
20240715@185929.8773 t7h49ovb1dg2eqguflornfmfc6 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240715@185929.8802 t7h49ovb1dg2eqguflornfmfc6 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'
20240715@185929.8896 t7h49ovb1dg2eqguflornfmfc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404679 and bi.ref ='324.4840.00.1' and bi.lordem =1
20240715@185929.9157 t7h49ovb1dg2eqguflornfmfc6 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'
20240715@185929.9168 t7h49ovb1dg2eqguflornfmfc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404679 and bi.ref ='324.4840.00.1' and bi.lordem =1
20240715@185929.9174 t7h49ovb1dg2eqguflornfmfc6 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'
20240715@185929.9184 t7h49ovb1dg2eqguflornfmfc6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404679 and bi.ref ='324.4840.00.1' and bi.lordem =1
20240715@185929.9191 t7h49ovb1dg2eqguflornfmfc6 Query : use flama_phc
20240715@185929.9194 t7h49ovb1dg2eqguflornfmfc6 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185929.9208 t7h49ovb1dg2eqguflornfmfc6 Query : use flama_phc
20240715@185929.9213 t7h49ovb1dg2eqguflornfmfc6 Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185929.9224 t7h49ovb1dg2eqguflornfmfc6 Query : use flama_phc
20240715@185929.9226 t7h49ovb1dg2eqguflornfmfc6 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')
20240715@185929.9247 t7h49ovb1dg2eqguflornfmfc6 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185929.9262 t7h49ovb1dg2eqguflornfmfc6 Query : use flama_phc
20240715@185929.9265 t7h49ovb1dg2eqguflornfmfc6 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185929.9278 t7h49ovb1dg2eqguflornfmfc6 Query : use flama_phc
20240715@185929.9281 t7h49ovb1dg2eqguflornfmfc6 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240715@185929.9291 t7h49ovb1dg2eqguflornfmfc6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='936';
20240715@185929.9305 t7h49ovb1dg2eqguflornfmfc6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='936';
20240715@185930.1110 brr73e86aite8vrf6qsgvd41if Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185930.1230 brr73e86aite8vrf6qsgvd41if Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185930.1410 brr73e86aite8vrf6qsgvd41if Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='937';
20240715@185930.1790 brr73e86aite8vrf6qsgvd41if Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='937';
20240715@185930.1930 brr73e86aite8vrf6qsgvd41if Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='937';
20240715@185930.2040 brr73e86aite8vrf6qsgvd41if Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='937';
20240715@185930.2180 brr73e86aite8vrf6qsgvd41if Query : use flama_phc
20240715@185930.2200 brr73e86aite8vrf6qsgvd41if Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185930.2340 brr73e86aite8vrf6qsgvd41if Query : use flama_phc
20240715@185930.2360 brr73e86aite8vrf6qsgvd41if Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240715@185930.2640 brr73e86aite8vrf6qsgvd41if 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'
20240715@185930.3550 brr73e86aite8vrf6qsgvd41if Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404682 and bi.ref ='326.595.00.01' and bi.lordem =1
20240715@185930.6080 brr73e86aite8vrf6qsgvd41if Query : use flama_phc
20240715@185930.6110 brr73e86aite8vrf6qsgvd41if Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185930.6230 brr73e86aite8vrf6qsgvd41if Query : use flama_phc
20240715@185930.6260 brr73e86aite8vrf6qsgvd41if Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185930.6360 brr73e86aite8vrf6qsgvd41if Query : use flama_phc
20240715@185930.6380 brr73e86aite8vrf6qsgvd41if 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')
20240715@185930.6560 brr73e86aite8vrf6qsgvd41if Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185930.6710 brr73e86aite8vrf6qsgvd41if Query : use flama_phc
20240715@185930.6740 brr73e86aite8vrf6qsgvd41if Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185930.6840 brr73e86aite8vrf6qsgvd41if Query : use flama_phc
20240715@185930.6870 brr73e86aite8vrf6qsgvd41if Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240715@185930.6970 brr73e86aite8vrf6qsgvd41if Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='937';
20240715@185930.7110 brr73e86aite8vrf6qsgvd41if Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='937';
20240715@185930.1168 k1qerj2u1448sohcqn4i86lhpd Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185930.1180 k1qerj2u1448sohcqn4i86lhpd Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185930.1197 k1qerj2u1448sohcqn4i86lhpd Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='938';
20240715@185930.1236 k1qerj2u1448sohcqn4i86lhpd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='938';
20240715@185930.1251 k1qerj2u1448sohcqn4i86lhpd Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='938';
20240715@185930.1266 k1qerj2u1448sohcqn4i86lhpd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='938';
20240715@185930.1279 k1qerj2u1448sohcqn4i86lhpd Query : use flama_phc
20240715@185930.1282 k1qerj2u1448sohcqn4i86lhpd Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185930.1296 k1qerj2u1448sohcqn4i86lhpd Query : use flama_phc
20240715@185930.1299 k1qerj2u1448sohcqn4i86lhpd Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240715@185930.1327 k1qerj2u1448sohcqn4i86lhpd 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'
20240715@185930.1337 k1qerj2u1448sohcqn4i86lhpd Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404685 and bi.ref ='324.1832.00.2' and bi.lordem =1
20240715@185930.1588 k1qerj2u1448sohcqn4i86lhpd 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'
20240715@185930.1599 k1qerj2u1448sohcqn4i86lhpd Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404685 and bi.ref ='324.1832.00.2' and bi.lordem =1
20240715@185930.1607 k1qerj2u1448sohcqn4i86lhpd 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'
20240715@185930.1617 k1qerj2u1448sohcqn4i86lhpd Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404685 and bi.ref ='324.1832.00.2' and bi.lordem =1
20240715@185930.1623 k1qerj2u1448sohcqn4i86lhpd 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'
20240715@185930.1632 k1qerj2u1448sohcqn4i86lhpd Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404685 and bi.ref ='324.1832.00.2' and bi.lordem =1
20240715@185930.1639 k1qerj2u1448sohcqn4i86lhpd Query : use flama_phc
20240715@185930.1642 k1qerj2u1448sohcqn4i86lhpd Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185930.1655 k1qerj2u1448sohcqn4i86lhpd Query : use flama_phc
20240715@185930.1658 k1qerj2u1448sohcqn4i86lhpd Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185930.1669 k1qerj2u1448sohcqn4i86lhpd Query : use flama_phc
20240715@185930.1672 k1qerj2u1448sohcqn4i86lhpd 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')
20240715@185930.1689 k1qerj2u1448sohcqn4i86lhpd Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185930.1704 k1qerj2u1448sohcqn4i86lhpd Query : use flama_phc
20240715@185930.1707 k1qerj2u1448sohcqn4i86lhpd Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185930.1719 k1qerj2u1448sohcqn4i86lhpd Query : use flama_phc
20240715@185930.1722 k1qerj2u1448sohcqn4i86lhpd Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240715@185930.1732 k1qerj2u1448sohcqn4i86lhpd Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='938';
20240715@185930.1746 k1qerj2u1448sohcqn4i86lhpd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='938';
20240715@185930.2880 d1p5e91t7flkeghc7pqunrhtln Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185930.2892 d1p5e91t7flkeghc7pqunrhtln Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185930.2910 d1p5e91t7flkeghc7pqunrhtln Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='939';
20240715@185930.2948 d1p5e91t7flkeghc7pqunrhtln Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='939';
20240715@185930.2965 d1p5e91t7flkeghc7pqunrhtln Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='939';
20240715@185930.2976 d1p5e91t7flkeghc7pqunrhtln Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='939';
20240715@185930.2989 d1p5e91t7flkeghc7pqunrhtln Query : use flama_phc
20240715@185930.2992 d1p5e91t7flkeghc7pqunrhtln Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185930.3005 d1p5e91t7flkeghc7pqunrhtln Query : use flama_phc
20240715@185930.3008 d1p5e91t7flkeghc7pqunrhtln Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240715@185930.3036 d1p5e91t7flkeghc7pqunrhtln 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'
20240715@185930.3130 d1p5e91t7flkeghc7pqunrhtln Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404686 and bi.ref ='324.1879.00.1' and bi.lordem =1
20240715@185930.3382 d1p5e91t7flkeghc7pqunrhtln 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'
20240715@185930.3392 d1p5e91t7flkeghc7pqunrhtln Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404686 and bi.ref ='324.1879.00.1' and bi.lordem =1
20240715@185930.3398 d1p5e91t7flkeghc7pqunrhtln 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'
20240715@185930.3408 d1p5e91t7flkeghc7pqunrhtln Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404686 and bi.ref ='324.1879.00.1' and bi.lordem =1
20240715@185930.3415 d1p5e91t7flkeghc7pqunrhtln 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'
20240715@185930.3425 d1p5e91t7flkeghc7pqunrhtln Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404686 and bi.ref ='324.1879.00.1' and bi.lordem =1
20240715@185930.3431 d1p5e91t7flkeghc7pqunrhtln Query : use flama_phc
20240715@185930.3434 d1p5e91t7flkeghc7pqunrhtln Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185930.3447 d1p5e91t7flkeghc7pqunrhtln Query : use flama_phc
20240715@185930.3450 d1p5e91t7flkeghc7pqunrhtln Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185930.3460 d1p5e91t7flkeghc7pqunrhtln Query : use flama_phc
20240715@185930.3463 d1p5e91t7flkeghc7pqunrhtln 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')
20240715@185930.3481 d1p5e91t7flkeghc7pqunrhtln Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185930.3496 d1p5e91t7flkeghc7pqunrhtln Query : use flama_phc
20240715@185930.3499 d1p5e91t7flkeghc7pqunrhtln Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185930.3509 d1p5e91t7flkeghc7pqunrhtln Query : use flama_phc
20240715@185930.3512 d1p5e91t7flkeghc7pqunrhtln Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240715@185930.3522 d1p5e91t7flkeghc7pqunrhtln Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='939';
20240715@185930.3535 d1p5e91t7flkeghc7pqunrhtln Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='939';
20240715@185930.4033 4dunqpsg19aa9hruvgounbm2f0 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185930.4044 4dunqpsg19aa9hruvgounbm2f0 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185930.4061 4dunqpsg19aa9hruvgounbm2f0 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='940';
20240715@185930.4099 4dunqpsg19aa9hruvgounbm2f0 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='940';
20240715@185930.4114 4dunqpsg19aa9hruvgounbm2f0 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='940';
20240715@185930.4125 4dunqpsg19aa9hruvgounbm2f0 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='940';
20240715@185930.4138 4dunqpsg19aa9hruvgounbm2f0 Query : use flama_phc
20240715@185930.4141 4dunqpsg19aa9hruvgounbm2f0 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185930.4155 4dunqpsg19aa9hruvgounbm2f0 Query : use flama_phc
20240715@185930.4158 4dunqpsg19aa9hruvgounbm2f0 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240715@185930.4187 4dunqpsg19aa9hruvgounbm2f0 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'
20240715@185930.4282 4dunqpsg19aa9hruvgounbm2f0 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404687 and bi.ref ='324.1834.00.1' and bi.lordem =1
20240715@185930.5038 4dunqpsg19aa9hruvgounbm2f0 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'
20240715@185930.5655 4dunqpsg19aa9hruvgounbm2f0 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404687 and bi.ref ='324.1834.00.1' and bi.lordem =1
20240715@185930.5663 4dunqpsg19aa9hruvgounbm2f0 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'
20240715@185930.5672 4dunqpsg19aa9hruvgounbm2f0 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404687 and bi.ref ='324.1834.00.1' and bi.lordem =1
20240715@185930.5679 4dunqpsg19aa9hruvgounbm2f0 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'
20240715@185930.5687 4dunqpsg19aa9hruvgounbm2f0 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404687 and bi.ref ='324.1834.00.1' and bi.lordem =1
20240715@185930.5694 4dunqpsg19aa9hruvgounbm2f0 Query : use flama_phc
20240715@185930.5698 4dunqpsg19aa9hruvgounbm2f0 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185930.5710 4dunqpsg19aa9hruvgounbm2f0 Query : use flama_phc
20240715@185930.5713 4dunqpsg19aa9hruvgounbm2f0 Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185930.5763 4dunqpsg19aa9hruvgounbm2f0 Query : use flama_phc
20240715@185930.5845 4dunqpsg19aa9hruvgounbm2f0 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')
20240715@185930.6344 4dunqpsg19aa9hruvgounbm2f0 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185930.6359 4dunqpsg19aa9hruvgounbm2f0 Query : use flama_phc
20240715@185930.6362 4dunqpsg19aa9hruvgounbm2f0 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185930.6372 4dunqpsg19aa9hruvgounbm2f0 Query : use flama_phc
20240715@185930.6374 4dunqpsg19aa9hruvgounbm2f0 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240715@185930.6384 4dunqpsg19aa9hruvgounbm2f0 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='940';
20240715@185930.6397 4dunqpsg19aa9hruvgounbm2f0 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='940';
20240715@185930.6834 mvfc8v6i3lkhg4quc1ptfl5fgb Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185930.6847 mvfc8v6i3lkhg4quc1ptfl5fgb Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185930.6865 mvfc8v6i3lkhg4quc1ptfl5fgb Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='941';
20240715@185930.6903 mvfc8v6i3lkhg4quc1ptfl5fgb Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='941';
20240715@185930.6919 mvfc8v6i3lkhg4quc1ptfl5fgb Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='941';
20240715@185930.6931 mvfc8v6i3lkhg4quc1ptfl5fgb Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='941';
20240715@185930.6945 mvfc8v6i3lkhg4quc1ptfl5fgb Query : use flama_phc
20240715@185930.6948 mvfc8v6i3lkhg4quc1ptfl5fgb Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185930.6962 mvfc8v6i3lkhg4quc1ptfl5fgb Query : use flama_phc
20240715@185930.6965 mvfc8v6i3lkhg4quc1ptfl5fgb Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240715@185930.6993 mvfc8v6i3lkhg4quc1ptfl5fgb 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'
20240715@185930.7089 mvfc8v6i3lkhg4quc1ptfl5fgb Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404688 and bi.ref ='324.4988.00.1' and bi.lordem =1
20240715@185930.7339 mvfc8v6i3lkhg4quc1ptfl5fgb 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'
20240715@185930.7349 mvfc8v6i3lkhg4quc1ptfl5fgb Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404688 and bi.ref ='324.4988.00.1' and bi.lordem =1
20240715@185930.7355 mvfc8v6i3lkhg4quc1ptfl5fgb 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'
20240715@185930.7364 mvfc8v6i3lkhg4quc1ptfl5fgb Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404688 and bi.ref ='324.4988.00.1' and bi.lordem =1
20240715@185930.7370 mvfc8v6i3lkhg4quc1ptfl5fgb Query : use flama_phc
20240715@185930.7373 mvfc8v6i3lkhg4quc1ptfl5fgb Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185930.7385 mvfc8v6i3lkhg4quc1ptfl5fgb Query : use flama_phc
20240715@185930.7388 mvfc8v6i3lkhg4quc1ptfl5fgb Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185930.7398 mvfc8v6i3lkhg4quc1ptfl5fgb Query : use flama_phc
20240715@185930.7401 mvfc8v6i3lkhg4quc1ptfl5fgb 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')
20240715@185930.7419 mvfc8v6i3lkhg4quc1ptfl5fgb Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185930.7433 mvfc8v6i3lkhg4quc1ptfl5fgb Query : use flama_phc
20240715@185930.7451 mvfc8v6i3lkhg4quc1ptfl5fgb Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185930.7462 mvfc8v6i3lkhg4quc1ptfl5fgb Query : use flama_phc
20240715@185930.7465 mvfc8v6i3lkhg4quc1ptfl5fgb Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240715@185930.7475 mvfc8v6i3lkhg4quc1ptfl5fgb Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='941';
20240715@185930.7489 mvfc8v6i3lkhg4quc1ptfl5fgb Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='941';
20240715@185930.7911 6tmg31bgqfhmk7nn2hkqqohrll Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185930.7924 6tmg31bgqfhmk7nn2hkqqohrll Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185930.7943 6tmg31bgqfhmk7nn2hkqqohrll Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='942';
20240715@185930.7986 6tmg31bgqfhmk7nn2hkqqohrll Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='942';
20240715@185930.8002 6tmg31bgqfhmk7nn2hkqqohrll Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='942';
20240715@185930.8015 6tmg31bgqfhmk7nn2hkqqohrll Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='942';
20240715@185930.8029 6tmg31bgqfhmk7nn2hkqqohrll Query : use flama_phc
20240715@185930.8072 6tmg31bgqfhmk7nn2hkqqohrll Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185930.8689 6tmg31bgqfhmk7nn2hkqqohrll Query : use flama_phc
20240715@185930.8693 6tmg31bgqfhmk7nn2hkqqohrll Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240715@185930.8723 6tmg31bgqfhmk7nn2hkqqohrll 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'
20240715@185930.8733 6tmg31bgqfhmk7nn2hkqqohrll Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404689 and bi.ref ='324.1803.00.1' and bi.lordem =1
20240715@185930.9001 6tmg31bgqfhmk7nn2hkqqohrll 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'
20240715@185930.9011 6tmg31bgqfhmk7nn2hkqqohrll Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404689 and bi.ref ='324.1803.00.1' and bi.lordem =1
20240715@185930.9018 6tmg31bgqfhmk7nn2hkqqohrll 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'
20240715@185930.9028 6tmg31bgqfhmk7nn2hkqqohrll Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404689 and bi.ref ='324.1803.00.1' and bi.lordem =1
20240715@185930.9034 6tmg31bgqfhmk7nn2hkqqohrll 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'
20240715@185930.9043 6tmg31bgqfhmk7nn2hkqqohrll Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404689 and bi.ref ='324.1803.00.1' and bi.lordem =1
20240715@185930.9050 6tmg31bgqfhmk7nn2hkqqohrll 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'
20240715@185930.9063 6tmg31bgqfhmk7nn2hkqqohrll Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404689 and bi.ref ='324.1803.00.1' and bi.lordem =1
20240715@185930.9070 6tmg31bgqfhmk7nn2hkqqohrll 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'
20240715@185930.9079 6tmg31bgqfhmk7nn2hkqqohrll Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404689 and bi.ref ='324.1803.00.1' and bi.lordem =1
20240715@185930.9086 6tmg31bgqfhmk7nn2hkqqohrll Query : use flama_phc
20240715@185930.9089 6tmg31bgqfhmk7nn2hkqqohrll Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185930.9102 6tmg31bgqfhmk7nn2hkqqohrll Query : use flama_phc
20240715@185930.9104 6tmg31bgqfhmk7nn2hkqqohrll Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185930.9115 6tmg31bgqfhmk7nn2hkqqohrll Query : use flama_phc
20240715@185930.9118 6tmg31bgqfhmk7nn2hkqqohrll 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')
20240715@185930.9135 6tmg31bgqfhmk7nn2hkqqohrll Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185930.9150 6tmg31bgqfhmk7nn2hkqqohrll Query : use flama_phc
20240715@185930.9152 6tmg31bgqfhmk7nn2hkqqohrll Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185930.9162 6tmg31bgqfhmk7nn2hkqqohrll Query : use flama_phc
20240715@185930.9165 6tmg31bgqfhmk7nn2hkqqohrll Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240715@185930.9176 6tmg31bgqfhmk7nn2hkqqohrll Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='942';
20240715@185930.9189 6tmg31bgqfhmk7nn2hkqqohrll Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='942';
20240715@185930.9604 qh7uho09pchgk2c1iq4b3j92th Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185930.9617 qh7uho09pchgk2c1iq4b3j92th Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185930.9634 qh7uho09pchgk2c1iq4b3j92th Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='943';
20240715@185930.9673 qh7uho09pchgk2c1iq4b3j92th Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='943';
20240715@185930.9689 qh7uho09pchgk2c1iq4b3j92th Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='943';
20240715@185930.9701 qh7uho09pchgk2c1iq4b3j92th Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='943';
20240715@185930.9715 qh7uho09pchgk2c1iq4b3j92th Query : use flama_phc
20240715@185930.9718 qh7uho09pchgk2c1iq4b3j92th Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185930.9734 qh7uho09pchgk2c1iq4b3j92th Query : use flama_phc
20240715@185930.9736 qh7uho09pchgk2c1iq4b3j92th Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240715@185930.9764 qh7uho09pchgk2c1iq4b3j92th 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'
20240715@185930.9774 qh7uho09pchgk2c1iq4b3j92th Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404690 and bi.ref ='324.1831.00.2' and bi.lordem =1
20240715@185931.6430 qh7uho09pchgk2c1iq4b3j92th 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'
20240715@185931.6550 qh7uho09pchgk2c1iq4b3j92th Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404690 and bi.ref ='324.1831.00.2' and bi.lordem =1
20240715@185931.6620 qh7uho09pchgk2c1iq4b3j92th 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'
20240715@185931.6710 qh7uho09pchgk2c1iq4b3j92th Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404690 and bi.ref ='324.1831.00.2' and bi.lordem =1
20240715@185931.6770 qh7uho09pchgk2c1iq4b3j92th 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'
20240715@185931.6860 qh7uho09pchgk2c1iq4b3j92th Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404690 and bi.ref ='324.1831.00.2' and bi.lordem =1
20240715@185931.6920 qh7uho09pchgk2c1iq4b3j92th 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'
20240715@185931.7010 qh7uho09pchgk2c1iq4b3j92th Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404690 and bi.ref ='324.1831.00.2' and bi.lordem =1
20240715@185931.7080 qh7uho09pchgk2c1iq4b3j92th Query : use flama_phc
20240715@185931.7110 qh7uho09pchgk2c1iq4b3j92th Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185931.7230 qh7uho09pchgk2c1iq4b3j92th Query : use flama_phc
20240715@185931.7260 qh7uho09pchgk2c1iq4b3j92th Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185931.7350 qh7uho09pchgk2c1iq4b3j92th Query : use flama_phc
20240715@185931.7380 qh7uho09pchgk2c1iq4b3j92th 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')
20240715@185931.7550 qh7uho09pchgk2c1iq4b3j92th Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185931.7690 qh7uho09pchgk2c1iq4b3j92th Query : use flama_phc
20240715@185931.7720 qh7uho09pchgk2c1iq4b3j92th Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185931.7820 qh7uho09pchgk2c1iq4b3j92th Query : use flama_phc
20240715@185931.7840 qh7uho09pchgk2c1iq4b3j92th Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240715@185931.7940 qh7uho09pchgk2c1iq4b3j92th Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='943';
20240715@185931.8070 qh7uho09pchgk2c1iq4b3j92th Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='943';
20240715@185931.1236 kd9oarbnfittqqr0hm6f8fe8s0 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185931.1249 kd9oarbnfittqqr0hm6f8fe8s0 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185931.1266 kd9oarbnfittqqr0hm6f8fe8s0 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='944';
20240715@185931.1304 kd9oarbnfittqqr0hm6f8fe8s0 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='944';
20240715@185931.1319 kd9oarbnfittqqr0hm6f8fe8s0 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='944';
20240715@185931.1331 kd9oarbnfittqqr0hm6f8fe8s0 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='944';
20240715@185931.1345 kd9oarbnfittqqr0hm6f8fe8s0 Query : use flama_phc
20240715@185931.1347 kd9oarbnfittqqr0hm6f8fe8s0 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185931.1361 kd9oarbnfittqqr0hm6f8fe8s0 Query : use flama_phc
20240715@185931.1364 kd9oarbnfittqqr0hm6f8fe8s0 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240715@185931.1392 kd9oarbnfittqqr0hm6f8fe8s0 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'
20240715@185931.1483 kd9oarbnfittqqr0hm6f8fe8s0 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404691 and bi.ref ='324.988.00.01' and bi.lordem =1
20240715@185931.1730 kd9oarbnfittqqr0hm6f8fe8s0 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'
20240715@185931.1741 kd9oarbnfittqqr0hm6f8fe8s0 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404691 and bi.ref ='324.988.00.01' and bi.lordem =1
20240715@185931.1747 kd9oarbnfittqqr0hm6f8fe8s0 Query : use flama_phc
20240715@185931.1751 kd9oarbnfittqqr0hm6f8fe8s0 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185931.1766 kd9oarbnfittqqr0hm6f8fe8s0 Query : use flama_phc
20240715@185931.1768 kd9oarbnfittqqr0hm6f8fe8s0 Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185931.1779 kd9oarbnfittqqr0hm6f8fe8s0 Query : use flama_phc
20240715@185931.1781 kd9oarbnfittqqr0hm6f8fe8s0 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')
20240715@185931.1799 kd9oarbnfittqqr0hm6f8fe8s0 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185931.1813 kd9oarbnfittqqr0hm6f8fe8s0 Query : use flama_phc
20240715@185931.1816 kd9oarbnfittqqr0hm6f8fe8s0 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185931.1827 kd9oarbnfittqqr0hm6f8fe8s0 Query : use flama_phc
20240715@185931.1829 kd9oarbnfittqqr0hm6f8fe8s0 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240715@185931.1840 kd9oarbnfittqqr0hm6f8fe8s0 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='944';
20240715@185931.1853 kd9oarbnfittqqr0hm6f8fe8s0 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='944';
20240715@185931.2297 rfqm8c3iru01bsgefu96bcha8u Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185931.2311 rfqm8c3iru01bsgefu96bcha8u Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185931.2330 rfqm8c3iru01bsgefu96bcha8u Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='945';
20240715@185931.2369 rfqm8c3iru01bsgefu96bcha8u Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='945';
20240715@185931.2385 rfqm8c3iru01bsgefu96bcha8u Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='945';
20240715@185931.2398 rfqm8c3iru01bsgefu96bcha8u Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='945';
20240715@185931.2411 rfqm8c3iru01bsgefu96bcha8u Query : use flama_phc
20240715@185931.2414 rfqm8c3iru01bsgefu96bcha8u Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185931.2428 rfqm8c3iru01bsgefu96bcha8u Query : use flama_phc
20240715@185931.2431 rfqm8c3iru01bsgefu96bcha8u Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240715@185931.2461 rfqm8c3iru01bsgefu96bcha8u 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'
20240715@185931.2552 rfqm8c3iru01bsgefu96bcha8u Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404693 and bi.ref ='324.4751.00.1' and bi.lordem =1
20240715@185931.2798 rfqm8c3iru01bsgefu96bcha8u 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'
20240715@185931.2809 rfqm8c3iru01bsgefu96bcha8u Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404693 and bi.ref ='324.4751.00.1' and bi.lordem =1
20240715@185931.2819 rfqm8c3iru01bsgefu96bcha8u Query : use flama_phc
20240715@185931.3266 rfqm8c3iru01bsgefu96bcha8u Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185931.3445 rfqm8c3iru01bsgefu96bcha8u Query : use flama_phc
20240715@185931.3448 rfqm8c3iru01bsgefu96bcha8u Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185931.3458 rfqm8c3iru01bsgefu96bcha8u Query : use flama_phc
20240715@185931.3461 rfqm8c3iru01bsgefu96bcha8u 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')
20240715@185931.3478 rfqm8c3iru01bsgefu96bcha8u Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185931.3492 rfqm8c3iru01bsgefu96bcha8u Query : use flama_phc
20240715@185931.3495 rfqm8c3iru01bsgefu96bcha8u Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185931.3505 rfqm8c3iru01bsgefu96bcha8u Query : use flama_phc
20240715@185931.3508 rfqm8c3iru01bsgefu96bcha8u Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240715@185931.3519 rfqm8c3iru01bsgefu96bcha8u Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='945';
20240715@185931.3533 rfqm8c3iru01bsgefu96bcha8u Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='945';
20240715@185931.4173 ovau1hnein883a8djb1587tdjs Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185931.4188 ovau1hnein883a8djb1587tdjs Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185931.4205 ovau1hnein883a8djb1587tdjs Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='946';
20240715@185931.4246 ovau1hnein883a8djb1587tdjs Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='946';
20240715@185931.4262 ovau1hnein883a8djb1587tdjs Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='946';
20240715@185931.4274 ovau1hnein883a8djb1587tdjs Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='946';
20240715@185931.4287 ovau1hnein883a8djb1587tdjs Query : use flama_phc
20240715@185931.4290 ovau1hnein883a8djb1587tdjs Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185931.4304 ovau1hnein883a8djb1587tdjs Query : use flama_phc
20240715@185931.4307 ovau1hnein883a8djb1587tdjs Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240715@185931.4334 ovau1hnein883a8djb1587tdjs 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'
20240715@185931.4424 ovau1hnein883a8djb1587tdjs Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404694 and bi.ref ='324.4980.00.1' and bi.lordem =1
20240715@185931.4681 ovau1hnein883a8djb1587tdjs 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'
20240715@185931.4692 ovau1hnein883a8djb1587tdjs Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404694 and bi.ref ='324.4980.00.1' and bi.lordem =1
20240715@185931.4699 ovau1hnein883a8djb1587tdjs Query : use flama_phc
20240715@185931.4702 ovau1hnein883a8djb1587tdjs Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185931.4714 ovau1hnein883a8djb1587tdjs Query : use flama_phc
20240715@185931.4717 ovau1hnein883a8djb1587tdjs Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185931.4727 ovau1hnein883a8djb1587tdjs Query : use flama_phc
20240715@185931.4729 ovau1hnein883a8djb1587tdjs 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')
20240715@185931.4747 ovau1hnein883a8djb1587tdjs Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185931.4761 ovau1hnein883a8djb1587tdjs Query : use flama_phc
20240715@185931.4764 ovau1hnein883a8djb1587tdjs Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185931.4774 ovau1hnein883a8djb1587tdjs Query : use flama_phc
20240715@185931.4776 ovau1hnein883a8djb1587tdjs Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240715@185931.4786 ovau1hnein883a8djb1587tdjs Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='946';
20240715@185931.4799 ovau1hnein883a8djb1587tdjs Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='946';
20240715@185931.5524 f76q87p1k4komtatgg3rfdquos Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185931.5537 f76q87p1k4komtatgg3rfdquos Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185931.5554 f76q87p1k4komtatgg3rfdquos Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='947';
20240715@185931.5593 f76q87p1k4komtatgg3rfdquos Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='947';
20240715@185931.5609 f76q87p1k4komtatgg3rfdquos Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='947';
20240715@185931.5621 f76q87p1k4komtatgg3rfdquos Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='947';
20240715@185931.5634 f76q87p1k4komtatgg3rfdquos Query : use flama_phc
20240715@185931.5636 f76q87p1k4komtatgg3rfdquos Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185931.5650 f76q87p1k4komtatgg3rfdquos Query : use flama_phc
20240715@185931.5652 f76q87p1k4komtatgg3rfdquos Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240715@185931.5680 f76q87p1k4komtatgg3rfdquos 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'
20240715@185931.5772 f76q87p1k4komtatgg3rfdquos Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404695 and bi.ref ='324.692.00.01' and bi.lordem =1
20240715@185931.6022 f76q87p1k4komtatgg3rfdquos 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'
20240715@185931.6032 f76q87p1k4komtatgg3rfdquos Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404695 and bi.ref ='324.692.00.01' and bi.lordem =1
20240715@185931.6039 f76q87p1k4komtatgg3rfdquos 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'
20240715@185931.6048 f76q87p1k4komtatgg3rfdquos Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404695 and bi.ref ='324.692.00.01' and bi.lordem =1
20240715@185931.6055 f76q87p1k4komtatgg3rfdquos 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'
20240715@185931.6065 f76q87p1k4komtatgg3rfdquos Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404695 and bi.ref ='324.692.00.01' and bi.lordem =1
20240715@185931.6072 f76q87p1k4komtatgg3rfdquos 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'
20240715@185931.6080 f76q87p1k4komtatgg3rfdquos Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404695 and bi.ref ='324.692.00.01' and bi.lordem =1
20240715@185931.6087 f76q87p1k4komtatgg3rfdquos 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'
20240715@185931.6095 f76q87p1k4komtatgg3rfdquos Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404695 and bi.ref ='324.692.00.01' and bi.lordem =1
20240715@185931.6102 f76q87p1k4komtatgg3rfdquos 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'
20240715@185931.6111 f76q87p1k4komtatgg3rfdquos Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404695 and bi.ref ='324.692.00.01' and bi.lordem =1
20240715@185931.6117 f76q87p1k4komtatgg3rfdquos 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'
20240715@185931.6126 f76q87p1k4komtatgg3rfdquos Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404695 and bi.ref ='324.692.00.01' and bi.lordem =1
20240715@185931.6133 f76q87p1k4komtatgg3rfdquos Query : use flama_phc
20240715@185931.6136 f76q87p1k4komtatgg3rfdquos Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185931.6149 f76q87p1k4komtatgg3rfdquos Query : use flama_phc
20240715@185931.6152 f76q87p1k4komtatgg3rfdquos Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185931.6161 f76q87p1k4komtatgg3rfdquos Query : use flama_phc
20240715@185931.6164 f76q87p1k4komtatgg3rfdquos 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')
20240715@185931.6181 f76q87p1k4komtatgg3rfdquos Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185931.6196 f76q87p1k4komtatgg3rfdquos Query : use flama_phc
20240715@185931.6198 f76q87p1k4komtatgg3rfdquos Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185931.6209 f76q87p1k4komtatgg3rfdquos Query : use flama_phc
20240715@185931.6211 f76q87p1k4komtatgg3rfdquos Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240715@185931.6221 f76q87p1k4komtatgg3rfdquos Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='947';
20240715@185931.6235 f76q87p1k4komtatgg3rfdquos Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='947';
20240715@185931.6662 be92fdlmgk95ne88ogfhrpgski Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185931.6675 be92fdlmgk95ne88ogfhrpgski Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185931.6692 be92fdlmgk95ne88ogfhrpgski Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='948';
20240715@185931.6734 be92fdlmgk95ne88ogfhrpgski Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='948';
20240715@185931.6750 be92fdlmgk95ne88ogfhrpgski Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='948';
20240715@185931.6762 be92fdlmgk95ne88ogfhrpgski Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='948';
20240715@185931.6775 be92fdlmgk95ne88ogfhrpgski Query : use flama_phc
20240715@185931.6778 be92fdlmgk95ne88ogfhrpgski Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185931.6806 be92fdlmgk95ne88ogfhrpgski Query : use flama_phc
20240715@185931.6809 be92fdlmgk95ne88ogfhrpgski Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240715@185931.6838 be92fdlmgk95ne88ogfhrpgski 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'
20240715@185931.6929 be92fdlmgk95ne88ogfhrpgski Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404696 and bi.ref ='324.1833.00.2' and bi.lordem =1
20240715@185931.7182 be92fdlmgk95ne88ogfhrpgski 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'
20240715@185931.7193 be92fdlmgk95ne88ogfhrpgski Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404696 and bi.ref ='324.1833.00.2' and bi.lordem =1
20240715@185931.7199 be92fdlmgk95ne88ogfhrpgski 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'
20240715@185931.7209 be92fdlmgk95ne88ogfhrpgski Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404696 and bi.ref ='324.1833.00.2' and bi.lordem =1
20240715@185931.7216 be92fdlmgk95ne88ogfhrpgski 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'
20240715@185931.7225 be92fdlmgk95ne88ogfhrpgski Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404696 and bi.ref ='324.1833.00.2' and bi.lordem =1
20240715@185931.7232 be92fdlmgk95ne88ogfhrpgski Query : use flama_phc
20240715@185931.7234 be92fdlmgk95ne88ogfhrpgski Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185931.7248 be92fdlmgk95ne88ogfhrpgski Query : use flama_phc
20240715@185931.7251 be92fdlmgk95ne88ogfhrpgski Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185931.7260 be92fdlmgk95ne88ogfhrpgski Query : use flama_phc
20240715@185931.7263 be92fdlmgk95ne88ogfhrpgski 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')
20240715@185931.7282 be92fdlmgk95ne88ogfhrpgski Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185931.7297 be92fdlmgk95ne88ogfhrpgski Query : use flama_phc
20240715@185931.7300 be92fdlmgk95ne88ogfhrpgski Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185931.7310 be92fdlmgk95ne88ogfhrpgski Query : use flama_phc
20240715@185931.7313 be92fdlmgk95ne88ogfhrpgski Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240715@185931.7323 be92fdlmgk95ne88ogfhrpgski Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='948';
20240715@185931.7336 be92fdlmgk95ne88ogfhrpgski Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='948';
20240715@185931.8357 5ulgsfk9d1ju7fbre654dbcj03 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185931.8373 5ulgsfk9d1ju7fbre654dbcj03 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185931.8390 5ulgsfk9d1ju7fbre654dbcj03 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='949';
20240715@185931.8431 5ulgsfk9d1ju7fbre654dbcj03 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='949';
20240715@185931.8446 5ulgsfk9d1ju7fbre654dbcj03 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='949';
20240715@185931.8458 5ulgsfk9d1ju7fbre654dbcj03 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='949';
20240715@185931.8471 5ulgsfk9d1ju7fbre654dbcj03 Query : use flama_phc
20240715@185931.8473 5ulgsfk9d1ju7fbre654dbcj03 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185931.8487 5ulgsfk9d1ju7fbre654dbcj03 Query : use flama_phc
20240715@185931.8489 5ulgsfk9d1ju7fbre654dbcj03 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240715@185931.8517 5ulgsfk9d1ju7fbre654dbcj03 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'
20240715@185931.8608 5ulgsfk9d1ju7fbre654dbcj03 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404697 and bi.ref ='324.1837.00.1' and bi.lordem =1
20240715@185931.8857 5ulgsfk9d1ju7fbre654dbcj03 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'
20240715@185931.8867 5ulgsfk9d1ju7fbre654dbcj03 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404697 and bi.ref ='324.1837.00.1' and bi.lordem =1
20240715@185931.8874 5ulgsfk9d1ju7fbre654dbcj03 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'
20240715@185931.8883 5ulgsfk9d1ju7fbre654dbcj03 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404697 and bi.ref ='324.1837.00.1' and bi.lordem =1
20240715@185931.8890 5ulgsfk9d1ju7fbre654dbcj03 Query : use flama_phc
20240715@185931.8893 5ulgsfk9d1ju7fbre654dbcj03 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185931.8906 5ulgsfk9d1ju7fbre654dbcj03 Query : use flama_phc
20240715@185931.8910 5ulgsfk9d1ju7fbre654dbcj03 Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185931.8921 5ulgsfk9d1ju7fbre654dbcj03 Query : use flama_phc
20240715@185931.8923 5ulgsfk9d1ju7fbre654dbcj03 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')
20240715@185931.8941 5ulgsfk9d1ju7fbre654dbcj03 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185931.8956 5ulgsfk9d1ju7fbre654dbcj03 Query : use flama_phc
20240715@185931.8959 5ulgsfk9d1ju7fbre654dbcj03 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185931.8970 5ulgsfk9d1ju7fbre654dbcj03 Query : use flama_phc
20240715@185931.8972 5ulgsfk9d1ju7fbre654dbcj03 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240715@185931.8982 5ulgsfk9d1ju7fbre654dbcj03 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='949';
20240715@185931.8996 5ulgsfk9d1ju7fbre654dbcj03 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='949';
20240715@185932.5860 sugcp2gkleion1k1eoh6k7ilgj Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185932.6080 sugcp2gkleion1k1eoh6k7ilgj Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185932.6250 sugcp2gkleion1k1eoh6k7ilgj Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='950';
20240715@185932.6610 sugcp2gkleion1k1eoh6k7ilgj Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='950';
20240715@185932.6760 sugcp2gkleion1k1eoh6k7ilgj Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='950';
20240715@185932.6880 sugcp2gkleion1k1eoh6k7ilgj Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='950';
20240715@185932.7010 sugcp2gkleion1k1eoh6k7ilgj Query : use flama_phc
20240715@185932.7030 sugcp2gkleion1k1eoh6k7ilgj Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185932.7180 sugcp2gkleion1k1eoh6k7ilgj Query : use flama_phc
20240715@185932.7210 sugcp2gkleion1k1eoh6k7ilgj Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240715@185932.7490 sugcp2gkleion1k1eoh6k7ilgj 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'
20240715@185932.8410 sugcp2gkleion1k1eoh6k7ilgj Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404699 and bi.ref ='324.657.00.01' and bi.lordem =1
20240715@185932.1090 sugcp2gkleion1k1eoh6k7ilgj 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'
20240715@185932.1100 sugcp2gkleion1k1eoh6k7ilgj Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404699 and bi.ref ='324.657.00.01' and bi.lordem =1
20240715@185932.1108 sugcp2gkleion1k1eoh6k7ilgj 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'
20240715@185932.1117 sugcp2gkleion1k1eoh6k7ilgj Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404699 and bi.ref ='324.657.00.01' and bi.lordem =1
20240715@185932.1124 sugcp2gkleion1k1eoh6k7ilgj 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'
20240715@185932.1134 sugcp2gkleion1k1eoh6k7ilgj Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404699 and bi.ref ='324.657.00.01' and bi.lordem =1
20240715@185932.1141 sugcp2gkleion1k1eoh6k7ilgj 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'
20240715@185932.1150 sugcp2gkleion1k1eoh6k7ilgj Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404699 and bi.ref ='324.657.00.01' and bi.lordem =1
20240715@185932.1157 sugcp2gkleion1k1eoh6k7ilgj Query : use flama_phc
20240715@185932.1160 sugcp2gkleion1k1eoh6k7ilgj Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185932.1172 sugcp2gkleion1k1eoh6k7ilgj Query : use flama_phc
20240715@185932.1175 sugcp2gkleion1k1eoh6k7ilgj Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185932.1185 sugcp2gkleion1k1eoh6k7ilgj Query : use flama_phc
20240715@185932.1187 sugcp2gkleion1k1eoh6k7ilgj 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')
20240715@185932.1205 sugcp2gkleion1k1eoh6k7ilgj Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185932.1219 sugcp2gkleion1k1eoh6k7ilgj Query : use flama_phc
20240715@185932.1222 sugcp2gkleion1k1eoh6k7ilgj Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185932.1232 sugcp2gkleion1k1eoh6k7ilgj Query : use flama_phc
20240715@185932.1235 sugcp2gkleion1k1eoh6k7ilgj Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240715@185932.1245 sugcp2gkleion1k1eoh6k7ilgj Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='950';
20240715@185932.1259 sugcp2gkleion1k1eoh6k7ilgj Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='950';
20240715@185932.1783 g8b92kaujrnralg248oovsu430 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185932.1796 g8b92kaujrnralg248oovsu430 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185932.1814 g8b92kaujrnralg248oovsu430 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='951';
20240715@185932.1851 g8b92kaujrnralg248oovsu430 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='951';
20240715@185932.1866 g8b92kaujrnralg248oovsu430 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='951';
20240715@185932.1878 g8b92kaujrnralg248oovsu430 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='951';
20240715@185932.1890 g8b92kaujrnralg248oovsu430 Query : use flama_phc
20240715@185932.1893 g8b92kaujrnralg248oovsu430 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185932.1907 g8b92kaujrnralg248oovsu430 Query : use flama_phc
20240715@185932.1910 g8b92kaujrnralg248oovsu430 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240715@185932.1938 g8b92kaujrnralg248oovsu430 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'
20240715@185932.2031 g8b92kaujrnralg248oovsu430 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404700 and bi.ref ='324.682.00.01' and bi.lordem =1
20240715@185932.2313 g8b92kaujrnralg248oovsu430 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'
20240715@185932.2323 g8b92kaujrnralg248oovsu430 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404700 and bi.ref ='324.682.00.01' and bi.lordem =1
20240715@185932.2330 g8b92kaujrnralg248oovsu430 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'
20240715@185932.2340 g8b92kaujrnralg248oovsu430 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404700 and bi.ref ='324.682.00.01' and bi.lordem =1
20240715@185932.2347 g8b92kaujrnralg248oovsu430 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'
20240715@185932.2357 g8b92kaujrnralg248oovsu430 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404700 and bi.ref ='324.682.00.01' and bi.lordem =1
20240715@185932.2364 g8b92kaujrnralg248oovsu430 Query : use flama_phc
20240715@185932.2367 g8b92kaujrnralg248oovsu430 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185932.2380 g8b92kaujrnralg248oovsu430 Query : use flama_phc
20240715@185932.2383 g8b92kaujrnralg248oovsu430 Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185932.2393 g8b92kaujrnralg248oovsu430 Query : use flama_phc
20240715@185932.2395 g8b92kaujrnralg248oovsu430 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')
20240715@185932.2414 g8b92kaujrnralg248oovsu430 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185932.2428 g8b92kaujrnralg248oovsu430 Query : use flama_phc
20240715@185932.2431 g8b92kaujrnralg248oovsu430 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185932.2441 g8b92kaujrnralg248oovsu430 Query : use flama_phc
20240715@185932.2444 g8b92kaujrnralg248oovsu430 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240715@185932.2454 g8b92kaujrnralg248oovsu430 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='951';
20240715@185932.2468 g8b92kaujrnralg248oovsu430 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='951';
20240715@185932.2877 mdiv5fbmn635la49l84h2st2v5 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185932.2890 mdiv5fbmn635la49l84h2st2v5 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185932.2908 mdiv5fbmn635la49l84h2st2v5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='952';
20240715@185932.2947 mdiv5fbmn635la49l84h2st2v5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='952';
20240715@185932.2964 mdiv5fbmn635la49l84h2st2v5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='952';
20240715@185932.2977 mdiv5fbmn635la49l84h2st2v5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='952';
20240715@185932.2990 mdiv5fbmn635la49l84h2st2v5 Query : use flama_phc
20240715@185932.2993 mdiv5fbmn635la49l84h2st2v5 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185932.3007 mdiv5fbmn635la49l84h2st2v5 Query : use flama_phc
20240715@185932.3010 mdiv5fbmn635la49l84h2st2v5 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240715@185932.3037 mdiv5fbmn635la49l84h2st2v5 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'
20240715@185932.3047 mdiv5fbmn635la49l84h2st2v5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404701 and bi.ref ='324.727.00.01' and bi.lordem =1
20240715@185932.3300 mdiv5fbmn635la49l84h2st2v5 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'
20240715@185932.3313 mdiv5fbmn635la49l84h2st2v5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404701 and bi.ref ='324.727.00.01' and bi.lordem =1
20240715@185932.3320 mdiv5fbmn635la49l84h2st2v5 Query : use flama_phc
20240715@185932.3323 mdiv5fbmn635la49l84h2st2v5 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185932.3335 mdiv5fbmn635la49l84h2st2v5 Query : use flama_phc
20240715@185932.3338 mdiv5fbmn635la49l84h2st2v5 Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185932.3348 mdiv5fbmn635la49l84h2st2v5 Query : use flama_phc
20240715@185932.3351 mdiv5fbmn635la49l84h2st2v5 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')
20240715@185932.3368 mdiv5fbmn635la49l84h2st2v5 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185932.3383 mdiv5fbmn635la49l84h2st2v5 Query : use flama_phc
20240715@185932.3385 mdiv5fbmn635la49l84h2st2v5 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185932.3395 mdiv5fbmn635la49l84h2st2v5 Query : use flama_phc
20240715@185932.3398 mdiv5fbmn635la49l84h2st2v5 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240715@185932.3410 mdiv5fbmn635la49l84h2st2v5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='952';
20240715@185932.3424 mdiv5fbmn635la49l84h2st2v5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='952';
20240715@185932.3915 5i20fllcbe7feh1qve6i0s1qrq Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185932.3928 5i20fllcbe7feh1qve6i0s1qrq Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185932.3946 5i20fllcbe7feh1qve6i0s1qrq Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='953';
20240715@185932.3986 5i20fllcbe7feh1qve6i0s1qrq Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='953';
20240715@185932.4001 5i20fllcbe7feh1qve6i0s1qrq Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='953';
20240715@185932.4014 5i20fllcbe7feh1qve6i0s1qrq Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='953';
20240715@185932.4028 5i20fllcbe7feh1qve6i0s1qrq Query : use flama_phc
20240715@185932.4031 5i20fllcbe7feh1qve6i0s1qrq Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185932.4045 5i20fllcbe7feh1qve6i0s1qrq Query : use flama_phc
20240715@185932.4048 5i20fllcbe7feh1qve6i0s1qrq Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240715@185932.4077 5i20fllcbe7feh1qve6i0s1qrq 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'
20240715@185932.4172 5i20fllcbe7feh1qve6i0s1qrq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404702 and bi.ref ='324.945.00.01' and bi.lordem =1
20240715@185932.4430 5i20fllcbe7feh1qve6i0s1qrq 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'
20240715@185932.4441 5i20fllcbe7feh1qve6i0s1qrq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404702 and bi.ref ='324.945.00.01' and bi.lordem =1
20240715@185932.4448 5i20fllcbe7feh1qve6i0s1qrq Query : use flama_phc
20240715@185932.4451 5i20fllcbe7feh1qve6i0s1qrq Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185932.4464 5i20fllcbe7feh1qve6i0s1qrq Query : use flama_phc
20240715@185932.4467 5i20fllcbe7feh1qve6i0s1qrq Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185932.4478 5i20fllcbe7feh1qve6i0s1qrq Query : use flama_phc
20240715@185932.4480 5i20fllcbe7feh1qve6i0s1qrq 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')
20240715@185932.4500 5i20fllcbe7feh1qve6i0s1qrq Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185932.4517 5i20fllcbe7feh1qve6i0s1qrq Query : use flama_phc
20240715@185932.4519 5i20fllcbe7feh1qve6i0s1qrq Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185932.4530 5i20fllcbe7feh1qve6i0s1qrq Query : use flama_phc
20240715@185932.4533 5i20fllcbe7feh1qve6i0s1qrq Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240715@185932.4545 5i20fllcbe7feh1qve6i0s1qrq Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='953';
20240715@185932.4559 5i20fllcbe7feh1qve6i0s1qrq Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='953';
20240715@185932.6047 le6rd01h536aq01lmp1d1u979n Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185932.6060 le6rd01h536aq01lmp1d1u979n Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185932.6078 le6rd01h536aq01lmp1d1u979n Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='954';
20240715@185932.6118 le6rd01h536aq01lmp1d1u979n Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='954';
20240715@185932.6134 le6rd01h536aq01lmp1d1u979n Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='954';
20240715@185932.6148 le6rd01h536aq01lmp1d1u979n Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='954';
20240715@185932.6162 le6rd01h536aq01lmp1d1u979n Query : use flama_phc
20240715@185932.6164 le6rd01h536aq01lmp1d1u979n Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185932.6179 le6rd01h536aq01lmp1d1u979n Query : use flama_phc
20240715@185932.6181 le6rd01h536aq01lmp1d1u979n Query : select no, estab,szadrsdesc from szadrs where u_coddest=8748
20240715@185932.6243 le6rd01h536aq01lmp1d1u979n 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'
20240715@185932.6254 le6rd01h536aq01lmp1d1u979n Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404708 and bi.ref ='324.1879.00.1' and bi.lordem =1
20240715@185932.6512 le6rd01h536aq01lmp1d1u979n Query : use flama_phc
20240715@185932.6515 le6rd01h536aq01lmp1d1u979n Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185932.6529 le6rd01h536aq01lmp1d1u979n Query : use flama_phc
20240715@185932.6531 le6rd01h536aq01lmp1d1u979n Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185932.6542 le6rd01h536aq01lmp1d1u979n Query : use flama_phc
20240715@185932.6546 le6rd01h536aq01lmp1d1u979n 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')
20240715@185932.6568 le6rd01h536aq01lmp1d1u979n Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185932.6584 le6rd01h536aq01lmp1d1u979n Query : use flama_phc
20240715@185932.6587 le6rd01h536aq01lmp1d1u979n Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185932.6598 le6rd01h536aq01lmp1d1u979n Query : use flama_phc
20240715@185932.6600 le6rd01h536aq01lmp1d1u979n Query : select szadrsstamp valor from szadrs where szadrsdesc='fnac - entrega'
20240715@185932.6613 le6rd01h536aq01lmp1d1u979n Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='954';
20240715@185932.6627 le6rd01h536aq01lmp1d1u979n Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='954';
20240715@185932.7052 lfe8gtho7hclfustb2b3d6rgmc Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185932.7065 lfe8gtho7hclfustb2b3d6rgmc Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185932.7085 lfe8gtho7hclfustb2b3d6rgmc Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='955';
20240715@185932.7125 lfe8gtho7hclfustb2b3d6rgmc Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='955';
20240715@185932.7140 lfe8gtho7hclfustb2b3d6rgmc Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='955';
20240715@185932.7152 lfe8gtho7hclfustb2b3d6rgmc Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='955';
20240715@185932.7165 lfe8gtho7hclfustb2b3d6rgmc Query : use flama_phc
20240715@185932.7168 lfe8gtho7hclfustb2b3d6rgmc Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185932.7183 lfe8gtho7hclfustb2b3d6rgmc Query : use flama_phc
20240715@185932.7186 lfe8gtho7hclfustb2b3d6rgmc Query : select no, estab,szadrsdesc from szadrs where u_coddest=2543
20240715@185932.7247 lfe8gtho7hclfustb2b3d6rgmc 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'
20240715@185932.7340 lfe8gtho7hclfustb2b3d6rgmc Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404715 and bi.ref ='324.1528.00.1' and bi.lordem =1
20240715@185932.7622 lfe8gtho7hclfustb2b3d6rgmc 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'
20240715@185932.7720 lfe8gtho7hclfustb2b3d6rgmc Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404715 and bi.ref ='324.1536.00.1' and bi.lordem =2
20240715@185932.8145 lfe8gtho7hclfustb2b3d6rgmc 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'
20240715@185932.8214 lfe8gtho7hclfustb2b3d6rgmc Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404715 and bi.ref ='324.1684.00.1' and bi.lordem =3
20240715@185932.8483 lfe8gtho7hclfustb2b3d6rgmc 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'
20240715@185932.8583 lfe8gtho7hclfustb2b3d6rgmc Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404715 and bi.ref ='324.1805.00.1' and bi.lordem =4
20240715@185932.9047 lfe8gtho7hclfustb2b3d6rgmc 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'
20240715@185932.9059 lfe8gtho7hclfustb2b3d6rgmc Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404715 and bi.ref ='324.1831.00.2' and bi.lordem =5
20240715@185932.9319 lfe8gtho7hclfustb2b3d6rgmc 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'
20240715@185932.9330 lfe8gtho7hclfustb2b3d6rgmc Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404715 and bi.ref ='324.1832.00.2' and bi.lordem =6
20240715@185932.9588 lfe8gtho7hclfustb2b3d6rgmc 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'
20240715@185932.9681 lfe8gtho7hclfustb2b3d6rgmc Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404715 and bi.ref ='324.1884.00.1' and bi.lordem =7
20240715@185933.3000 lfe8gtho7hclfustb2b3d6rgmc 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'
20240715@185933.1760 lfe8gtho7hclfustb2b3d6rgmc Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404715 and bi.ref ='324.2232.00.1' and bi.lordem =8
20240715@185933.4360 lfe8gtho7hclfustb2b3d6rgmc 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'
20240715@185933.5320 lfe8gtho7hclfustb2b3d6rgmc Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404715 and bi.ref ='324.642.00.01' and bi.lordem =9
20240715@185933.7960 lfe8gtho7hclfustb2b3d6rgmc 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'
20240715@185933.8890 lfe8gtho7hclfustb2b3d6rgmc Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404715 and bi.ref ='324.645.00.01' and bi.lordem =10
20240715@185933.1685 lfe8gtho7hclfustb2b3d6rgmc Query : use flama_phc
20240715@185933.1727 lfe8gtho7hclfustb2b3d6rgmc Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185933.2190 lfe8gtho7hclfustb2b3d6rgmc Query : use flama_phc
20240715@185933.2193 lfe8gtho7hclfustb2b3d6rgmc Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185933.2204 lfe8gtho7hclfustb2b3d6rgmc Query : use flama_phc
20240715@185933.2207 lfe8gtho7hclfustb2b3d6rgmc 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')
20240715@185933.2225 lfe8gtho7hclfustb2b3d6rgmc Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185933.2328 lfe8gtho7hclfustb2b3d6rgmc Query : use flama_phc
20240715@185933.2376 lfe8gtho7hclfustb2b3d6rgmc Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185933.2390 lfe8gtho7hclfustb2b3d6rgmc Query : use flama_phc
20240715@185933.2393 lfe8gtho7hclfustb2b3d6rgmc Query : select szadrsstamp valor from szadrs where szadrsdesc='casa cheliz'
20240715@185933.2405 lfe8gtho7hclfustb2b3d6rgmc Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='955';
20240715@185933.2421 lfe8gtho7hclfustb2b3d6rgmc Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='955';
20240715@185933.2887 l1omijqb3odc76u55mfhkumvsb Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185933.2900 l1omijqb3odc76u55mfhkumvsb Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185933.2918 l1omijqb3odc76u55mfhkumvsb Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='956';
20240715@185933.2962 l1omijqb3odc76u55mfhkumvsb Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='956';
20240715@185933.2979 l1omijqb3odc76u55mfhkumvsb Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='956';
20240715@185933.2991 l1omijqb3odc76u55mfhkumvsb Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='956';
20240715@185933.3005 l1omijqb3odc76u55mfhkumvsb Query : use flama_phc
20240715@185933.3008 l1omijqb3odc76u55mfhkumvsb Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185933.3023 l1omijqb3odc76u55mfhkumvsb Query : use flama_phc
20240715@185933.3025 l1omijqb3odc76u55mfhkumvsb Query : select no, estab,szadrsdesc from szadrs where u_coddest=375
20240715@185933.3089 l1omijqb3odc76u55mfhkumvsb 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'
20240715@185933.3184 l1omijqb3odc76u55mfhkumvsb Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404726 and bi.ref ='324.1685.00.1' and bi.lordem =1
20240715@185933.3471 l1omijqb3odc76u55mfhkumvsb Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1816.00.1'
20240715@185933.3569 l1omijqb3odc76u55mfhkumvsb Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404726 and bi.ref ='324.1816.00.1' and bi.lordem =2
20240715@185933.3843 l1omijqb3odc76u55mfhkumvsb 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'
20240715@185933.3943 l1omijqb3odc76u55mfhkumvsb Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404726 and bi.ref ='324.5540.00.1' and bi.lordem =3
20240715@185933.4222 l1omijqb3odc76u55mfhkumvsb 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'
20240715@185933.4233 l1omijqb3odc76u55mfhkumvsb Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404726 and bi.ref ='324.1536.00.1' and bi.lordem =4
20240715@185933.4510 l1omijqb3odc76u55mfhkumvsb Query : use flama_phc
20240715@185933.4513 l1omijqb3odc76u55mfhkumvsb Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185933.4527 l1omijqb3odc76u55mfhkumvsb Query : use flama_phc
20240715@185933.4529 l1omijqb3odc76u55mfhkumvsb Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185933.4541 l1omijqb3odc76u55mfhkumvsb Query : use flama_phc
20240715@185933.4544 l1omijqb3odc76u55mfhkumvsb 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')
20240715@185933.4564 l1omijqb3odc76u55mfhkumvsb Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185933.4579 l1omijqb3odc76u55mfhkumvsb Query : use flama_phc
20240715@185933.4582 l1omijqb3odc76u55mfhkumvsb Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185933.4594 l1omijqb3odc76u55mfhkumvsb Query : use flama_phc
20240715@185933.4596 l1omijqb3odc76u55mfhkumvsb Query : select szadrsstamp valor from szadrs where szadrsdesc='joaquim antÓnio basilio fialho'
20240715@185933.4609 l1omijqb3odc76u55mfhkumvsb Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='956';
20240715@185933.4623 l1omijqb3odc76u55mfhkumvsb Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='956';
20240715@185933.5053 9ou4dhuc82rhtkupur88id7395 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185933.5066 9ou4dhuc82rhtkupur88id7395 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185933.5085 9ou4dhuc82rhtkupur88id7395 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='957';
20240715@185933.5126 9ou4dhuc82rhtkupur88id7395 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='957';
20240715@185933.5142 9ou4dhuc82rhtkupur88id7395 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='957';
20240715@185933.5155 9ou4dhuc82rhtkupur88id7395 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='957';
20240715@185933.5168 9ou4dhuc82rhtkupur88id7395 Query : use flama_phc
20240715@185933.5171 9ou4dhuc82rhtkupur88id7395 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185933.5186 9ou4dhuc82rhtkupur88id7395 Query : use flama_phc
20240715@185933.5188 9ou4dhuc82rhtkupur88id7395 Query : select no, estab,szadrsdesc from szadrs where u_coddest=3099
20240715@185933.5253 9ou4dhuc82rhtkupur88id7395 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'
20240715@185933.5347 9ou4dhuc82rhtkupur88id7395 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404727 and bi.ref ='324.1643.00.1' and bi.lordem =1
20240715@185933.5638 9ou4dhuc82rhtkupur88id7395 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'
20240715@185933.5648 9ou4dhuc82rhtkupur88id7395 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404727 and bi.ref ='324.4521.00.1' and bi.lordem =2
20240715@185933.5994 9ou4dhuc82rhtkupur88id7395 Query : use flama_phc
20240715@185933.5997 9ou4dhuc82rhtkupur88id7395 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185933.6010 9ou4dhuc82rhtkupur88id7395 Query : use flama_phc
20240715@185933.6013 9ou4dhuc82rhtkupur88id7395 Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185933.6023 9ou4dhuc82rhtkupur88id7395 Query : use flama_phc
20240715@185933.6026 9ou4dhuc82rhtkupur88id7395 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')
20240715@185933.6043 9ou4dhuc82rhtkupur88id7395 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185933.6058 9ou4dhuc82rhtkupur88id7395 Query : use flama_phc
20240715@185933.6060 9ou4dhuc82rhtkupur88id7395 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185933.6071 9ou4dhuc82rhtkupur88id7395 Query : use flama_phc
20240715@185933.6073 9ou4dhuc82rhtkupur88id7395 Query : select szadrsstamp valor from szadrs where szadrsdesc='central de compras de herramientas, s.l.'
20240715@185933.6084 9ou4dhuc82rhtkupur88id7395 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='957';
20240715@185933.6098 9ou4dhuc82rhtkupur88id7395 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='957';
20240715@185933.6533 3skmdd9ifo4njmg4pugdh9la9u Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185933.6545 3skmdd9ifo4njmg4pugdh9la9u Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185933.6562 3skmdd9ifo4njmg4pugdh9la9u Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='958';
20240715@185933.6601 3skmdd9ifo4njmg4pugdh9la9u Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='958';
20240715@185933.6618 3skmdd9ifo4njmg4pugdh9la9u Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='958';
20240715@185933.6630 3skmdd9ifo4njmg4pugdh9la9u Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='958';
20240715@185933.6644 3skmdd9ifo4njmg4pugdh9la9u Query : use flama_phc
20240715@185933.6647 3skmdd9ifo4njmg4pugdh9la9u Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185933.6661 3skmdd9ifo4njmg4pugdh9la9u Query : use flama_phc
20240715@185933.6664 3skmdd9ifo4njmg4pugdh9la9u Query : select no, estab,szadrsdesc from szadrs where u_coddest=3168
20240715@185933.6731 3skmdd9ifo4njmg4pugdh9la9u Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '328.9006.00.1'
20240715@185933.6827 3skmdd9ifo4njmg4pugdh9la9u Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404728 and bi.ref ='328.9006.00.1' and bi.lordem =1
20240715@185933.7089 3skmdd9ifo4njmg4pugdh9la9u Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '328.9006.00.1'
20240715@185933.7099 3skmdd9ifo4njmg4pugdh9la9u Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404728 and bi.ref ='328.9006.00.1' and bi.lordem =2
20240715@185933.7359 3skmdd9ifo4njmg4pugdh9la9u Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.948.00.01'
20240715@185933.7450 3skmdd9ifo4njmg4pugdh9la9u Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404728 and bi.ref ='324.948.00.01' and bi.lordem =3
20240715@185933.8793 3skmdd9ifo4njmg4pugdh9la9u Query : use flama_phc
20240715@185933.8796 3skmdd9ifo4njmg4pugdh9la9u Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185933.8810 3skmdd9ifo4njmg4pugdh9la9u Query : use flama_phc
20240715@185933.8813 3skmdd9ifo4njmg4pugdh9la9u Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185933.8823 3skmdd9ifo4njmg4pugdh9la9u Query : use flama_phc
20240715@185933.8825 3skmdd9ifo4njmg4pugdh9la9u 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')
20240715@185933.8843 3skmdd9ifo4njmg4pugdh9la9u Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185933.8858 3skmdd9ifo4njmg4pugdh9la9u Query : use flama_phc
20240715@185933.8860 3skmdd9ifo4njmg4pugdh9la9u Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185933.8870 3skmdd9ifo4njmg4pugdh9la9u Query : use flama_phc
20240715@185933.8873 3skmdd9ifo4njmg4pugdh9la9u Query : select szadrsstamp valor from szadrs where szadrsdesc='electro chico - electrodomÉsticos, lda.'
20240715@185933.8884 3skmdd9ifo4njmg4pugdh9la9u Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='958';
20240715@185933.8898 3skmdd9ifo4njmg4pugdh9la9u Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='958';
20240715@185933.9332 slodvbjtroanuihs8n1e7bk63h Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185933.9345 slodvbjtroanuihs8n1e7bk63h Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185933.9362 slodvbjtroanuihs8n1e7bk63h Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='959';
20240715@185933.9401 slodvbjtroanuihs8n1e7bk63h Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='959';
20240715@185933.9417 slodvbjtroanuihs8n1e7bk63h Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='959';
20240715@185933.9428 slodvbjtroanuihs8n1e7bk63h Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='959';
20240715@185933.9441 slodvbjtroanuihs8n1e7bk63h Query : use flama_phc
20240715@185933.9444 slodvbjtroanuihs8n1e7bk63h Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185933.9459 slodvbjtroanuihs8n1e7bk63h Query : use flama_phc
20240715@185933.9461 slodvbjtroanuihs8n1e7bk63h Query : select no, estab,szadrsdesc from szadrs where u_coddest=908
20240715@185933.9522 slodvbjtroanuihs8n1e7bk63h 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'
20240715@185933.9615 slodvbjtroanuihs8n1e7bk63h Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404729 and bi.ref ='324.646.00.01' and bi.lordem =1
20240715@185933.9869 slodvbjtroanuihs8n1e7bk63h 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'
20240715@185933.9880 slodvbjtroanuihs8n1e7bk63h Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404729 and bi.ref ='324.646.00.01' and bi.lordem =2
20240715@185934.1290 slodvbjtroanuihs8n1e7bk63h Query : use flama_phc
20240715@185934.1320 slodvbjtroanuihs8n1e7bk63h Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185934.1450 slodvbjtroanuihs8n1e7bk63h Query : use flama_phc
20240715@185934.1480 slodvbjtroanuihs8n1e7bk63h Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185934.1590 slodvbjtroanuihs8n1e7bk63h Query : use flama_phc
20240715@185934.1620 slodvbjtroanuihs8n1e7bk63h 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')
20240715@185934.1810 slodvbjtroanuihs8n1e7bk63h Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185934.1960 slodvbjtroanuihs8n1e7bk63h Query : use flama_phc
20240715@185934.1980 slodvbjtroanuihs8n1e7bk63h Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185934.2090 slodvbjtroanuihs8n1e7bk63h Query : use flama_phc
20240715@185934.2120 slodvbjtroanuihs8n1e7bk63h Query : select szadrsstamp valor from szadrs where szadrsdesc='j.o.m.,lda-aveiro'
20240715@185934.2240 slodvbjtroanuihs8n1e7bk63h Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='959';
20240715@185934.2430 slodvbjtroanuihs8n1e7bk63h Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='959';
20240715@185934.1268 4aqud8i3619sbkutop8ocinvd0 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185934.1284 4aqud8i3619sbkutop8ocinvd0 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185934.1302 4aqud8i3619sbkutop8ocinvd0 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='960';
20240715@185934.1344 4aqud8i3619sbkutop8ocinvd0 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='960';
20240715@185934.1363 4aqud8i3619sbkutop8ocinvd0 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='960';
20240715@185934.1376 4aqud8i3619sbkutop8ocinvd0 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='960';
20240715@185934.1390 4aqud8i3619sbkutop8ocinvd0 Query : use flama_phc
20240715@185934.1393 4aqud8i3619sbkutop8ocinvd0 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185934.1408 4aqud8i3619sbkutop8ocinvd0 Query : use flama_phc
20240715@185934.1411 4aqud8i3619sbkutop8ocinvd0 Query : select no, estab,szadrsdesc from szadrs where u_coddest=886
20240715@185934.1476 4aqud8i3619sbkutop8ocinvd0 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'
20240715@185934.1572 4aqud8i3619sbkutop8ocinvd0 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404730 and bi.ref ='327.8253.00.1' and bi.lordem =1
20240715@185934.1891 4aqud8i3619sbkutop8ocinvd0 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'
20240715@185934.1901 4aqud8i3619sbkutop8ocinvd0 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404730 and bi.ref ='324.5540.00.1' and bi.lordem =2
20240715@185934.2150 4aqud8i3619sbkutop8ocinvd0 Query : use flama_phc
20240715@185934.2153 4aqud8i3619sbkutop8ocinvd0 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185934.2168 4aqud8i3619sbkutop8ocinvd0 Query : use flama_phc
20240715@185934.2170 4aqud8i3619sbkutop8ocinvd0 Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185934.2181 4aqud8i3619sbkutop8ocinvd0 Query : use flama_phc
20240715@185934.2183 4aqud8i3619sbkutop8ocinvd0 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')
20240715@185934.2202 4aqud8i3619sbkutop8ocinvd0 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185934.2217 4aqud8i3619sbkutop8ocinvd0 Query : use flama_phc
20240715@185934.2220 4aqud8i3619sbkutop8ocinvd0 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185934.2230 4aqud8i3619sbkutop8ocinvd0 Query : use flama_phc
20240715@185934.2233 4aqud8i3619sbkutop8ocinvd0 Query : select szadrsstamp valor from szadrs where szadrsdesc='j.o.m.,lda coimbra'
20240715@185934.2244 4aqud8i3619sbkutop8ocinvd0 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='960';
20240715@185934.2259 4aqud8i3619sbkutop8ocinvd0 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='960';
20240715@185934.2737 5kgp96b3vd56b9mrrf5ebboc3v Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185934.2750 5kgp96b3vd56b9mrrf5ebboc3v Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185934.2767 5kgp96b3vd56b9mrrf5ebboc3v Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='961';
20240715@185934.2806 5kgp96b3vd56b9mrrf5ebboc3v Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='961';
20240715@185934.2821 5kgp96b3vd56b9mrrf5ebboc3v Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='961';
20240715@185934.2834 5kgp96b3vd56b9mrrf5ebboc3v Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='961';
20240715@185934.2847 5kgp96b3vd56b9mrrf5ebboc3v Query : use flama_phc
20240715@185934.2850 5kgp96b3vd56b9mrrf5ebboc3v Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185934.2864 5kgp96b3vd56b9mrrf5ebboc3v Query : use flama_phc
20240715@185934.2867 5kgp96b3vd56b9mrrf5ebboc3v Query : select no, estab,szadrsdesc from szadrs where u_coddest=672
20240715@185934.3150 5kgp96b3vd56b9mrrf5ebboc3v 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'
20240715@185934.3266 5kgp96b3vd56b9mrrf5ebboc3v Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404731 and bi.ref ='324.1805.00.1' and bi.lordem =1
20240715@185934.3695 5kgp96b3vd56b9mrrf5ebboc3v 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'
20240715@185934.3806 5kgp96b3vd56b9mrrf5ebboc3v Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404731 and bi.ref ='324.1834.00.1' and bi.lordem =2
20240715@185934.4124 5kgp96b3vd56b9mrrf5ebboc3v 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'
20240715@185934.4135 5kgp96b3vd56b9mrrf5ebboc3v Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404731 and bi.ref ='324.1879.00.1' and bi.lordem =3
20240715@185934.4411 5kgp96b3vd56b9mrrf5ebboc3v 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'
20240715@185934.4422 5kgp96b3vd56b9mrrf5ebboc3v Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404731 and bi.ref ='324.1879.00.1' and bi.lordem =4
20240715@185934.4691 5kgp96b3vd56b9mrrf5ebboc3v 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'
20240715@185934.4701 5kgp96b3vd56b9mrrf5ebboc3v Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404731 and bi.ref ='324.692.00.01' and bi.lordem =5
20240715@185934.4954 5kgp96b3vd56b9mrrf5ebboc3v Query : use flama_phc
20240715@185934.4957 5kgp96b3vd56b9mrrf5ebboc3v Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185934.4970 5kgp96b3vd56b9mrrf5ebboc3v Query : use flama_phc
20240715@185934.4973 5kgp96b3vd56b9mrrf5ebboc3v Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185934.4983 5kgp96b3vd56b9mrrf5ebboc3v Query : use flama_phc
20240715@185934.4986 5kgp96b3vd56b9mrrf5ebboc3v 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')
20240715@185934.5003 5kgp96b3vd56b9mrrf5ebboc3v Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185934.5019 5kgp96b3vd56b9mrrf5ebboc3v Query : use flama_phc
20240715@185934.5022 5kgp96b3vd56b9mrrf5ebboc3v Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185934.5032 5kgp96b3vd56b9mrrf5ebboc3v Query : use flama_phc
20240715@185934.5035 5kgp96b3vd56b9mrrf5ebboc3v Query : select szadrsstamp valor from szadrs where szadrsdesc='frigil-gilberto vieira seco, lda'
20240715@185934.5047 5kgp96b3vd56b9mrrf5ebboc3v Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='961';
20240715@185934.5062 5kgp96b3vd56b9mrrf5ebboc3v Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='961';
20240715@185934.5488 rsfgmnq8j8tptnj0v988j0pr2m Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185934.5501 rsfgmnq8j8tptnj0v988j0pr2m Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185934.5518 rsfgmnq8j8tptnj0v988j0pr2m Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='962';
20240715@185934.5557 rsfgmnq8j8tptnj0v988j0pr2m Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='962';
20240715@185934.5573 rsfgmnq8j8tptnj0v988j0pr2m Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='962';
20240715@185934.5585 rsfgmnq8j8tptnj0v988j0pr2m Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='962';
20240715@185934.5597 rsfgmnq8j8tptnj0v988j0pr2m Query : use flama_phc
20240715@185934.5600 rsfgmnq8j8tptnj0v988j0pr2m Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185934.5614 rsfgmnq8j8tptnj0v988j0pr2m Query : use flama_phc
20240715@185934.5617 rsfgmnq8j8tptnj0v988j0pr2m Query : select no, estab,szadrsdesc from szadrs where u_coddest=1899
20240715@185934.5913 rsfgmnq8j8tptnj0v988j0pr2m 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'
20240715@185934.6000 rsfgmnq8j8tptnj0v988j0pr2m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404732 and bi.ref ='324.646.00.01' and bi.lordem =1
20240715@185934.6263 rsfgmnq8j8tptnj0v988j0pr2m 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'
20240715@185934.6274 rsfgmnq8j8tptnj0v988j0pr2m Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404732 and bi.ref ='324.646.00.01' and bi.lordem =2
20240715@185934.6528 rsfgmnq8j8tptnj0v988j0pr2m Query : use flama_phc
20240715@185934.6532 rsfgmnq8j8tptnj0v988j0pr2m Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185934.6545 rsfgmnq8j8tptnj0v988j0pr2m Query : use flama_phc
20240715@185934.6547 rsfgmnq8j8tptnj0v988j0pr2m Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185934.6557 rsfgmnq8j8tptnj0v988j0pr2m Query : use flama_phc
20240715@185934.6560 rsfgmnq8j8tptnj0v988j0pr2m 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')
20240715@185934.6579 rsfgmnq8j8tptnj0v988j0pr2m Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185934.6595 rsfgmnq8j8tptnj0v988j0pr2m Query : use flama_phc
20240715@185934.6597 rsfgmnq8j8tptnj0v988j0pr2m Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185934.6608 rsfgmnq8j8tptnj0v988j0pr2m Query : use flama_phc
20240715@185934.6610 rsfgmnq8j8tptnj0v988j0pr2m Query : select szadrsstamp valor from szadrs where szadrsdesc='j.o.m'
20240715@185934.6622 rsfgmnq8j8tptnj0v988j0pr2m Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='962';
20240715@185934.6636 rsfgmnq8j8tptnj0v988j0pr2m Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='962';
20240715@185934.7131 lv2i7a07svn6jq0b1fk8bnaci5 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240715@185934.7144 lv2i7a07svn6jq0b1fk8bnaci5 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240715@185934.7160 lv2i7a07svn6jq0b1fk8bnaci5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='963';
20240715@185934.7198 lv2i7a07svn6jq0b1fk8bnaci5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='963';
20240715@185934.7213 lv2i7a07svn6jq0b1fk8bnaci5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='963';
20240715@185934.7225 lv2i7a07svn6jq0b1fk8bnaci5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='963';
20240715@185934.7238 lv2i7a07svn6jq0b1fk8bnaci5 Query : use flama_phc
20240715@185934.7241 lv2i7a07svn6jq0b1fk8bnaci5 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240715@185934.7255 lv2i7a07svn6jq0b1fk8bnaci5 Query : use flama_phc
20240715@185934.7257 lv2i7a07svn6jq0b1fk8bnaci5 Query : select no, estab,szadrsdesc from szadrs where u_coddest=1328
20240715@185934.7317 lv2i7a07svn6jq0b1fk8bnaci5 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'
20240715@185934.7411 lv2i7a07svn6jq0b1fk8bnaci5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404733 and bi.ref ='324.5396.00.1' and bi.lordem =1
20240715@185934.7665 lv2i7a07svn6jq0b1fk8bnaci5 Query : use flama_phc
20240715@185934.7668 lv2i7a07svn6jq0b1fk8bnaci5 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240715@185934.7681 lv2i7a07svn6jq0b1fk8bnaci5 Query : use flama_phc
20240715@185934.7684 lv2i7a07svn6jq0b1fk8bnaci5 Query : select top 1 1 valor from td where td.ndoc = 39
20240715@185934.7693 lv2i7a07svn6jq0b1fk8bnaci5 Query : use flama_phc
20240715@185934.7696 lv2i7a07svn6jq0b1fk8bnaci5 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')
20240715@185934.7713 lv2i7a07svn6jq0b1fk8bnaci5 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240715@185934.7728 lv2i7a07svn6jq0b1fk8bnaci5 Query : use flama_phc
20240715@185934.7731 lv2i7a07svn6jq0b1fk8bnaci5 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240715@185934.7742 lv2i7a07svn6jq0b1fk8bnaci5 Query : use flama_phc
20240715@185934.7745 lv2i7a07svn6jq0b1fk8bnaci5 Query : select szadrsstamp valor from szadrs where szadrsdesc='j.o.m.,lda - mealhada'
20240715@185934.7756 lv2i7a07svn6jq0b1fk8bnaci5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='963';
20240715@185934.7769 lv2i7a07svn6jq0b1fk8bnaci5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='963';
20240715@191911.6201 nhfmabuop7an55et2c5b2vnd0f Query : use flama_phc
20240715@191911.6206 nhfmabuop7an55et2c5b2vnd0f Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@191911.6223 nhfmabuop7an55et2c5b2vnd0f Query : use flama_phc
20240715@191911.6226 nhfmabuop7an55et2c5b2vnd0f Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@193611.2474 1g2s1h8vmb9o61rjqufg6fbk6e Query : use flama_phc
20240715@193611.2479 1g2s1h8vmb9o61rjqufg6fbk6e Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@193611.2496 1g2s1h8vmb9o61rjqufg6fbk6e Query : use flama_phc
20240715@193611.2499 1g2s1h8vmb9o61rjqufg6fbk6e Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@201914.2600 rr7t21bid4987ibg70mujdmbci Query : use flama_phc
20240715@201914.2607 rr7t21bid4987ibg70mujdmbci Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@201914.2625 rr7t21bid4987ibg70mujdmbci Query : use flama_phc
20240715@201914.2668 rr7t21bid4987ibg70mujdmbci Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@203614.6310 ua1dv6hd1an8hcoca33eukdpn3 Query : use flama_phc
20240715@203614.6360 ua1dv6hd1an8hcoca33eukdpn3 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@203614.6530 ua1dv6hd1an8hcoca33eukdpn3 Query : use flama_phc
20240715@203614.6570 ua1dv6hd1an8hcoca33eukdpn3 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@211910.4410 aoegrjbn8j3os8kf3dpg3tiblj Query : use flama_phc
20240715@211910.4460 aoegrjbn8j3os8kf3dpg3tiblj Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@211910.4640 aoegrjbn8j3os8kf3dpg3tiblj Query : use flama_phc
20240715@211910.4670 aoegrjbn8j3os8kf3dpg3tiblj Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@213610.6302 8cmodothffil97p7sfvausrc4a Query : use flama_phc
20240715@213610.6307 8cmodothffil97p7sfvausrc4a Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@213610.6325 8cmodothffil97p7sfvausrc4a Query : use flama_phc
20240715@213610.6328 8cmodothffil97p7sfvausrc4a Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@221909.5352 j8g6p2jeooh881pj15fj7aoo83 Query : use flama_phc
20240715@221909.5357 j8g6p2jeooh881pj15fj7aoo83 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@221909.5380 j8g6p2jeooh881pj15fj7aoo83 Query : use flama_phc
20240715@221909.5383 j8g6p2jeooh881pj15fj7aoo83 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@223609.4495 ja3mhanqh1aaq7pc2gacdilmke Query : use flama_phc
20240715@223609.4501 ja3mhanqh1aaq7pc2gacdilmke Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@223609.4519 ja3mhanqh1aaq7pc2gacdilmke Query : use flama_phc
20240715@223609.4522 ja3mhanqh1aaq7pc2gacdilmke Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@231909.9854 4r393mkkttul372q1tfokgn236 Query : use flama_phc
20240715@231909.9860 4r393mkkttul372q1tfokgn236 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@231909.9881 4r393mkkttul372q1tfokgn236 Query : use flama_phc
20240715@231909.9884 4r393mkkttul372q1tfokgn236 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240715@233609.9307 ph6710posed6uktojic195hfu0 Query : use flama_phc
20240715@233609.9312 ph6710posed6uktojic195hfu0 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240715@233609.9334 ph6710posed6uktojic195hfu0 Query : use flama_phc
20240715@233609.9346 ph6710posed6uktojic195hfu0 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240716@071911.6460 06phhnehnmnkotkk5gnuahna5u Query : use flama_phc
20240716@071911.6467 06phhnehnmnkotkk5gnuahna5u Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240716@071911.6582 06phhnehnmnkotkk5gnuahna5u Query : use flama_phc
20240716@071911.6589 06phhnehnmnkotkk5gnuahna5u Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240716@073626.1938 flfi1eejfq8t1scuodmkdckju5 Query : use flama_phc
20240716@073626.1943 flfi1eejfq8t1scuodmkdckju5 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240716@073626.2003 flfi1eejfq8t1scuodmkdckju5 Query : use flama_phc
20240716@073626.2006 flfi1eejfq8t1scuodmkdckju5 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240716@074534.5073 cdk9ppftputeg7i07tmmns41t6 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240716@074534.5110 cdk9ppftputeg7i07tmmns41t6 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240716@074534.5263 cdk9ppftputeg7i07tmmns41t6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='964';
20240716@074534.5391 cdk9ppftputeg7i07tmmns41t6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='964';
20240716@074534.5441 cdk9ppftputeg7i07tmmns41t6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='964';
20240716@074534.5460 cdk9ppftputeg7i07tmmns41t6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='964';
20240716@074534.5483 cdk9ppftputeg7i07tmmns41t6 Query : use flama_phc
20240716@074534.5487 cdk9ppftputeg7i07tmmns41t6 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240716@074534.5555 cdk9ppftputeg7i07tmmns41t6 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.691.00.01'
20240716@074534.5675 cdk9ppftputeg7i07tmmns41t6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =002 and bo.boano =2024 and bo.obrano = 2400210 and bi.ref ='324.691.00.01' and bi.lordem =20000
20240716@074534.6207 cdk9ppftputeg7i07tmmns41t6 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 = 'cps24022736084,708000002 ' 
20240716@074534.6630 cdk9ppftputeg7i07tmmns41t6 Query : use flama_phc
20240716@074534.6634 cdk9ppftputeg7i07tmmns41t6 Query : select top 1 1 valor from ts where ts.ndos = 61
20240716@074534.6737 cdk9ppftputeg7i07tmmns41t6 Query : use flama_phc
20240716@074534.6741 cdk9ppftputeg7i07tmmns41t6 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')
20240716@074534.6893 cdk9ppftputeg7i07tmmns41t6 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
20240716@074534.7048 cdk9ppftputeg7i07tmmns41t6 Query : use flama_phc
20240716@074534.7051 cdk9ppftputeg7i07tmmns41t6 Query : select top 1 ~inactivo valor from fl where no = '202532' and estab = 00 order by inactivo desc
20240716@074534.7141 cdk9ppftputeg7i07tmmns41t6 Query : use flama_phc
20240716@074534.7145 cdk9ppftputeg7i07tmmns41t6 Query : select 1 valor from ts where ndos = 61
20240716@074534.7217 cdk9ppftputeg7i07tmmns41t6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240716@074534.7651 cdk9ppftputeg7i07tmmns41t6 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20240716@074534.7733 cdk9ppftputeg7i07tmmns41t6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240716@074534.7766 cdk9ppftputeg7i07tmmns41t6 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20240716@074534.7775 cdk9ppftputeg7i07tmmns41t6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240716@074534.7788 cdk9ppftputeg7i07tmmns41t6 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20240716@074534.7809 cdk9ppftputeg7i07tmmns41t6 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
20240716@074534.7948 cdk9ppftputeg7i07tmmns41t6 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240716@074534.8085 cdk9ppftputeg7i07tmmns41t6 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240716@074534.8109 cdk9ppftputeg7i07tmmns41t6 Query : use flama_phc
20240716@074534.8113 cdk9ppftputeg7i07tmmns41t6 Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202532' and estab=00
20240716@074534.8214 cdk9ppftputeg7i07tmmns41t6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240716@074534.8230 cdk9ppftputeg7i07tmmns41t6 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20240716@074534.8271 cdk9ppftputeg7i07tmmns41t6 Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66961752456696170ec5',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240716@074534.8355 cdk9ppftputeg7i07tmmns41t6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240716@074534.8370 cdk9ppftputeg7i07tmmns41t6 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20240716@074534.8379 cdk9ppftputeg7i07tmmns41t6 Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66961752456696170ec5','--','bo',1.0944466963923794081 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240716@074534.8563 cdk9ppftputeg7i07tmmns41t6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240716@074534.8581 cdk9ppftputeg7i07tmmns41t6 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20240716@074534.8589 cdk9ppftputeg7i07tmmns41t6 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 ('aut66961752456696170ec5','guia r. fornecedor','2024-07-16',61,2402073,?,?,?,?,?,?,?,?,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')
20240716@074537.1287 cdk9ppftputeg7i07tmmns41t6 Query : use flama_phc
20240716@074537.1992 cdk9ppftputeg7i07tmmns41t6 Query : select st.usalote valor from st where st.ref = '324.691.00.01'
20240716@074537.2099 cdk9ppftputeg7i07tmmns41t6 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.691.00.01'
20240716@074537.2239 cdk9ppftputeg7i07tmmns41t6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240716@074537.2252 cdk9ppftputeg7i07tmmns41t6 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20240716@074537.2265 cdk9ppftputeg7i07tmmns41t6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240716@074537.2277 cdk9ppftputeg7i07tmmns41t6 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20240716@074537.2284 cdk9ppftputeg7i07tmmns41t6 Query : select sestamp valor from se where ref ='324.691.00.01' and lote = 'r2400210200a'
20240716@074537.2346 cdk9ppftputeg7i07tmmns41t6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240716@074537.2360 cdk9ppftputeg7i07tmmns41t6 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20240716@074537.2367 cdk9ppftputeg7i07tmmns41t6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240716@074537.2380 cdk9ppftputeg7i07tmmns41t6 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20240716@074537.2387 cdk9ppftputeg7i07tmmns41t6 Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66961332866696171139',?,?,'20240716',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20240716@074537.3323 cdk9ppftputeg7i07tmmns41t6 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240716@074537.3360 cdk9ppftputeg7i07tmmns41t6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240716@074537.3374 cdk9ppftputeg7i07tmmns41t6 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20240716@074537.3382 cdk9ppftputeg7i07tmmns41t6 Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66961917876696171152','aut66961752456696170ec5',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 = 'aut66961752456696170ec5'
20240716@074537.3617 cdk9ppftputeg7i07tmmns41t6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240716@074537.3631 cdk9ppftputeg7i07tmmns41t6 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20240716@074537.3644 cdk9ppftputeg7i07tmmns41t6 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 'aut66961917876696171152',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1044, 1044*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,10000 ,24.67,24.67*200.48,24.67,24.67*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,24.67*1044,24.67*1044*200.48 ,29.963000,29.963000*200.48 ,29.963000,29.963000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,24.67,24.67*200.48,24.67*1044,24.67*1044*200.48,'cps24022736084,708000002 ',27,27*1044,27,27*1044,?,?,?,4 from bo bo where bo.bostamp = 'aut66961752456696170ec5'
20240716@074548.5855 cdk9ppftputeg7i07tmmns41t6 Query : use flama_phc
20240716@074548.5868 cdk9ppftputeg7i07tmmns41t6 Query : declare @bostamp varchar(25) = 'aut66961752456696170ec5' ,@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 
20240716@074555.7238 cdk9ppftputeg7i07tmmns41t6 Query : use flama_phc
20240716@074555.7242 cdk9ppftputeg7i07tmmns41t6 Query : select 1 valor from bo where bo.bostamp = 'aut66961752456696170ec5'
20240716@074555.7315 cdk9ppftputeg7i07tmmns41t6 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) = 'aut66961752456696170ec5' 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 
20240716@074556.4358 cdk9ppftputeg7i07tmmns41t6 Query : use flama_phc
20240716@074556.4362 cdk9ppftputeg7i07tmmns41t6 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240716@074556.4376 cdk9ppftputeg7i07tmmns41t6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='964';
20240716@074556.4392 cdk9ppftputeg7i07tmmns41t6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='964';
20240716@081910.6823 lh2emkl48nmuoe36rusjp3hv9n Query : use flama_phc
20240716@081910.6829 lh2emkl48nmuoe36rusjp3hv9n Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240716@081910.6879 lh2emkl48nmuoe36rusjp3hv9n Query : use flama_phc
20240716@081910.6882 lh2emkl48nmuoe36rusjp3hv9n Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240716@083610.6686 8ejg5vepvlq2ef2vpdpn9tfoeg Query : use flama_phc
20240716@083610.6692 8ejg5vepvlq2ef2vpdpn9tfoeg Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240716@083610.6759 8ejg5vepvlq2ef2vpdpn9tfoeg Query : use flama_phc
20240716@083610.6762 8ejg5vepvlq2ef2vpdpn9tfoeg Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240716@084857.5629 amnn3ccoc9r48tmih5qb8lquhu Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240716@084857.5655 amnn3ccoc9r48tmih5qb8lquhu Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240716@084857.5701 amnn3ccoc9r48tmih5qb8lquhu Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='965';
20240716@084857.5741 amnn3ccoc9r48tmih5qb8lquhu Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='965';
20240716@084857.5770 amnn3ccoc9r48tmih5qb8lquhu Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='965';
20240716@084857.5785 amnn3ccoc9r48tmih5qb8lquhu Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='965';
20240716@084857.5798 amnn3ccoc9r48tmih5qb8lquhu Query : use flama_phc
20240716@084857.5801 amnn3ccoc9r48tmih5qb8lquhu Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240716@084857.5853 amnn3ccoc9r48tmih5qb8lquhu Query : use flama_phc
20240716@084857.5856 amnn3ccoc9r48tmih5qb8lquhu Query : select no, estab,szadrsdesc from szadrs where u_coddest=2427
20240716@084857.5915 amnn3ccoc9r48tmih5qb8lquhu 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'
20240716@084857.6010 amnn3ccoc9r48tmih5qb8lquhu Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404651 and bi.ref ='324.4521.00.1' and bi.lordem =1
20240716@084857.6279 amnn3ccoc9r48tmih5qb8lquhu 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'
20240716@084857.6291 amnn3ccoc9r48tmih5qb8lquhu Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404651 and bi.ref ='324.4521.00.1' and bi.lordem =1
20240716@084857.6298 amnn3ccoc9r48tmih5qb8lquhu 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'
20240716@084857.6391 amnn3ccoc9r48tmih5qb8lquhu Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404651 and bi.ref ='324.1803.00.1' and bi.lordem =2
20240716@084857.6663 amnn3ccoc9r48tmih5qb8lquhu 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'
20240716@084857.6677 amnn3ccoc9r48tmih5qb8lquhu Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404651 and bi.ref ='324.1803.00.1' and bi.lordem =2
20240716@084857.6684 amnn3ccoc9r48tmih5qb8lquhu 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'
20240716@084857.6693 amnn3ccoc9r48tmih5qb8lquhu Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404651 and bi.ref ='324.1803.00.1' and bi.lordem =2
20240716@084857.6700 amnn3ccoc9r48tmih5qb8lquhu Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.948.00.01'
20240716@084857.6795 amnn3ccoc9r48tmih5qb8lquhu Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404651 and bi.ref ='324.948.00.01' and bi.lordem =3
20240716@084857.7071 amnn3ccoc9r48tmih5qb8lquhu 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'
20240716@084857.7168 amnn3ccoc9r48tmih5qb8lquhu Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404651 and bi.ref ='324.4421.00.1' and bi.lordem =4
20240716@084857.7445 amnn3ccoc9r48tmih5qb8lquhu 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'
20240716@084857.7539 amnn3ccoc9r48tmih5qb8lquhu Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404651 and bi.ref ='324.2203.00.1' and bi.lordem =5
20240716@084857.7804 amnn3ccoc9r48tmih5qb8lquhu 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'
20240716@084857.7901 amnn3ccoc9r48tmih5qb8lquhu Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404651 and bi.ref ='324.5343.00.1' and bi.lordem =6
20240716@084857.8169 amnn3ccoc9r48tmih5qb8lquhu 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'
20240716@084857.8311 amnn3ccoc9r48tmih5qb8lquhu Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404651 and bi.ref ='324.1805.00.1' and bi.lordem =7
20240716@084857.9800 amnn3ccoc9r48tmih5qb8lquhu 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'
20240716@084857.9876 amnn3ccoc9r48tmih5qb8lquhu Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404651 and bi.ref ='324.1805.00.1' and bi.lordem =7
20240716@084857.9884 amnn3ccoc9r48tmih5qb8lquhu 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'
20240716@084857.9984 amnn3ccoc9r48tmih5qb8lquhu Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404651 and bi.ref ='324.646.00.01' and bi.lordem =8
20240716@084858.2640 amnn3ccoc9r48tmih5qb8lquhu 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'
20240716@084858.2750 amnn3ccoc9r48tmih5qb8lquhu Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404651 and bi.ref ='324.646.00.01' and bi.lordem =8
20240716@084858.2820 amnn3ccoc9r48tmih5qb8lquhu 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'
20240716@084858.3760 amnn3ccoc9r48tmih5qb8lquhu Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404651 and bi.ref ='324.1884.00.1' and bi.lordem =9
20240716@084858.6450 amnn3ccoc9r48tmih5qb8lquhu 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'
20240716@084858.7500 amnn3ccoc9r48tmih5qb8lquhu Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404651 and bi.ref ='324.969.00.01' and bi.lordem =10
20240716@084858.1064 amnn3ccoc9r48tmih5qb8lquhu 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'
20240716@084858.1161 amnn3ccoc9r48tmih5qb8lquhu Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404651 and bi.ref ='324.691.00.01' and bi.lordem =11
20240716@084858.1435 amnn3ccoc9r48tmih5qb8lquhu 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'
20240716@084858.1533 amnn3ccoc9r48tmih5qb8lquhu Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404651 and bi.ref ='324.1684.00.1' and bi.lordem =12
20240716@084858.1801 amnn3ccoc9r48tmih5qb8lquhu Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4964.00.1'
20240716@084858.1909 amnn3ccoc9r48tmih5qb8lquhu Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2046 and bo.obrano = 2404651 and bi.ref ='324.4964.00.1' and bi.lordem =13
20240716@084858.2224 amnn3ccoc9r48tmih5qb8lquhu Query : use flama_phc
20240716@084858.2227 amnn3ccoc9r48tmih5qb8lquhu Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240716@084858.2367 amnn3ccoc9r48tmih5qb8lquhu Query : use flama_phc
20240716@084858.2370 amnn3ccoc9r48tmih5qb8lquhu Query : select top 1 1 valor from td where td.ndoc = 39
20240716@084858.2417 amnn3ccoc9r48tmih5qb8lquhu Query : use flama_phc
20240716@084858.2420 amnn3ccoc9r48tmih5qb8lquhu 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')
20240716@084858.2468 amnn3ccoc9r48tmih5qb8lquhu Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 39
20240716@084858.2557 amnn3ccoc9r48tmih5qb8lquhu Query : use flama_phc
20240716@084858.2561 amnn3ccoc9r48tmih5qb8lquhu Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240716@084858.2597 amnn3ccoc9r48tmih5qb8lquhu Query : use flama_phc
20240716@084858.2600 amnn3ccoc9r48tmih5qb8lquhu Query : select szadrsstamp valor from szadrs where szadrsdesc='electrodomesticos divelsa,s.a'
20240716@084858.2614 amnn3ccoc9r48tmih5qb8lquhu Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='965';
20240716@084858.2629 amnn3ccoc9r48tmih5qb8lquhu Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='965';
20240716@084858.3168 ampl82500lo57kb6mol3i804tn Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240716@084858.3180 ampl82500lo57kb6mol3i804tn Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240716@084858.3201 ampl82500lo57kb6mol3i804tn Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='966';
20240716@084858.3250 ampl82500lo57kb6mol3i804tn Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='966';
20240716@084858.3268 ampl82500lo57kb6mol3i804tn Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='966';
20240716@084858.3282 ampl82500lo57kb6mol3i804tn Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='966';
20240716@084858.3296 ampl82500lo57kb6mol3i804tn Query : use flama_phc
20240716@084858.3300 ampl82500lo57kb6mol3i804tn Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240716@084858.3315 ampl82500lo57kb6mol3i804tn Query : use flama_phc
20240716@084858.3318 ampl82500lo57kb6mol3i804tn Query : select no, estab,szadrsdesc from szadrs where u_coddest=716
20240716@084858.3393 ampl82500lo57kb6mol3i804tn 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'
20240716@084858.3404 ampl82500lo57kb6mol3i804tn Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404713 and bi.ref ='324.5343.00.1' and bi.lordem =1
20240716@084858.3689 ampl82500lo57kb6mol3i804tn 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'
20240716@084858.3795 ampl82500lo57kb6mol3i804tn Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404713 and bi.ref ='324.1643.00.1' and bi.lordem =2
20240716@084858.4095 ampl82500lo57kb6mol3i804tn 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'
20240716@084858.4106 ampl82500lo57kb6mol3i804tn Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404713 and bi.ref ='324.1643.00.1' and bi.lordem =3
20240716@084858.4425 ampl82500lo57kb6mol3i804tn 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'
20240716@084858.4538 ampl82500lo57kb6mol3i804tn Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404713 and bi.ref ='324.1879.00.1' and bi.lordem =4
20240716@084858.4850 ampl82500lo57kb6mol3i804tn Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4970.00.1'
20240716@084858.4947 ampl82500lo57kb6mol3i804tn Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404713 and bi.ref ='324.4970.00.1' and bi.lordem =5
20240716@084858.5285 ampl82500lo57kb6mol3i804tn 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'
20240716@084858.5297 ampl82500lo57kb6mol3i804tn Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404713 and bi.ref ='324.1803.00.1' and bi.lordem =6
20240716@084858.5581 ampl82500lo57kb6mol3i804tn 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'
20240716@084858.5677 ampl82500lo57kb6mol3i804tn Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404713 and bi.ref ='324.1896.00.1' and bi.lordem =7
20240716@084858.5947 ampl82500lo57kb6mol3i804tn 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'
20240716@084858.5958 ampl82500lo57kb6mol3i804tn Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404713 and bi.ref ='324.1803.00.1' and bi.lordem =8
20240716@084858.6285 ampl82500lo57kb6mol3i804tn 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'
20240716@084858.6296 ampl82500lo57kb6mol3i804tn Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404713 and bi.ref ='324.691.00.01' and bi.lordem =9
20240716@084858.6566 ampl82500lo57kb6mol3i804tn 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'
20240716@084858.6577 ampl82500lo57kb6mol3i804tn Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2047 and bo.obrano = 2404713 and bi.ref ='324.691.00.01' and bi.lordem =10
20240716@084858.6871 ampl82500lo57kb6mol3i804tn Query : use flama_phc
20240716@084858.6995 ampl82500lo57kb6mol3i804tn Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240716@084858.8050 ampl82500lo57kb6mol3i804tn Query : use flama_phc
20240716@084858.8053 ampl82500lo57kb6mol3i804tn Query : select top 1 1 valor from td where td.ndoc = 39
