Improve sql formatter tool

This commit is contained in:
Illya Marchenko 2023-12-15 13:18:40 +02:00
parent d3a281aab5
commit bc576c17b0
Signed by: stuzer05
GPG Key ID: A6ABAAA9268F9F4F

@ -22,23 +22,7 @@ export default {
data() { data() {
return { return {
toolData: { toolData: {
data: 'SELECT K.ID, SUM(DV.KOL*DV.TYPEMOVE) AS LK, K.TOVAR, KT.KATEGORY, K.CENAUSD, K.CENA, K.BESTBEFORE, K.KARTASER\n' + data: '',
' FROM $f" . "KARTA K, $f" . "DVIVTOV DV, TOVARY T, KATEG KT\n' +
' WHERE (K.SKLAD=$sklad) AND (K.TOVAR=T.TOVAR) AND (T.KATEGORY=KT.KATEGORY)\n' +
' AND (DV.NKARTA=K.ID)\n' +
' AND (DV.CURDATE < " . $conn->DBDate(ReversDateStrPar($operdata)) . ")\n' +
' AND (K.ID={$rs->fields[1]})\n' +
' GROUP BY K.ID, K.TOVAR, KT.KATEGORY, K.CENAUSD, K.CENA, K.BESTBEFORE, K.KARTASER\n' +
' HAVING SUM(DV.KOL*DV.TYPEMOVE)>=0.000001\n' +
' ORDER BY K.TOVAR;' +
'' +
'SELECT\n' +
' test\n' +
'FROM\n' +
' test t\n' +
'WHERE\n' +
' t.date <= to_date (\'" . date(\'Y-m-d\') . "\', \'YYYY-MM-DD\')\n' +
' and t.date <= to_date (\'" . date(\'Y-m-d\') . "\', \'YYYY-MM-DD\')',
minifyJson: '', minifyJson: '',
}, },
toolResult: '', toolResult: '',