Eviware Forum

soapUI => soapUI => Topic started by: Max on June 19, 2008, 09:54:13 pm



Title: SQL exception "invalid table name"
Post by: Max on June 19, 2008, 09:54:13 pm
I'm working with Groovy scripts and soapUI Pro. I have a Groovy script that connect to db and retrieving data to validate.
I get a SQL exception "invalid table name" when in my sql statement the db schema is parametrazed '${schema}.table_name'.
if I hard-code db schema value 'dbschema.table_name' it succeeds.
There seems to be a problem interpreting variables when building a SQL string.

Here is my script.

def schema = context.expand( '${#Project#schema}' )
def query = "SELECT user_name FROM ${schema}.account_customer WHERE email = 'myemail@test.com'";

Please tell me what I am doing wrong.

Thanks


Title: Re: SQL exception "invalid table name"
Post by: omatzura on June 19, 2008, 10:04:15 pm
Hi,

This sounds like a groovy-issue to me, is this soapUI Pro 2.0.2?

regards,

/Ole
eviware.com


Title: Re: SQL exception "invalid table name"
Post by: Max on June 19, 2008, 10:15:43 pm
Yes, it is soapUI Pro 2.0.2