migrating from MSSql

Started by PostgreSQL List Userover 24 years ago6 messagesgeneral
Jump to latest
#1PostgreSQL List User
pguser@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!

#2Stephan Szabo
sszabo@megazone23.bigpanda.com
In reply to: PostgreSQL List User (#1)
Re: migrating from MSSql

On Tue, 20 Nov 2001, PostgreSQL List User wrote:

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?

select FirstName || ' ' || LastName AS "Customer Name" FROM tblCustomers
should do it.

#3Thomas T. Thai
tom@minnesota.com
In reply to: PostgreSQL List User (#1)
Re: migrating from MSSql

On Tue, 20 Nov 2001, PostgreSQL List User wrote:

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

in place of the + use the concat operator ||
you can find further help in the 'string' section in the user doc.

#4Jason Earl
jason.earl@simplot.com
In reply to: PostgreSQL List User (#1)
Re: migrating from MSSql

SELECT FirstName || ' ' || LastName AS "Customer Name" FROM tblCustomers;

Should do what you want.

PostgreSQL List User <pguser@rwsoft-online.com> writes:

Show quoted text

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!

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

#5Tommi Maekitalo
t.maekitalo@epgmbh.de
In reply to: PostgreSQL List User (#1)
Re: migrating from MSSql

Hi,

use:
SELECT FirstName || ' ' + || LstName AS "Customer Name" FROM tblCustomers

Tommi

PostgreSQL List User wrote:

Show quoted text

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!

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

#6PostgreSQL List User
pguser@rwsoft-online.com
In reply to: Stephan Szabo (#2)
THANKS! Was: Re: migrating from MSSql

Thanks to all of you! I got a lot of responses and very fast! Which is
great! Again thanks! This certainly looks like a great list...

Alex.

On Tue, 20 Nov 2001, Stephan Szabo wrote:

Show quoted text

On Tue, 20 Nov 2001, PostgreSQL List User wrote:

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?

select FirstName || ' ' || LastName AS "Customer Name" FROM tblCustomers
should do it.