Functions in Stored procedures aere sometimes read displayed
Functions in Stored procedures aere sometimes read displayed
Some functions in my stored procedures are highlited red. Does it means the function does not exists. It's still compiling, but I don't see the result of the function.
Could you, please, send us some information:
* screenshots that describe this problem or DDL text of your procedure
* full MySQL server version
* full version of dbForge Studio for MySQL.
If this information is confidential or is very large, you can send it to our support center at http://www.devart.com/dbforge/mysql/studio/support.html .
* screenshots that describe this problem or DDL text of your procedure
* full MySQL server version
* full version of dbForge Studio for MySQL.
If this information is confidential or is very large, you can send it to our support center at http://www.devart.com/dbforge/mysql/studio/support.html .
I did some tests and I was wrong about some functions. All it's works except CONVERT() and CAST(), but typecasting does MySQL by itself. The only thing I find strange is some function are displayed red.
example:
I'm using version 3.6x
example:
Code: Select all
PROCEDURE casten()
BEGIN
DECLARE kostnr CHAR(2);
DECLARE datum CHAR (10) DEFAULT '2009-08-30';
DECLARE intkostnr INT;
DECLARE dtDatum DATE;
DECLARE jaar, difdays INT;
DECLARE strjaar CHAR(4);
DECLARE l_april8_char CHAR(10);
DECLARE l_april8 DATE;
SET kostnr = '2';
SET intkostnr = kostnr;
SET dtDatum = STR_TO_DATE(datum,'%Y-%m-%d'); /*function STR_TO_DATE is red */
SET jaar = YEAR(now()) - 1; /*function NOW is red and function YEAR is blue */
SET strjaar = jaar;
SET l_april8_char = CONCAT(strjaar,'-04-07'); /*function CONCAT is red */
SET l_april8 = STR_TO_DATE(l_april8_char,'%Y-%m-%d'); /*function STR_TO_DATE is red */
SET difdays = DATEDIFF(NOW(),l_april8); /*function DATEDIFF and NOW is red */
SELECT kostnr, intkostnr,dtDatum, strjaar, l_april8, difdays;
STR_TO_DATE is highlighted by the red color because this color was chosen for highlighting built-in functions (Tools -> Options -> Text Editor -> Fonts & Colors). YEAR is highlighted by the blue color because this word is used not only as a built-in function, but also as a keyword in certain SQL statements.
Errors in SQL documents are underlined by a wavy line only.
Errors in SQL documents are underlined by a wavy line only.