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 7399555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:04:31+00:00 2026-05-29T04:04:31+00:00

I have written an SQL script having the below query. The query works fine.

  • 0

I have written an SQL script having the below query. The query works fine.

update partner set is_seller_buyer=1 where id in (select id from partner
where names in
(
  'A','B','C','D','E',... -- Around 100 names.
));

But now instead of writing around 100 names in a query itself, I want to fetch all the names from the CSV file. I read about SQL*Loader on the Internet, but I did not get much on an update query.

My CSV file only contain names.

Enter image description here

I have tried

  load data
  infile 'c:\data\mydata.csv'
  into table partner set is_wholesaler_reseller=1
  where id in (select id from partner
  where names in
  (
    'A','B','C','D','E',... -- Around 100 names.
  ));
  fields terminated by "," optionally enclosed by '"'
  ( names, sal, deptno )

How can I achieve this?

  • 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-29T04:04:31+00:00Added an answer on May 29, 2026 at 4:04 am

    SQL*Loader does not perform updates, only inserts. So, you should insert your names into a separate table, say names, and run your update from that:

    update partner set is_seller_buyer=1 where id in (select id from partner 
    where names in 
    (
    select names from names
    ));
    

    Your loader script can be changed to:

    load data
      infile 'c:\data\mydata.csv'
      into table names
      fields terminated by "," optionally enclosed by '"'         
      ( names, sal, deptno )
    

    An alternate to this is to use External Tables which allows Oracle to treat a flat file like it is a table. An example to get you started can be found here.

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

Sidebar

Related Questions

I have written a SQL query that works just fine, but am having a
I have written a Windows service to collect information from all of our SQL
I have written an sql script for updating a database that runs in SQL
I have written a PHP script which generates an SQL file containing all tables
Can we have multiple SQL* PLUS connections in a shell script? I have written
I have written an SQL query that gets unread messages but I think I
I have written this T-SQL script to roll up duplicate rows in a database
I have a number of manually written scripts (.sql) for tables, views and stored
Hai Techies, I have some stored procedure which was written in SQL server.Now i
I have an SQL table written in MSSQL: create table [action] ( action_id bigint

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.