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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:26:32+00:00 2026-05-14T05:26:32+00:00

We are planning to migrate our DB to Oracle.We need to manually check each

  • 0

We are planning to migrate our DB to Oracle.We need to manually check each of the embedded SQL is working in Oracle as few may follow different SQL rules.Now my need is very simple.

I need to browse through a file which may contain queries like this.

String sql = “select * from test where name=”+test+”and age=”+age;

There are nearly 1000 files and each file has different kind of queries like this where I have to pluck the query alone which I have done through an unix script.But I need to convert these Java based queries to Oracle compatible queries.

ie.
select * from test where name=”name” and age=”age”

Basically I need to check the syntax of the queries by this.I have seen something like this in TOAD but I have more than 1000 files and can’t manually change each one.Is there a way?

I will explain more i the question is not clear

  • 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-14T05:26:32+00:00Added an answer on May 14, 2026 at 5:26 am

    For performance and security reasons you should use PreparedStatement.bind(…) rather than string concatenation to build your SQL strings.

    I don’t know of a way to tackle this problem other than fixing the code that needs to be fixed. If you can find common patterns then you can automate some of the editing using find/replace or sed or some other tool, as long as you diff the result before checking it in.

    If there are thousands of files I guess that there is a reasonable sized team that built the code this way. It seems fair to share the workload out amongst the people that built the system, rather than dump it all on one person. Otherwise you will end up as the “SQL fixing guy” and nobody else on the team will have any incentive to write SQL code in a more portable way.

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

Sidebar

Related Questions

Planning to migrate our existing application to Azure. Our existing architecture with security flow
I am planning to migrate a previously created Java web application to Azure. The
I am planning to migrate a Delphi 6 BDE application to Delphi 2010... First
Planning to create a new website for our product using ASP.NET MVC 4. Site
I have a lot of pre-existing projects and code in a few different Subversion
I'm using SVN and I'm not planning to migrate to Git for now. I'd
We are planning to migrate to Java EE 5 from j2EE 1.4. All of
I am working on a project to migrate a website from asp.net to drupal
I´m planning to migrate an existing application to Windows Azure. I know about a
I am planning to migrate all my VPS functions to a my Azure subscription.

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.