jteixeira Posted November 17, 2006 Share Posted November 17, 2006 Update Infofin_prodset precoprod=(dinheiroprod/vendasprod)where(Select Infofin_prod.maquinaid,nicname,vendasprod,dinheiroprod,precoprod From Infofin_prod INNER JOIN Maquina on maquina.maquinaid=Infofin_prod.Maquinaid Where(precoprod*vendasprod)<>dinheiroprod)*/ For some reson it doesn't work Link to comment Share on other sites More sharing options...
aspnetguy Posted November 17, 2006 Share Posted November 17, 2006 what error do you get?your where condition is probably returning more than 1 result which is not allowed. Link to comment Share on other sites More sharing options...
jteixeira Posted November 17, 2006 Author Share Posted November 17, 2006 Msg 102, Level 15, State 1, Line 5Incorrect syntax near '/'. Link to comment Share on other sites More sharing options...
aspnetguy Posted November 17, 2006 Share Posted November 17, 2006 are all 3 fields precoprod, dinheiroprod, and vendasprod a numberic datatype (ie INT)? Link to comment Share on other sites More sharing options...
jteixeira Posted November 17, 2006 Author Share Posted November 17, 2006 I find the error: Update Infofin_prodset precoprod=(dinheiroprod/vendasprod)where(Select Infofin_prod.maquinaid,nicname,vendasprod,dinheiroprod,precoprodFrom Infofin_prod INNER JOIN Maquina on maquina.maquinaid=Infofin_prod.MaquinaidWhere(precoprod*vendasprod)<>dinheiroprod) --->*/ I have to delete */ to query works Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now