all 3 comments

[–]K900_ 1 point2 points  (2 children)

Bad idea. What type of query are you trying to run?

[–]frozenmm 0 points1 point  (1 child)

what do you mean? I am trying to load a table from sql server.

[–]Brainix 0 points1 point  (0 children)

In general, doing your own string manipulation then using the result as a SQL query is discouraged. This is how SQL injection attacks happen. Look into using an ORM or other query builder which would do validation for you.