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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:22:54+00:00 2026-05-24T11:22:54+00:00

I tried the below sql query INSERT INTO test.ACT_QUERY values(2139,2,’SELECT ”D”,ORDER_ID from dual’); When

  • 0

I tried the below sql query

INSERT INTO test.ACT_QUERY values(2139,2,'SELECT ''D'',ORDER_ID from dual');

When a java program run this select statement from test.ACT_QUERY table and spools to a output file it gives a “D”, 123. I just want D,123. Not sure why the quotes are coming up. What i need to replace in the select statement to get the output as D,123

  • 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-24T11:22:54+00:00Added an answer on May 24, 2026 at 11:22 am

    It is difficult to visualize your problem. Certainly there is nothing wrong in principle with what you’re doing, and it works in PL/SQL.

    Here is your test data, slightly tweaked to run in my DB:

    SQL> INSERT INTO ACT_QUERY values(2139,2,'SELECT ''D'', DUMMY from dual');
    
    1 row created.
    
    SQL> select * from act_query
      2  /
    
            ID       BLAH
    ---------- ----------
    QRY_TXT
    --------------------------------------------------------------------------------
          2139          2
    SELECT 'D', DUMMY from dual
    
    
    SQL>
    

    Let’s roll!

    SQL> begin
      2      for r in (select * from
      3
      4  .
    SQL> declare
      2      v1 char(1);
      3      v2 char(1);
      4  begin
      5      for r in (select * from act_query)
      6      loop
      7          execute immediate r.qry_txt into v1, v2;
      8          dbms_output.put_line(r.qry_txt);
      9          dbms_output.put_line('v1='||v1||'::v2='||v2);
     10      end loop;
     11  end;
     12  /
    SELECT 'D'as D, DUMMY from dual
    v1=D::v2=X
    
    PL/SQL procedure successfully completed.
    
    SQL>
    

    So, you need to explain your situation in a bit more detail, with cut’n’paste of actual output.

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

Sidebar

Related Questions

Below is my SQL query used in SSRS report SELECT Claimname,CONVERT(VARCHAR,ClaimResponsedate,101) FROM Claim WHERE
I tried to install MVC Framework from the below URL http://www.asp.net/mVC/ First it is
I tried the below query but it didnt executed giving error as : >
I'm trying to stuff a variable into a SQL query to return a value
I'm trying to convert the below SQL query to HQL and am having a
So I have a SQL Query as Follows SELECT P.Date, P.CategoryName, P.ProductName, SUM(Quantity) Quantity,
I have these below LINQ to SQL queries var kayitlarFiltreli = from rows in
I tried to call linq query from sliverlight application to web service which is
i have a simple SQL query, but im struggling to replicate in LINQ select
The sql statement is like this: select posts.id, posts.title from posts inner join (select

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.