+ Start a Discussion
James L.James L. 

How to break code into multiple lines if it's too long to fit in one line



String strSQL = 'select field1, field2, field3, field4, field5, field6 from objecta  ';


if the string is too long, and better break into multiple lines.


How to write this?



Jia HuJia Hu
You can try this way,

String query = 'SELECT Id, Name, Ownerid FROM Account ' +
'WHERE ownerid=\'' + u.id + '\'';