ps.sql 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. select * from bigcontract bc where providerId =2795 and pastureId =554
  2. select sqlstr,params from apisql where sqlname ='getPartListByProvider';
  3. select sqlstr,params from apisql where sqlname ='providerPactListV2';
  4. select sqlstr,params from apisql where sqlname ='getpartsSync';
  5. select sqlstr,params from apisql where sqlname ='syncEASParts';
  6. select sqlstr,params from apisql where sqlname ='getBigcontractPId';
  7. show create table dictlist;
  8. select * from pasture_bigcontract where pasture_id = 554;
  9. select * from pasture_bigcontract where pasture_id = 554 and bigcontract_id =546009;
  10. select * from bigcontract where contractCode like 'BJ0022010002%';
  11. select * from contract where partCode ='04.04.18.06.000225'
  12. SELECT
  13. 5 typeIn,
  14. id billCode,
  15. partCode,
  16. NAME partName,
  17. specification,
  18. DATE_FORMAT(createTime,'%Y-%m-%d') createTime,
  19. msg failReason,
  20. id
  21. FROM parts
  22. WHERE issync = 0 and statue = 1
  23. {"typeIn":"5","billCode":"480277"}
  24. SELECT d.VALUE,p.unit FROM dictlist d
  25. right join parts p on d.label =p.unit
  26. WHERE pid = 44
  27. and not exists
  28. (select unit from parts p where p.issync = 0 and p.statue = 1)
  29. select unit from parts p
  30. where p.issync = 0 and p.statue = 1
  31. and not exists
  32. (SELECT d.VALUE FROM dictlist d where d.label =p.unit and pid = 44 )
  33. and p.partCode ='04.03.05.07.003229'
  34. select * from dictlist where pid = 44 and label ='米'
  35. select trim('' from partcode) from parts where partCode ='04.04.18.06.000225';
  36. update parts set unit =trim( CHAR(13),trim(CHAR(10) from unit));
  37. update parts set unit =trim(CHAR(10) from unit);
  38. update parts set unit =trim(CHAR(13) from unit);
  39. select distinct failReason from parts p where p.issync = 0 and p.statue = 1;
  40. select * from parts p where p.issync = 0 and p.statue = 1 and partcode='04.04.17.03';
  41. select * from pasture where name='塞北五牧';
  42. select * from bigcontract where id =547286;
  43. select * from pasture_bigcontract where bigcontract_id =547286 and pasture_id =46;
  44. select * from department where name ='现代牧业'
  45. select * from department where parentid =413;