I was given a query to run (connecting to Azure Data Lake). I want to be able to toggle to the Visual Query Editor to potentially add additional fields but when I try and toggle I receive the following error message
Attached is part of the query |
Solved! Go to Solution.
Just a guess...
On line 7, add the word as before duration
See https://docs.microsoft.com/en-us/u-sql/operators/arithmetic/subtract
Google: azure data lake syntax subtraction
Chris
@ChrisTX _ i know this sounds stupid but what does the AS (alias) do to the query?
The "as" gives the field a name
In your SELECT you have
req.timestamp - req.submittime duration
The first part is the calculation, and the "duration" is the name of the field that will be returned from the SELECT ("duration" is the result of req.timestamp - req.submittime).
Some SQL syntax requires the word "as" before the field name.
Example: SELECT Field1 as 'A', Field2 as 'B', Field3 as 'C'
would return the database field names Field1, Field2, Field3 with the column names A,B,C
Chris