You are requesting the field Column Name (with embedded whitestpace in the 
field name) from a query with a where clause that forces it to be the string 
'Date'.

Perhaps your are looking for SELECT Date ....

-----Ursprüngliche Nachricht-----
Von: MikeSnow [mailto:michael.sab...@gmail.com]
Gesendet: Dienstag, 20. Jänner 2015 14:10
An: sqlite-users@sqlite.org
Betreff: [sqlite] Update Statements using Sub query

I was wondering if anyone could help....
I am trying to use Excel to create update statements based on certain criteria.
For example...this works
UPDATE CDR_Adjusted SET         "DateTime"=DATE||" "||TIME;
(This is what I need, a simple Concat
2013-10-11 7:59
But when I try to do this....

UPDATE CDR_Adjusted SET         "DateTime" =(
           SELECT [Column Name]
             FROM Providers_Import
            WHERE Provider = 'abc'
                  AND
                  Version = '2013-2014'
                  AND
                  [Column Name] = 'Date'
       ) || Time ;"

I get this....
Date || Time

Not the update, I would expect above
(In the table Providers_Input, the value in the [Column Name] is 'Date')

Thanks is advance




--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/Update-Statements-using-Sub-query-tp80175.html
Sent from the SQLite mailing list archive at Nabble.com.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


___________________________________________
 Gunter Hick
Software Engineer
Scientific Games International GmbH
FN 157284 a, HG Wien
Klitschgasse 2-4, A-1130 Vienna, Austria
Tel: +43 1 80100 0
E-Mail: h...@scigames.at

This communication (including any attachments) is intended for the use of the 
intended recipient(s) only and may contain information that is confidential, 
privileged or legally protected. Any unauthorized use or dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please immediately notify the sender by return e-mail message and 
delete all copies of the original communication. Thank you for your cooperation.


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to