Jinnendra
Jinnendra

Reputation: 101

Can we run complex multi line SQL queries using Blueprism?

I am new to SQL stuff in blueprism, I am able to configure SQL object and execute simple queries, but I am facing trouble while trying to run multiline complex SQL queries.

when I was trying to execute the below query in blueprism, getting some error message, saying "Incorrect Syntax near Database2"

"select top 10 * from [Database1].[dbo].[Table1] 
join [Database1].[dbo].[Table2] on [Database1].[dbo].[Table2].Fieldname1=[Database1].[dbo].[Table1].Fieldname2
join [Database2].[dbo].[Table1] on [Database2].[dbo].[Table1].Fieldname1=[Database1].[dbo].[Table2].Fieldname2"

Can somebody please help me, what was the wrong in the above query...

Upvotes: 1

Views: 1869

Answers (1)

Jinnendra
Jinnendra

Reputation: 101

I found the answer myself, there should not be any additional white space characters in the query, entire query should be in continuous line. The beauty of blueprism is, it can execute any level of complex queries without any constraints, but need to modify the syntax accordingly. always we should mention the filename and table names in the following format - [databasename].[dbo].[tablename].[fieldname]

Upvotes: 3

Related Questions