Re: [sqlite] How To concatenate two fields in one

2008-02-29 Thread Dennis Cote
Alessio Forconi wrote: > > What I would like to achieve is the same as writing in SQL Server > > SELECT IDStudent, Name + " - " + Surname AS Nominative FROM Students > You need to use the SQL standard concatenation operator. SELECT IDStudent, Name || " - " || Surname AS Nominative FROM

Re: [sqlite] How To concatenate two fields in one

2008-02-29 Thread Samuel Neff
SQLite uses '||' as the concatenation operator (which is correct, MSSQL is really wrong to accept '+' and not use '||'). HTH, Sam On Fri, Feb 29, 2008 at 11:52 AM, Alessio Forconi <[EMAIL PROTECTED]> wrote: > > What I would like to achieve is the same as writing in SQL Server > > SELECT IDStude

Re: [sqlite] How To concatenate two fields in one

2008-02-29 Thread Stephen Oberholtzer
On Fri, Feb 29, 2008 at 11:52 AM, Alessio Forconi <[EMAIL PROTECTED]> wrote: > Hello everyone, > > SELECT IDStudent, Name + " - " + Surname AS Nominative FROM Students + is addition. You want ||. Also, you're using double-quotes (") when you should be using single-quotes ('). SELECT IDStudent,

Re: [sqlite] How To concatenate two fields in one

2008-02-29 Thread Igor Tandetnik
Alessio Forconi <[EMAIL PROTECTED]> wrote: > What I would like to achieve is the same as writing in SQL Server > > SELECT IDStudent, Name + " - " + Surname AS Nominative FROM Students SELECT IDStudent, Name || ' - ' || Surname AS Nominative FROM Students Igor Tandetnik ___

Re: [sqlite] How To concatenate two fields in one

2008-02-29 Thread John Stanton
Use the standard SQL || operator for concatenate. The + is not SQL and specific to SQl Server. Alessio Forconi wrote: > Hello everyone, > > This is my first message. > > I have a table called Students: > > IDStudent char(10) PRIMARY KEY, NOT NULL > Name char (30) NOT NULL > Surname char(30) N

[sqlite] How To concatenate two fields in one

2008-02-29 Thread Alessio Forconi
Hello everyone, This is my first message. I have a table called Students: IDStudent char(10) PRIMARY KEY, NOT NULL Name char (30) NOT NULL Surname char(30) NOT NULL What I would like to achieve is the same as writing in SQL Server SELECT IDStudent, Name + " - " + Surname AS Nominative FROM St