LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-03-2008, 09:13 AM   #1
siva512
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, 12:25 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

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


Cheers,
Tink
 
Old 04-03-2008, 01:20 PM   #3
prad77
Member
 
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 '\'

Gentoo

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


Reply


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 09:59 PM
substring in shell mystical dervish Programming 9 07-09-2007 08:22 PM
php preg_replace substring of a substring senyahnoj Programming 5 12-08-2006 11:31 AM
Need Help Extracting A Substring eur0dad Linux - General 6 09-21-2006 10:34 PM
to get a substring dimah Programming 1 06-22-2006 06:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:21 PM.

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