如何获取交易的最新日期 [英] How to get latest date of a transaction

查看:79
本文介绍了如何获取交易的最新日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我有一个存储过程,每天都会将其存储在文件中.我有一个todate列,
现在,我想进行更改,以获取[todate]列(交易的最后一天).怎么做.

Plz可以给我提供使交易的最后一天进入最新列的逻辑吗?

Hello

I have a stored procedure, which on every day gets printed in a file. i have a todate column,
Now i wan''t to make changes in which the [todate] column (last day of transaction) is also should be fetched. how to do it.

Plz can any one give me the logic for getting the last day of transaction into todate column

推荐答案

如果您想获取ToDate字段,则需要添加将其放入SELECT列表,如下所示:
If you would like to fetch ToDate field, you need to add it into SELECT list, like this:
SELECT [Column1], [Column2], [Column3], [ColumnN], ..., [ToDate]
FROM YourTable
WHERE [ToDate] <= GETDATE()


这篇关于如何获取交易的最新日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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