开发者

Temporary tables in Crystal Reports

开发者 https://www.devze.com 2023-03-11 12:55 出处:网络
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 wor

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

精彩评论

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

关注公众号