???

SELECT 'asdf' . 'qwer'

...gives "Error Code : 1064, You have an error in your SQL syntax..."

I also can't find any reference to this use of periods in the docs.

Have you tried it? Can you point me to something that says it ought to work?
BTW, I'm trying this w mysql 4.1.7-nt-max on win2k, if it matters.


Also, part of my question was about standards, and it appears that I was
being ignorant. Found this:

---------
The ANSI SQL concatenation operator is "||" used in Oracle, DB2 and others.
The + string concatenation operator in SQL Server is not portable to other
RDBMSs.
---------

That was here, in an excerpt from a book on SQL Server:
  http://www.informit.com/articles/article.asp?p=327992&seqNum=3

Looks like I was brought up in Microsoft's little corner of the world,
mistaking their "standards" for actual standards. Typical Micro$oft
intentional disruption.

But it appears that MySQL doesn't support "||" either, and neither does SQL
Server. So much for anyone other than customers caring about standards.
Writing platform agnostic sql seems much less likely than I'd guessed, even
on a very basic level.

Dave Merrill


> The period is used to concatenate so replace your concatenate plus with a
> period.
>
> > I'm just starting to look at MySQL, been working w SQL Server.
> >
> > I just noticed that in MySQL, you can't concatenate strings
> with '+', like
> > you can in SQL Server. In other words, in SQL Server
> > SELECT 'asdf' + 'qwer'
> > gives 'asdfqwer', but in MySQL, it gives 0. For MySQL, you seem
> to have to
> > use CONCAT.
> >
> > I'm very surprised. Not only is this really really common operation much
> > more awkward in MySQL, but I thought string concatenation w '+' was
> totally
> > standard SQL.
> >
> > Not so? Is there some db option to allow it?
> >
> > Dave Merrill



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

Reply via email to