如果获取一个表列的最大值..
2005-08-05 13:36
267 查看
DataRow[] drs = ds.Tables["a"].Select("Quantity = MAX(Quantity)");
if (drs.Length > 0)
Console.WriteLine(drs[0]["Quantity"]);
Dim dt As DataTable = CType(DataGrid1.DataSource, DataTable)
Dim dr As DataRow() = dt.Select("2>1", "id Desc")
Debug.WriteLine(dr(0).Item("ID"))
if (drs.Length > 0)
Console.WriteLine(drs[0]["Quantity"]);
Dim dt As DataTable = CType(DataGrid1.DataSource, DataTable)
Dim dr As DataRow() = dt.Select("2>1", "id Desc")
Debug.WriteLine(dr(0).Item("ID"))
相关文章推荐
- 华为:给定一个数组input[],如果数组长度n为奇数,则将数组中最大的元素放到 output[]数组最中间的位置,如果数组长度n为偶数。。
- SQL 分组后获取其中一个字段最大值的整条记录
- 定义一个数组,获取数组中的最大值和最小值
- MVC中,如果从controller返回的不是一个html,而是一个文本,使用AJAX中如何获取?
- 华为:给定一个数组input[],如果数组长度n为奇数,则将数组中最大的元素放到 output[]数组最中间的位置,如果数组长度n为偶数。。 .
- 从字符中随机获取一个字符,提示用户输入数字,或是大写字母,或是小写字母,如果用户猜的数字正确,提示用户,恭喜你猜对了,否则提示输入大了或者输入小了
- 编写一个程序,对用户输入的任意一组数字字符如{3,1,4,7,2,1,1,2,2},输出其中出现次数最多的字符,并显示其出现次数。如果有多个字符出现次数均为最大且相等,则输出最先出现的那个字符和它出现
- 如果给定一个数组arr[0,...N-1],要求找出相邻两个数的最大差值
- VBS中如何获取一个数组中最大值的位置?
- js中如果无法获取某个html属性,例如自定义了一个dir属性,但获取总是为空,尝试换个词,因为可能什么关键词冲突了。
- 获取一个数组内的最大最小值
- 一棵排序二叉树,令 f=(最大值+最小值)/2,设计一个算法,找出距离f值最近、大于f值的结点。 复杂度如果是O(n2)则不得分。
- 已知一个int数组, 编程从数组中获取最大数
- 使用可编辑JComboBox的时遇到的一个坑,编辑后如果JCombobox的焦点还在,则获取不到当前的编辑值。
- 定义一个数组工具类!数组选择排序、冒泡排序、获取最大、最小值!
- 当多个activity需要向一个activity带参跳转的时候如果Activity没有被销毁,要重新新建一个Intent保证获取的是最新数据
- swift 获取一个数组中的最大值
- java——获取一个应用程序运行的次数,如果超过5次,给出使用次数已到请注册的提示,并不要再运行程序
- 算法兴趣----- 一亿数据获取前100个最大值(仅供参考,基于快速排序的实现时间不稳定,基于最小堆实现。如果我们只要求前K个最大(小)值的时候,用堆是最好的选择,因为这里不用每次都排序了)
- C++中获取一个原生数据类型能表示的最大值