SOLVED

unable to use let in log analytics query "No tabular expression statement found"

%3CLINGO-SUB%20id%3D%22lingo-sub-1148612%22%20slang%3D%22en-US%22%3Eunable%20to%20use%20let%20in%20log%20analytics%20query%20%22No%20tabular%20expression%20statement%20found%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1148612%22%20slang%3D%22en-US%22%3E%3CP%3ECreating%20a%20simple%20variable%20using%20let%20fails%20with%20%22%3CSPAN%3ENo%20tabular%20expression%20statement%20found%22%20my%20code%2C%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3Elet%20myvar%3D4%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3Ewhy%20can%20i%20not%20do%20this%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1148612%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Log%20Analytics%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1148627%22%20slang%3D%22en-US%22%3ERe%3A%20unable%20to%20use%20let%20in%20log%20analytics%20query%20%22No%20tabular%20expression%20statement%20found%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1148627%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F543573%22%20target%3D%22_blank%22%3E%40dahund79%3C%2FA%3E%26nbsp%3BCan%20you%20be%20more%20explicit%3F%20How%20are%20you%20using%20'myvar'%20in%20the%20query%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1148646%22%20slang%3D%22en-US%22%3ERe%3A%20unable%20to%20use%20let%20in%20log%20analytics%20query%20%22No%20tabular%20expression%20statement%20found%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1148646%22%20slang%3D%22en-US%22%3EHey%2C%20i%20am%20not%20Really%20using%20it%20just%20trying%20to%20create%20a%20variable%2C%20for%20testing.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1148785%22%20slang%3D%22en-US%22%3ERe%3A%20unable%20to%20use%20let%20in%20log%20analytics%20query%20%22No%20tabular%20expression%20statement%20found%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1148785%22%20slang%3D%22en-US%22%3E%3CA%20href%3D%22https%3A%2F%2Fms.portal.azure.com%23%4072f988bf-86f1-41af-91ab-2d7cd011db47%2Fblade%2FMicrosoft_Azure_Monitoring_Logs%2FDemoLogsBlade%2FresourceId%2F%252FDemo%2Fsource%2FLogsBlade.AnalyticsShareLinkToQuery%2Fq%2FH4sIAAAAAAAAA8tJLVHIrSxLLLI1seZyLUvNK%25252BGqUSgoys9KTYZKcAEAlbG6ViMAAAA%25253D%2Ftimespan%2FP1D%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fms.portal.azure.com%23%4072f988bf-86f1-41af-91ab-2d7cd011db47%2Fblade%2FMicrosoft_Azure_Monitoring_Logs%2FDemoLogsBlade%2FresourceId%2F%252FDemo%2Fsource%2FLogsBlade.AnalyticsShareLinkToQuery%2Fq%2FH4sIAAAAAAAAA8tJLVHIrSxLLLI1seZyLUvNK%25252BGqUSgoys9KTYZKcAEAlbG6ViMAAAA%25253D%2Ftimespan%2FP1D%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3Elet%20myvar%3D4%3B%3CBR%20%2F%3EEvent%3CBR%20%2F%3E%7C%20project%20myvar%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3EThis%20works%2C%20what%20are%20you%20trying%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1149963%22%20slang%3D%22en-US%22%3ERe%3A%20unable%20to%20use%20let%20in%20log%20analytics%20query%20%22No%20tabular%20expression%20statement%20found%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1149963%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F543573%22%20target%3D%22_blank%22%3E%40dahund79%3C%2FA%3E%26nbsp%3BSimply%20declaring%20the%20variable%20will%20fail%20since%20it's%20not%20being%20used%20in%20a%20query.%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F239477%22%20target%3D%22_blank%22%3E%40Clive%20Watson%3C%2FA%3E%26nbsp%3B's%20example%20above%20shows%20how%20to%20potentially%20use%20the%20variable%20in%20a%20query.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1150021%22%20slang%3D%22en-US%22%3ERe%3A%20unable%20to%20use%20let%20in%20log%20analytics%20query%20%22No%20tabular%20expression%20statement%20found%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1150021%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F151992%22%20target%3D%22_blank%22%3E%40Scott%20Allison%3C%2FA%3E%20apparently%20so%20its%20working%20now%20thx.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Microsoft

Creating a simple variable using let fails with "No tabular expression statement found" my code,

 

let myvar=4;

 

why can i not do this

5 Replies

@dahund79 Can you be more explicit? How are you using 'myvar' in the query?

Hey, i am not Really using it just trying to create a variable, for testing.
best response confirmed by dahund79 (Microsoft)

@dahund79 Simply declaring the variable will fail since it's not being used in a query. @Clive Watson 's example above shows how to potentially use the variable in a query.