Migrating from MSSql...

Started by Alexander Wallaceover 24 years ago2 messagesgeneral
Jump to latest
#1Alexander Wallace
awallace@rwsoft-online.com

Hi there! I just started using postgres and I'm loving it. I really want
to go all open source at the office... I have a database in MSSQL which
I was able to export succesfully using the DTServices... But the client
application which contains a lot of SQL statements crashes every now and
then becouse of sql syntax...

Most of the problems I've benn able to fix, but there are a couple I
would like to ask about:

I have some querys that go like:

SELECT FirstName + ' ' + LastName AS [Customer Name] FROM tblCustomers

How should I write something that does the same (joins both fields with
a space in the middle and calls the resulting field 'Customer Name') in
a way that postgreSQL can understand?

Thanks to all in advance!

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alexander Wallace (#1)
Re: Migrating from MSSql...

Alexander Wallace <awallace@rwsoft-online.com> writes:

SELECT FirstName + ' ' + LastName AS [Customer Name] FROM tblCustomers

Postgres follows the ANSI SQL spec, which says that the string
concatenation operator is || not +.

regards, tom lane