我在Ruby中使用以下查询:
mcuglist = Balsiebeltogenevaprodmapping.find_by_sql ["select * from master_cug_list where customer_ref = ? and product_seq = ? and end_date = ? and line_seq is null order by directory_number",bseq_11.customer_ref,bseq_11.product_seq,(accdtlmap.start_dat.to_date + 9).strftime('%Y-%m-%d')]
它给了我标题中给出的错误:(full) year must be between -4713 and +9999, and not be 0
。
如何了解如何将date
传递给find_by_sql query
?