How would I use excel to generate a large update sql statement

0 votes

I know there's a way to have insert statements within excel. Is there one for update? so far I've managed to come up with my update statement in SQL, but I have 6000 rows to update:

= "Update table Set name = " & A1 & " Where namefk = " & E2 & ""

Basically, I want the name and namefk to be populated with fields in my excel..but I can't seem to get it right. Any help will be appreciated.

Mar 30, 2022 in Database by Edureka
• 13,690 points
2,545 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
=CONCATENATE("update Site set SiteName='",D13,"' where Place='",A13,"' and Code='",B13,"'") =CONCATENATE("update Site set SiteName='",D13,"' where Place='",A13,"' and Code='",B13,"') =CONCATENATE("

As previously said, we can dynamically alter queries, and if we do so for one row, we simply need to drag down, and the column values will be immediately populated.
answered Apr 1, 2022 by gaurav
• 23,260 points

edited Mar 5
0 votes
=CONCATENATE("update Site set SiteName='",D13,"' where Place='",A13,"' and Code='",B13,"'") =CONCATENATE("update Site set SiteName='",D13,"' where Place='",A13,"' and Code='",B13,"') =CONCATENATE

As previously said, we can dynamically alter queries, and if we do so for one row, we simply need to drag down, and the column values will be immediately populated.

answered Apr 5, 2022 by gaurav
• 23,260 points

edited Mar 5

Related Questions In Database

0 votes
0 answers

I want to use CASE statement to update some records in sql server 2005

UPDATE dbo.TestStudents SET LASTNAME = ( ...READ MORE

Sep 2, 2022 in Database by Kithuzzz
• 38,000 points
1,316 views
0 votes
1 answer

How do I UPDATE from a SELECT in SQL Server?

MERGE INTO YourTable T USING ...READ MORE

answered Feb 3, 2022 in Database by Vaani
• 7,070 points
941 views
0 votes
0 answers

How do I UPDATE from a SELECT in SQL Server?

INSERT INTO Table (col1, col2, col3) SELECT col1, ...READ MORE

Feb 4, 2022 in Database by Vaani
• 7,070 points
625 views
0 votes
1 answer

How to run a SQL query on an Excel table?

On Excel tables, how to construct and ...READ MORE

answered Apr 11, 2022 in Database by gaurav
• 23,260 points
1,177 views
0 votes
0 answers

How to update two tables in one statement in SQL Server 2005?

In one operation, I want to update ...READ MORE

Aug 20, 2022 in Database by Kithuzzz
• 38,000 points
887 views
0 votes
0 answers

How to DROP multiple columns with a single ALTER TABLE statement in SQL Server?

In one ALTER TABLE statement, I would ...READ MORE

Sep 2, 2022 in Database by Kithuzzz
• 38,000 points
946 views
0 votes
0 answers

How to generate a Guid in SQL Server?

I have to make a SQL Id ...READ MORE

Sep 5, 2022 in Database by Kithuzzz
• 38,000 points
930 views
0 votes
1 answer

How to calculate percentage with a SQL statement

The following has passed my tests, and ...READ MORE

answered Sep 12, 2022 in Database by narikkadan
• 63,600 points
6,141 views
0 votes
1 answer

How to schedule a job for SQL query to run daily?

down voteaccepted Expand the SQL Server Agent node ...READ MORE

answered Oct 25, 2018 in Database by Frankie
• 9,830 points
10,321 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP