datarow select .Erreur de syntaxe:opérandemanquantaprèsl'opérateur'WHERE'。 [英] datarow select .Erreur de syntaxe : opérande manquant après l'opérateur 'WHERE'.
本文介绍了datarow select .Erreur de syntaxe:opérandemanquantaprèsl'opérateur'WHERE'。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试选择特定设备的日期的最大值,但是我得到的错误是操作员在操作员之后缺失,其中。
i''m trying to select the max of a date of a specific device,but i''m getting the error "the operand is missing after the operator "where".
max=t.GetData().Select("MAX(time) WHERE EQUIPEMENT_REF='mydevice'")[0].ItemArray[1].ToString();
感谢您的帮助
thanks for your help
推荐答案
我解决了这个问题,首先如果你需要放置的不仅仅是你需要放置的critere,第二个是为了得到一个特定设备的最大日期我必须对结果进行排序并选择第一个< br $>
i solved the problem ,first of all if you need to put more than critere you have to put and between,second for to get the max date for a specfic device i had to sort the result and choose the first one
max = o.GetData().Select("equipement_ref='mydevice'","time DESC")[0].ItemArray[1].ToString();
min = o.GetData().Select("equipement_ref='mydevice'", "time ASC")[0].ItemArray[1].ToString();
这篇关于datarow select .Erreur de syntaxe:opérandemanquantaprèsl'opérateur'WHERE'。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文