EA 6.1.1.2 Comments generate warnings when loading SELECT into QB
a
anonymous
started a topic
over 16 years ago
[This topic is migrated from our old forums. The original author name has been removed]
Title says it all, I had a multi line SQL Commander buffer containing the following:
--explain
select P.disp_name as 'Service', SO.val as 'From', SN.val as 'To'
from procnames P, settings SN, settings SO, d_home H, s_safe F
-- d_home H
-- join s_safe F on H.FK_pid=F.FK_pid and F.FK_sid H.FK_sid
-- join procnames P on F.FK_pid=P.id
where
H.FK_pid=F.FK_pid and F.FK_sid H.FK_sid
and F.FK_pid=P.id
and F.FK_sid=SN.id
and H.FK_sid=SO.id
and SN.val 'Not Installed'
and substring_index(SO.val, ' *', 1) substring_index(SN.val, ' *', 1)
order by P.disp_name;
--show warnings;
I got the following warnings (a cut and paste from the warnings window), IMHO comments should be silently disregarded but note also that the 3rd line of warning output is mangled compared to the original output
The keywords and literals below were ignored, because they are
not recognized where they appear and will be excluded from the
SQL generated by the Query Builder. Please verify that the
Query Builder content is still correct.
Also note that comments are ignored and excluded from the SQL
generated by the Query Builder
-- explain
-- d_home H
H . FK_sid
-- JOIN procnames P ON F . FK_pid = P . id
[This reply is migrated from our old forums. The original author name has been removed]
Re: EA 6.1.1.2 Comments generate warnings when loading SELECT into QB
OOops cut and paste botch, somethingseems to have omitted the sequence '' 3 times?
The cde extract should have been
--explain
select P.disp_name as 'Service', SO.val as 'From', SN.val as 'To'
from procnames P, settings SN, settings SO, d_home H, s_safe F
-- d_home H
-- join s_safe F on H.FK_pid=F.FK_pid and F.FK_sid H.FK_sid
-- join procnames P on F.FK_pid=P.id
where
H.FK_pid=F.FK_pid and F.FK_sid H.FK_sid
and F.FK_pid=P.id
and F.FK_sid=SN.id
and H.FK_sid=SO.id
and SN.val 'Not Installed'
and substring_index(SO.val, ' *', 1) substring_index(SN.val, ' *', 1)
order by P.disp_name;
--show warnings;
a
anonymous
said
over 16 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: EA 6.1.1.2 Comments generate warnings when loading SELECT into QB
OK, I give up, your forum s/w is omitting the sequence ''
Hans Bergsten
said
over 16 years ago
[This reply is migrated from our old forums.]
Re: EA 6.1.1.2 Comments generate warnings when loading SELECT into QB
Hi Ed,
Sorry about that. It's frustrating with software that's trying to be too smart ...
Can you put the complete source in a text file and upload it instead? Or mail it to us: support@minq.se?
Thanks,
Hans
a
anonymous
said
over 16 years ago
[This reply is migrated from our old forums. The original author name has been removed] [Attachment has been removed.]
Re: EA 6.1.1.2 Comments generate warnings when loading SELECT into QB
The attached text file contains a query which I have stored in a bookmark.
If I load this into the query builder I get warnings about embedded comments. The text from the warning box is also in the text file. Note also that the warning prints one of the comment lines incorrectly.
IMHO, standard SQL comments should be silently disregarded as they would be by an SQL interpreter/compiler and if you are going to generate warnings then the source lines printed should echo the input lines exactly.
Ed
Hans Bergsten
said
over 16 years ago
[This reply is migrated from our old forums.]
Re: EA 6.1.1.2 Comments generate warnings when loading SELECT into QB
Thanks Ed,
The truncation of one of the comments was due to formatting problems in the warning dialog for strings containing special characters like "<>". This will be fixed in the next version.
I see your point about silently ignoring the comments, but it may not be obvious to everyone that they are ignored and therefore do not appear again in the SQL generated by the Query Builder. We will therefore continue to warn about ignored comments.
While fixing this, I also found that the "substring_index(SO.val, ' *', 1)" expression got mangled into "substring_index 1(SO.val, ' *', )." This will also be fixed in the next version.
Kind Regards,
Hans
Roger Bjärevall
said
over 16 years ago
[This reply is migrated from our old forums.]
Re: EA 6.1.1.2 Comments generate warnings when loading SELECT into QB
Ed,
Just to inform you that this is fixed in the just released 6.0.11 version.
http://www.minq.se/products/dbvis/doc/relnotes/index.jsp?version=6.0.11
Best Regards
Roger
anonymous