Type activity issue with [[ or other special characters

I’m using Type activity to type on a remote machine (connected via Remote Runtime Connection).

"SELECT TOP 10 
[email]
 FROM [anti].[dbo].[bt_customer]"

I’ve tried with double ]] but then it’s inserting the text with double parentheses. Usign only one and Type activity get blocked / not running.

Hey!

We don’t require the parentheses… we can try like this

"SELECT TOP 10 email FROM bt_customer"

Try this and let me know

Regards,
NaNi

Incorrect syntax reported by SQL Server.

Hey!

Check the column and table name…

Then execute it

Regards,
NaNi

I have to just paste exactly this code in order to be executed in SQL Server.
I don’t know what you are talking about.

Hey!

In the above expression you’re trying to get the top 10 records from email column…

The datatable name (bt_customer) which is there in the SQL server.

So,

You’re trying to fetch the top 10 mails in SQL am i right?

I’m asking you to check the table name and also column name in SQL .

In general will use this syntax to get the top 10 records from a column

SELECT TOP number|percent column_name(s)
FROM table_name
WHERE condition;

Regards,
NaNi

I don’t understand what you mean “to check table name and column name in sql”.
That code generate results if I paste it direct in SLQ Server. It’s just not working to be inserted via UiPath Activity Type.

Hey!

Could you please explain your requirement here…

What you’re trying to achieve?

Will provide the solution here…

Regards,
NaNi

It has been explained from start. You’re wasting my time… if you are not able to understand such simple question.

Hey!

Do you think that is clearly explained?

You’re using select command that is works with SQL…

You should ask the question properly

What you’re trying to achieve?

Why you’re using the select command?

That is the data base command…

If you use type into what this will happen?

I’m asking you to tell me the process what you’re trying to achieve?

Regards,
NaNi

I want to execute a query remotely.

Hey!

Let me explain in you in detail…

In order to use the SQL in UiPath we have to do the following things…

  1. We must have UiPath.Database.Activities package installed in our studio…
  2. Then drag and drop the DB connect activity to establish the connection from UiPath to SQL…
  3. Then will use Run query,run command, bulk insert or bulk update activities to perform the operation in SQL…

Regards,
NaNi

Thanks, I’m aware about Database activity. I was looking to do it via Type.

Hi @IPIX,

Can you use a double [[ to escape the bracket? (the % will get added automatically)

image

Thanks