我在尝试在我的sql请求中添加条件时遇到问题
我想添加一个条件,即DATEADD(day, DATEDIFF(day, 0, GETDATE()), 0)
和current date until 23:59:59
之间的日期。
如何指定条件的第二部分?
谢谢。
答案 0 :(得分:2)
你可以使用谓词:
someDate < dateadd(dd, 1, cast(getdate() as date))
答案 1 :(得分:0)
我通常会选择以下内容:
struct QueueCommand
{
std::vector<std::string>QCmd;
std::vector<float>timeValue;
};
int _tmain(int argc, _TCHAR* argv[])
{
std::string str = "command1|1.0"
std::string str1 = "command2|2.0"
QueueCommand q;
boost::split( q,str,boost::is_any_of("|")); // need to fill Qcmd and timevalue
boost::split( q,str1,boost::is_any_of("|"));
return 0;
}