如何将表格表计数结果保存到变量中? [英] How to save a tabular table count result into a variable?

查看:98
本文介绍了如何将表格表计数结果保存到变量中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我想做这样的事情:


让tablecount = AzureDiagnostics | count;


Count运算符实际上返回一个名为Count的单个表,其单行值为N.我想要做的是将N保存到变量tablecount用于进一步的条件操作,但该语句将一行一列
表传递给tablecount .. 


有谁知道怎么做这项工作?提前谢谢你!



祝你好运。

解决方案


是的,这是可能的。该值需要转换为标量。


示例:


让tablecount = toscalar(AzureDiagnostics |
count );

Hi,

I want to do something like this:

let tablecount = AzureDiagnostics | count;

The Count operator is actually returning a table with a single column called Count and its one-row value is N. What I want to do is save N into the variable tablecount for further conditional operations, but the statement is passing the one-row-one-column table to tablecount.. 

Does anyone know how to get this work? Thank you in advance!

Best regards.

解决方案

Hi,

Yes this is possible. The value needs to be converted to scalar.

Example:

let tablecount = toscalar(AzureDiagnostics | count) ;


这篇关于如何将表格表计数结果保存到变量中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆