After solving this problem I ended up with--(2a is the length of the wire)(integral limit is from -a to +a)
(x is the ⊥ distance from centre of the wire to a point P where we have to find the net field )
E[SUBx]= (1/4Πε)*(Q/2a)∫x.dy/(x^2+y^2)^3/2
P.S- sorry, I'm not able to upload the image of...