Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-03-2008, 10:13 AM   #1
LQ Newbie
Registered: Apr 2008
Posts: 2

Rep: Reputation: 0
help regarding subString Replacement

Hi All,
i am passing Query as "select * from ab$cd" to the script file variable and running the query from Java Code.
where table name "ab$cd " is taking as ab, after $ its not passing to the Java code.
plz can any one help out this.
Old 04-03-2008, 01:25 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
To get a sensible answer you'll need to tell us in what
language and how you build the string in the first place.

Old 04-03-2008, 02:20 PM   #3
Registered: Mar 2008
Posts: 101

Rep: Reputation: 15
hope ab$cd is itself a table and $cd is not a variable.
Try using \ backslash.

For columns we can use them similarly too.

SELECT columns FROM table WHERE
column LIKE '%[%]%'

-- or

SELECT columns FROM table WHERE
column LIKE '%\%%' ESCAPE '\'


Last edited by prad77; 04-17-2008 at 04:39 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
replace a substring with another string in C zeppelin Programming 21 11-09-2009 10:59 PM
substring in shell mystical dervish Programming 9 07-09-2007 09:22 PM
php preg_replace substring of a substring senyahnoj Programming 5 12-08-2006 12:31 PM
Need Help Extracting A Substring eur0dad Linux - General 6 09-21-2006 11:34 PM
to get a substring dimah Programming 1 06-22-2006 07:31 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:55 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration