Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: dbi odbc return string getting truncated

by afoken (Chancellor)
on Aug 07, 2019 at 18:42 UTC ( [id://11104111]=note: print w/replies, xml ) Need Help??


in reply to Re^2: dbi odbc return string getting truncated
in thread dbi odbc return string getting truncated

I was astonished at first, too, but "AS" probably is optional. Don't know about OP's database, but for SQLite, it is for the result column (not in CAST, though).

Yes, that's standard SQL. The AS in column-or-expression AS alias is optional.

My next question would be: what table or column definitions are used when there is no "FROM"?

None.

SELECT 42 AS RESULT

is perfectly legal SQL. It returns a single row with - in this case - a single column with a type matching the type of the expression left of AS. Only Oracle insists on a table or view, and it has a dummy table called DUAL for exactly that purpose. So, Oracle wants

SELECT 42 AS RESULT FROM DUAL

See also DUAL_table, Selecting from the DUAL table.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11104111]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-03-29 02:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found