How to insert extract datatable to mysql database

how to insert extract data from the Flipkart and I want to insert data to MySQL database
can anyone tell how to insert.
database connected to my SQL but it not insert
please help me

I get an error : –

How to write quire???

image

@Chethan_P We would have to see the query that you have used, and also maybe Screenshots of how you have implemented it is helpful.

image

Hi @Chethan_P

Below is the thread for data extraction from flipcart (Example) :-

Below is the query you have to use to Insert Data into SQL Database :-

"INSERT INTO iphonedata.iphonedatai VALUES ('"+Name+"','"+url+"','"+Prize+"','"+From+"','"+InrShipping+"')"

Note :- Use the query in Assign Activity

Even though you wont write the column name in the SQL Query then also it is ok
Just put the variables in the sequence as per the database table is created in the MySQL

Mark as solution and like it if this helps you :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

1 Like

@Chethan_P I am not sure why you have used the query in that way. The Syntax normally would be in this form :

INSERT INTO table_name (column1, column2, column3, …)
VALUES (value1, value2, value3, …);

Hence, in your case I think the query should be the below :

Try this and let us know if any error occurs.

1 Like

@supermanPunch

i Use this quire i gt error

@Chethan_P Can you show me the query you have used ? :sweat_smile:

Actully i change some value in data table
i get error like this now

And This is the

This is quires

@Chethan_P I would guess that should be due to a max length problem, since you have provided the Column Types as varchar(45). You would have to Edit the Database table and make the Column Types From varchar(45) to varchar(max) if you want to store variable character length in it.

1 Like

Hi @Chethan_P

1st Thing is the one @supermanPunch told along with varchar(Max) also try using nvarchar and even though if it wont work then

Below is the query you have to use to Insert Data into SQL Database :-

"INSERT INTO iphonedatai VALUES ('"+Name+"','"+url+"','"+Country+"','"+Prize+"')"

Note :- Use the query in Assign Activity

Even though you wont write the column name in the SQL Query then also it is ok
Just put the variables in the sequence as per the database table is created in the MySQL

Mark as solution and like it if this helps you :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

1 Like

How to use the query in assine activity

Hi @Chethan_P

See below img, This is the way to do it :-

image

Note :- The variable in which you are going to Store the query within Assign Activity will be of String Type

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

1 Like

Thank you its also working I want to know why we want to use in assign activity we can use directly in executing non-query.

Hi @Chethan_P

Yes. Its not the thing that every time we have to write it within Assign Activity.

Directly we can write the query in Execute Non Query Activity also.

But just for specifying that if you are doing some multiple operations so multiple queries might der so for identifying uniquely with the variable name i suggest to use Assign Activity

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

1 Like

yes your right thank you for KT

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.