FAILED: ParseException line 1:2 cannot acknowledge input near' ('Select' *'
said he.What's wrong?
(
Select
*
, Cast(Concat(Substr(timestamp, 1, 4), '-', Substr(timestamp, 5, 2), '-', Substr(timestamp, 7, 2), '', Substr(timestamp, 9, 2), ':', Substr(timestamp, 11, 2), ':', Substr(timestamp, 13, 2), _ Ascamp)))
From
test
Where
st = '${env:20151001}'
And '${env:lastDate}'<=Substr(timestamp, 1,8)
And Substr(timestamp, 1,8)<='${env:1101}'
And Substr(timestamp, 1,8)<= Substr(up_time, 1,8)
)axis
Is it correct that the SQL execution engine here is Hive?
If you don't use this query as a subquery, I think it will work if you write it as follows.
Select
*
, Cast(Concat(Substr(timestamp, 1, 4), '-', Substr(timestamp, 5, 2), '-', Substr(timestamp, 7, 2), '', Substr(timestamp, 9, 2), ':', Substr(timestamp, 11, 2), ':', Substr(timestamp, 13, 2), _ Ascamp)))
From
test
Where
st = '${env:20151001}'
And '${env:lastDate}'<=Substr(timestamp, 1,8)
And Substr(timestamp, 1,8)<='${env:1101}'
And Substr(timestamp, 1,8)<= Substr(up_time, 1,8)
If you want to give the results of this query to other queries, you can write them as you have asked, but you will need a higher-level query.
SELECT
axis.hoge
from
(
-- Query questions
)axis
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
620 Uncaught (inpromise) Error on Electron: An object could not be cloned
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
917 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.