11/10/2017
Posted by 
Sql Update Multiple Rows Single Query Definition Rating: 8,3/10 1880reviews
Give More Feedback

Hi All, Does anybody know if there is a way to update column definition of multiple columns in a single ALTER statement in SQL Server 2008 or Denali CTP 1? Pseudo code for the SQL query: ' UPDATE myTable SET posX[id] = @arrayX[id], posY[id] = @arrayY[id] ' @arrayX, arrayY being arrays which store new values for the posX and posY field.

Swissv2 said: Any Tips? Oh, absolutely!!

Unblocker Download Free. Your problem likely lies in the php code, something about constructing variables and looping (i'm guessing -- i don't do php so i only gave your code a cursory glance) however, since you asked this question in the mysql forum, let me give you a mysql answer redesign your table, normalize it to first normal form you have repeating columns in answerOne, answerTwo, answerThree these should be three rows in a normalized table from there, the php will be slightly different. Cod4 Promod 204 Download Itunes. Thanks for your quick reply. To address your normalization suggestion, here is my table structure (it goes into a tiny bit more detail; my first example was a very generalized one, this one is also generalized to a certain extent) - and there is a specific reason why I have designed it so.which I will explain in a bit. // Users Only take the survey 'foobar' once, and can // edit the answers if and only if they have not completed the survey. Table_member ( member_id, takingFoobar, foobarCompleted, foobarStartTime, foobarEndTime ) //foobar is actually a 'results' table.;) table_foobar ( foobar_id, member_id, question_id, answerOne, answerTwo, answerThree, answerFour ) //Multiple questions for a single foobarMain survey. Tbl_foobarQuestion ( question_id, foobarMain_id, foobarQuestion ) tbl_foobarMain ( foobarMain_id, foobarName, foobarDescription ) So now is the BIG explanation of the table structure.