Displaying 2 results from an estimated 2 matches for "which_year".
2006 Jan 17
2
How to run direct sql
How can i run and get the value from the following sql:
select avg(my_field) from my_table where which_year=''0506'' and
which_week <= 21 and my_foreign_key_id=10
cheers
--
Posted via http://www.ruby-forum.com/.
2006 Jul 26
7
Delete_all causes a deadlock on MSSQL database ???
...if ''reason_'' == key[0,7]
pc,what = key[7,99].split ''_''
if '''' == reason
# delete this one
MissingEntriesReason.destroy_all \
"profit_centre_id = #{pc} AND which_month =
#{params[:month]} and which_year = ''#{params[:f_year]}'' and
what=''#{what}''"
# can''t use delete_all - this causes a deadlock in the
database !??!
else
# save this one
r =
MissingEntriesReason.find_or_create_by_profit_centre_id_and_which_month_...