|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
query mistakeI wrote the following query however when I run it I am getting a domain error message(possible something to do with the logs.) Can anyone spot a mistake. Note that the values that are being "logged" are all greater than 0. The query. SELECT identity(int,1,1) as 'id', c.id as 'coupling', c.place1 as 'place1', c.place2 as 'place2', p.short as 'product', p.iocode as 'prodid', '2003' as 'year', EXP( LOG(l2.totdem) + LOG(l1.[output]) - (p.grav1 * LOG(c.roaddis))) as 'value' INTO flow FROM coupling c join place p1 on p1.key_id = c.place1 join locprodyr l1 on l1.place = p1.nuts4 join place p2 on p2.key_id = c.place2 join locprodyr l2 on l2.place = p2.nuts4 join product p on p.short = l1.product and p.short = l2.product order by prodid, place1, place2 The error message: Msg 3623, Level 16, State 1, Line 4 A domain error occurred. Thanks in advance Rob |
|||||||||||||||||||||||