'在MsSql新建。
Mysql命令是
EXEC('SELECT '+@columnnames +' From WindData Where
(TimeStamp between '''+@startdate+''' and '''+@finishdate+''')
and (DATEPART(second,TimeStamp) = ''00'')
and (DATEPART(minute,TimeStamp) = ''15''
or DATEPART(minute,TimeStamp) = ''30''
or DATEPART(minute,TimeStamp) = ''45''
or DATEPART(minute,TimeStamp) = ''00''
)
order by TimeStamp')
我的Sql查询无效。我想我不使用正确和/或联合。 请帮帮我。