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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:46:56+00:00 2026-05-24T19:46:56+00:00

I have a batch file which runs multiple sql files and passes parameters to

  • 0

I have a batch file which runs multiple sql files and passes parameters to them.
The input parameters are stored in a txt file which is read by batch file.

I am trying to pass varchar values to IN clause of SQL.

For e.g.

In my input file i this entry

var1="'tommy','jim'"

In Batch file

<code to read file , assuming %1 has the var1 value>
set param=%~1

sqlplus %DBCONN% @%programFolder%\test.sql %param%

test.sql (name is varchar2)

select * from table where name in (&1);

This gives error, saying invalid number
as it tries to run

select * from table where name in (tommy);


If i echo right before the sql stmt, its displays ‘tommy’,’jim’
but in sql its removing jim and the single quotes …

Please help!


Now i edited entry in Input file as
var1="'''tommy''','''jim'''"

it goes as select * from table where name in ('tommy');

But it truncates the second value

Any clue how to include comma ??

  • 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-24T19:46:57+00:00Added an answer on May 24, 2026 at 7:46 pm

    Finally found a way

    input file –
    var1=('tommy','jim')

    Remove the braces from the sql file
    select * from table where name in &1;

    This works , i have no idea why was taking a comma was such an issue, there should have been some way to pass the comma !
    If anyone finds out please let me know.

    Thanks

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

Sidebar

Related Questions

I have a batch file which starts multiple instances of simple console application (Hello
I have a batch file which moves files from one folder to another. The
I'm trying to create batch file which should have this commands: cd c:\Program files\NuSMV\2.5.2\bin\
I have a batch file which calls a Perl file which requires a input
I have a Batch file which will call a Powershell Script : BATCH FILE
I have a problem. I have a batch file which imitates the UNIX cd
I have a windows batch file in Windows 7 which does something with find.
I currently used a batch file which runs a project of mine which is
I have a batch file which loops through a content of a text file
I have this batch file which needs to do some stuff in a folder.

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.