开发者

Temporary tables in Crystal Reports

i have sql building a temporary table. it runs fine in SQL server management studio, but as soon as i put it into the crystal report add command feature it doesnt work. i have found that it is not working when it try and update the table with this line of code.

declare @newDate datetime
select @newDate = MIN(r.DateTimeStamp)
 from StationInspection as si
left outer join
    @report_out as r
on r.InspectionID = si.InspectionID
where r.Station = 2     


UPDATE @re开发者_开发技巧port_out 
 set
DateTimeStamp = @newDate
where Station = 2

i am just not sure why that made Crystal Reports not accpet it any long


You might try moving the update statement before the select statement to see if it will output data. I could be wrong, but I'd assume that the command is expecting an output of a table/select statement and it may be trying to output the results of the update statement (ie. "N Rows Affected"). Hope this helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜