You need to sign in to do that
Don't have an account?

split a SOQL query
Hi Everyone,
problem statement:
I am passing a SOQL query through a textArea of my Visualforce page. I want my controller to split the query and get a list of the queried coloums:
For ex. : InputQuery : 'Select Id, Name, Rating from Account' or
'Select Id,Name,Rating from Account'(without space in fields)
Output result : List<String>= ['id', 'Name','Rating'];
I tried with InputQuery.split(' ') method but unable to get desired result. Please help me with this.
problem statement:
I am passing a SOQL query through a textArea of my Visualforce page. I want my controller to split the query and get a list of the queried coloums:
For ex. : InputQuery : 'Select Id, Name, Rating from Account' or
'Select Id,Name,Rating from Account'(without space in fields)
Output result : List<String>= ['id', 'Name','Rating'];
I tried with InputQuery.split(' ') method but unable to get desired result. Please help me with this.
Please try this
I hope this helps