Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: SQLite: SELECT Alias FROM ( Select Field1 Alias::<T> FROM Table)



Permlink Replies: 3 - Last Post: Nov 28, 2017 4:06 AM Last Post By: Miroslav BALAZ Threads: [ Previous | Next ]
Miroslav BALAZ

Posts: 4
Registered: 3/16/00
SQLite: SELECT Alias FROM ( Select Field1 Alias::<T> FROM Table)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 26, 2017 12:50 PM
This works:
SELECT * FROM ( select datum AS [x::DATE] from demo )


This ends with error:
[FireDAC].[Phys].[SQLite] ERROR: no such column: x
SELECT x FROM ( select datum AS [x::DATE] from demo )

I have a sample code, but I can not attach it
Is there a solution? well thank you

Edited by: Miroslav BALAZ on Nov 28, 2017 4:04 AM
Lajos Juhasz

Posts: 801
Registered: 3/14/14
Re: SQLite: SELECT Alias FROM ( Select Field1 Alias::<T> FROM Table) - Error?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 26, 2017 11:18 PM   in response to: Miroslav BALAZ in response to: Miroslav BALAZ
Miroslav BALAZ wrote:

This works:
SELECT * FROM ( select datum AS [x::DATE] from demo )


This ends with error:
[FireDAC].[Phys].[SQLite] ERROR: no such column: x
SELECT x FROM ( select datum AS [x::DATE] from demo )

I have a sample code, but I can not attach it
Is there a solution? well thank you

I cannot help with your problem, however I can tell you that you should
upload your example to the Attachment forum. For that you can use the
web interface: https://forums.embarcadero.com/forum.jspa?forumID=2 .
Then you should reply to this post with the referennce where did you
uploaded your example.
Miroslav BALAZ

Posts: 4
Registered: 3/16/00
Re: SQLite: SELECT Alias FROM ( Select Field1 Alias::<T> FROM Table) - Error?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 27, 2017 6:42 AM   in response to: Lajos Juhasz in response to: Lajos Juhasz
Lajos Juhasz wrote:
Miroslav BALAZ wrote:

This works:
SELECT * FROM ( select datum AS [x::DATE] from demo )


This ends with error:
[FireDAC].[Phys].[SQLite] ERROR: no such column: x
SELECT x FROM ( select datum AS [x::DATE] from demo )

I have a sample code, but I can not attach it
Is there a solution? well thank you

I cannot help with your problem, however I can tell you that you should
upload your example to the Attachment forum. For that you can use the
web interface: https://forums.embarcadero.com/forum.jspa?forumID=2 .
Then you should reply to this post with the referennce where did you
uploaded your example.
Allready posted.
[https://forums.embarcadero.com/thread.jspa?threadID=269003]
Thank you, Juhasz :)
Miroslav BALAZ

Posts: 4
Registered: 3/16/00
Re: SQLite: SELECT Alias FROM ( Select Field1 Alias::<T> FROM Table)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 28, 2017 4:06 AM   in response to: Miroslav BALAZ in response to: Miroslav BALAZ
Miroslav BALAZ wrote:
This works:
SELECT * FROM ( select datum AS [x::DATE] from demo )


This ends with error:
[FireDAC].[Phys].[SQLite] ERROR: no such column: x
SELECT x FROM ( select datum AS [x::DATE] from demo )

I have a sample code, but I can not attach it
Is there a solution? well thank you

Edited by: Miroslav BALAZ on Nov 28, 2017 4:04 AM

OK. I accept the existing solution via typecasting alias :
"fieldName::DataType"
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02