First, I should point out that I've never used mysql on Windows.

The manual makes no mention that I can see of system not being supported on the Windows mysql client. On the other hand, Windows is so different that I wouldn't be surprised if system is not supported. A simple test would be to start the Windows mysql client and then enter 'help' to get the list of supported commands and see if 'system' is in the list. If system is supported, then it will still only work if Windows recognizes the command you send it, so 'echo' would have to be valid in Windows.

In any case, system is to be avoided if you want portability, as it depends on the underlying OS. For portability, I'd stick with the "SELECT 'text..' AS COMMENT;" syntax, unless someone suggests something better.

Michael

Richard Mixon (qwest) wrote:

Michael,

Great idea, I can get it to work on SuSE Linux (SLES8 for AMD64) just
fine:
  mysql> SYSTEM echo "Some comments" ;
  Some comments

But on Windows XP (where my user is running that needs this function):
  mysql> SYSTEM echo Some comments ;
  --------------
  SYSTEM echo Some comments
  --------------

  ERROR 1064: You have an error in your SQL syntax.  Check the manual
that corresp
  onds to your MySQL server version for the right syntax to use near
'SYSTEM echo
  Some comments' at line 1
  mysql> SYSTEM "echo Some comments ";
  --------------
  SYSTEM "echo Some comments "
  --------------

  ERROR 1064: You have an error in your SQL syntax.  Check the manual
that corresp
  onds to your MySQL server version for the right syntax to use near
'SYSTEM "echo
   Some comments "' at line 1
  mysql>

Is the SYSTEM command not supported on Windows? I have been unable to
find it documented in the MySQl manual for 4.0.18.

Thanks for your help - Richard



-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to