Bug ?: Character to numeric error in SQL query
Posted in 1999
Topics: SQL Development & Query Writing
I used to be able to to the following request in SE 4.10: select w.work_num,s.sort_name,w.date_created,q.quote_date,t.date,s.inst_date, w.date_required from site s,work_h w,work_l l,quote_h q,translog t where w.work_type = "WTI" and l.work_num = w.work_num and q.ship_num = l.ship_num and q.work_num = l.work_num and s.sort_name = l.ship_num and s.inst_date > "05/01/1996" and t.doc_typ = "QUO" and t.doc_num = q.quote_num; But now in SE 7.10 I get: # 1213: Character to numeric conversion error This is because of the last line in the query: t.doc_num is a char(10) and q.quote_num is an integer SE will no longer do an implicit conversion of integer to character. Should this be considered a bug since it used to work in SE 4.10 ? Thanks for your input, Chris
Christian, I just tried doing a join between a char(10) column and an integer column in On-Line v.7.23.UC7, and it worked. You may want to double-check the contents of that char(10) column to ensure that NO rows have non-numeric characters in that column. Perhaps one row like that snuck in. That would cause that error. Kind regards, John Bejarano. Christian Allaire wrote in message <7ieblf$k50$1@news.xmission.com>... > >I used to be able to to the following request in SE 4.10: > >select >w.work_num,s.sort_name,w.date_created,q.quote_date,t.date,s.inst_date, >w.date_required >from site s,work_h w,work_l l,quote_h q,translog t >where w.work_type = "WTI" > and l.work_num = w.work_num > and q.ship_num = l.ship_num > and q.work_num = l.work_num > and s.sort_name = l.ship_num > and s.inst_date > "05/01/1996" > and t.doc_typ = "QUO" > and t.doc_num = q.quote_num; > >But now in SE 7.10 I get: > ># 1213: Character to numeric conversion error > >This is because of the last line in the query: >t.doc_num is a char(10) and q.quote_num is an integer > >SE will no longer do an implicit conversion of integer to character. >Should this be considered a bug since it used to work in SE 4.10 ? > >Thanks for your input, > >Chris >