On 24 Apr 2012, at 5:35pm, Tim Tessier <[email protected]> wrote:

> I am sure this question has been asked before, but there appears to be an
> issue with applying the || character in a view or select statement in order
> to concat two columns in the output.
> 
> Table Example
> 
> Column1 Column2
> this         that
> then        its
> 
> SELECT Column1 || ' ' || Column2 as Column FROM TableExample
> 
> In my specific example I am trying to concat a first name and last name
> into a fullname. I would simply create my own view with the console app,but
> i appear to have encrypted this.

163:~ simon$ sqlite3 ~/Desktop/temp.sql
SQLite version 3.7.10 2012-01-03 21:54:09
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> CREATE TABLE myTable (id INTEGER, Column1, Column2);
sqlite> INSERT INTO myTable VALUES (1, 'this', 'that');
sqlite> INSERT INTO myTable VALUES (2, 'then', 'its');
sqlite> SELECT Column1 || ' ' || Column2 FROM myTable;
this that
then its
sqlite> 

What's your problem ?

Simon.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to