报表生成器在日期转换时崩溃 [英] Report Builder Crashing on Date Conversion
问题描述
我在查询中有以下代码; 查询在服务器上运行正常,但是当我将查询放入报表生成器中时,它会导致源数据库崩溃并且报表超时。
I have the below code in a query; the query runs fine on the server but when I put the query into Report Builder for a report it crashes the source database and the report times out.
该字段是varchar(30)字段它有多种数据类型,但我只对数据是日期感兴趣; 我知道日期应该存储在日期类型字段中,但不幸的是,这就是我现在所拥有的,因此需要解决这个问题。
The field is a varchar(30) field which has multiple data types but I am only interested in when the data is a Date; I know dates should be stored in a datetype field but unfortunately this is what I have now so therefore need a work around.
推荐答案
您好kf2009
Hi kf2009
根据你的描述,你问题中详细的表结构是什么?
According to your description , what the detailed table structure in your issue ?
你是什么意思varchar(30)字段有多种数据类型,你的意思是varchar(30)字段,您有日期时间内容和其他类型数据 这个字段中的
,对吗?
What do you mean the varchar(30) field have multiple data types , do you mean in the varchar(30) field , you have date time content and other type data in this field ,right ?
如果是这样,那么在你提到的查询中,如果Invoice_udf1字段的类型是varchar(30),则isdate(invoice_udf1)总是如此返回0。
If so ,then in the query you mentioned , if Invoice_udf1 field’s type is varchar(30), isdate(invoice_udf1) always return 0 .
因此,当您想将invoce_udf1转换为datetime时,如果字段中的字符串内容不是datetime的格式,则会导致错误。
So when you want to convert the invoce_udf1 to datetime , if the string content in the field are not the format of the datetime , it would cause the error .
因此,如果可能,请提供有关查询,表格结构和数据样本的详细错误消息给我们以进行更多研究。
So , if possible could you please offer the detailed error message about the query ,the table structure and data sample to us for more further research .
希望你的回复。
最诚挚的问候,
Eric Liu
这篇关于报表生成器在日期转换时崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!