Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7774315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:20:48+00:00 2026-06-01T17:20:48+00:00

I have a large list of data I want to convert into a different

  • 0

I have a large list of data I want to convert into a different format without doing it manually. I believe there should be a way of creating a macro of sorts to make this task far less time consuming in the long run!

My data looks like:

EquipmentHire = 99

EquipmentPurchase = 100

EquipmentSpec = 101

and so on. I want it all converted to look like this instead: (so I can load it into a database)

INSERT INTO table_name VALUES (99, ‘EquipmentHire’);

Can anyone help me out?
Thanks. 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T17:20:50+00:00Added an answer on June 1, 2026 at 5:20 pm

    I’ve done similar tasks in MS-Excel using string concatenation and string manipulation functions like substring(), charindex().

    Basically, open your text file in Excel (assuming text will be in column A), set column B to be your string manipulation of column A, copy the formula down for all rows, and then copy the column B contents to a new text file.

    If this is a one-off, that would be a faster approach for me than writing a macro. I also did something like this via a powershell script a while back, but again, for a one-off Excel was faster for me.

    Added —

    Excel sample formula. This is very, very format dependent. If your data is always a consistent format (exact number of spaces around the equals sign, etc). Perl, powershell, macro, etc etc will likely be a better approach if you need to do this often, or your format is going to vary by spaces, etc.

    Assuming EquipmentHire = 99 is the contents of A1, the following would be in cell B1 to give you your SQL statement.

    ="INSERT INTO table_name VALUES ("&MID(A1,FIND("=",A1)+2,1000)&", '" & MID(A1,1,FIND("=", A1)-2) & "');"

    Tested using sample data in original post and MS-Excel 2k10

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a data table with binded to a large list. I want to
We have to automatically import a large list of users with some data into
I have a webpage that displays a very large list of data. Since this
I have a large list of file names that are illegal, I want to
i have a large list of static data from a server that i load
I have a list of data that I want to search through. This new
I need some help to store some data efficiently. I have a large list
I have a large list of integers (thousands), and I want to extract the
Let's say you have a List<List<Boolean>> and you want to encode that into binary
I have a rather large list of data that contains 5 properties per element.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.