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

  • SEARCH
  • Home
  • 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 505251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:34:46+00:00 2026-05-13T06:34:46+00:00

I am using the following statement to load data from a file into a

  • 0

I am using the following statement to load data from a file into a table:

LOAD DATA LOCAL INFILE '/home/100000462733296__Stats" 
INTO TABLE datapoints 
FIELDS TERMINATED BY '|' 
LINES TERMINATED BY '\n' 
(uid1, uid2, status);

Now, if I want to enter a custom value into uid1, say 328383 without actually asking it to read it from a file, how would I do that? There are about 10 files and uid1 is the identifier for each of these files. I am looking for something like this:

LOAD DATA LOCAL INFILE '/home/100000462733296__Stats" 
INTO TABLE datapoints 
FIELDS TERMINATED BY '|' 
LINES TERMINATED BY '\n' 
(uid1="328383", uid2, status);

Any suggestions?

  • 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-05-13T06:34:46+00:00Added an answer on May 13, 2026 at 6:34 am

    The SET clause can be used to supply values not derived from the input file:

    LOAD DATA LOCAL INFILE '/home/100000462733296__Stats" 
    INTO TABLE datapoints 
    FIELDS TERMINATED BY '|' 
    LINES TERMINATED BY '\n' 
    (uid1, uid2, status)
    SET uid1 = '328383';
    

    It’s not clear what the data type of uid1 is, but being that you enclosed the value in double quotes I assumed it’s a string related data type – remove the single quotes if the data type is numeric.

    There’s more to read on what the SET functionality supports in the LOAD FILE documentation – it’s a little more than 1/2 way down the page.

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

Sidebar

Related Questions

I'm using MySQL's LOAD DATA LOCAL INFILE SQL statement to load data from a
I have to write a biginteger into a text file using the following statement.
I am using following code to get data from database and load to picture
I am using the following statement; SELECT RESV_ID, BOOKING_CUS_ID, ACC_ID, (SELECT F.FLI_PRICE FROM FLIGHT
I'm trying to issue a LOAD DATA LOCAL INFILE query to load some CSV
in my application, i am using following statement for display a image menuUserImage.Source =
I am using following prepared statement : Class.forName(com.mysql.jdbc.Driver); con=DriverManager.getConnection(jdbc:mysql://localhost:3306/mysql,root,root); String query=select ename from ?
I'm getting some very strange behaviour using the following switch statement: string recognise_mti(int mti_code)
How to write following statement in c using switch statement in c int i
in the python console the following statement works perfectly fine (i guess using eval

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.