Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2007
    Posts
    1
    Rep Power
    0

    Default String replace method

    Hi all,

    I have a problem with string replacement. Details follows...

    String : select count(*) from my_table

    I have to replace count(*) with count(1).But The String's replaceAll() asking for regular expressions..can u just tell me what regular expression suits my needs?

    I don't want to use replace() method...Can u tell me...

    Thanks in advance..

  2. #2
    paty is offline Member
    Join Date
    Jul 2007
    Posts
    41
    Rep Power
    0

    Default

    Are you working with SQL?
    you have to write string expressions
    you can't write "2" or "1"
    you have to write some column of your data base
    like this
    Java Code:
    "select count("id_employee) from mytable"

Similar Threads

  1. Object from String (calling method dynamically)
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-16-2008, 09:22 PM
  2. Find and replace ( in a String
    By hamish10101 in forum New To Java
    Replies: 6
    Last Post: 01-17-2008, 05:51 AM
  3. Method for String to int conversion
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-02-2008, 06:35 PM
  4. Using a replace method...
    By paul in forum New To Java
    Replies: 2
    Last Post: 08-07-2007, 04:50 AM
  5. problems with replace method
    By cecily in forum New To Java
    Replies: 1
    Last Post: 08-02-2007, 09:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •