Parser LEFT something error

Eliarh posted 3 years ago in General

before autoformat

SELECT CONCAT(LEFT(u.fio, LOCATE(" ", SUBSTRING_INDEX(u.fio," ",2))+1)) fio

after autoformat

LEFT(u.fio, LOCATE(" ", SUBSTRING_INDEX(u.fio," ",2))+1)) fio
Eliarh posted 1 month ago


ansgar posted 1 month ago


You should describe your problem more exactly. Noone wants to guess about the issue here.

Eliarh posted 1 month ago

Why is the string wrapped? "LEFT "is a function, not"LEFT JOIN". In my opinion, the transfer should not be carried out.

ansgar posted 1 month ago

Yes, that's an issue in the quite simple pretty-print parser - it expects LEFT to be part of a JOIN.

It's probably worth to look for some external pretty-print library, which I can make use of in HeidiSQL's Delphi code. Do you know of some?

Please login to leave a reply, or register at first.