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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:31:37+00:00 2026-05-27T09:31:37+00:00

this is my table in oracle: I’m trying to do this: selectCmd = select

  • 0

this is my table in oracle:

enter image description here

I’m trying to do this:

  selectCmd = "select * from scott.BONUS where ename like '% :f4  %'";
        var par = cmd.CreateParameter();
        par.DbType = DbType.String;
        par.ParameterName = "f4";
        par.Value = "fsd";
        cmd.Parameters.Add(par);

        cmd.CommandText = selectCmd;
        con.Open();

my problem is the part after the ‘like’ .. I’ve tried many things w/o success.
In some of the tries the reader came back empty while in others an exception has been thrown.

  • 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-27T09:31:38+00:00Added an answer on May 27, 2026 at 9:31 am

    That is looking for something containing the literal sequence of characters space, colon, f, 4. You mean:

    like '%' || :f4 || '%'
    

    (edited to reflect correction by Stephen ODonnell, comments)

    Or easier; just use

    like :f4
    

    And put the % in the value:

    par.Value = "%" + "fsd" + "%";
    

    (expanded for convenience, under the assumption that “fsd” needs to be a variable or similar in the real code)

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

Sidebar

Related Questions

I have a string from oracle table like this: SELECT col1 FROM MyTable; col1
I have a table like this (Oracle, 10) Account Bookdate Amount 1 20080101 100
I have a table in Oracle 10 that is defined like this: LOCATION HOUR
I have a query: select min(timestamp) from table This table has 60+million rows, and
I would like to update a table (Oracle) from the results of another (too
I have this table in an Oracle DB which has a primary key defined
I have created a table on an Oracle 10g database with this structure :
I have an Oracle 10g table that contains a # of log records. This
I'm having trouble trying to define the SQL query for this table: There's a
Oracle 10g DB. I have a table called s_contact . This table has a

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.