Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to check a trailing space in a string,urgent!

Status
Not open for further replies.

mkey

Programmer
Oct 3, 2001
288
CA
Hi all,

string 1:'abc def'
string 2:'abcdef '

I know checking space between a string (string 1) is easy. But how do you check for a trailing space in the string 2?

Thanks!
 

How about the INSTR function?

1 SELECT INSTR('abcdef ',' ')
2* FROM sys.dual
SQL->/

INSTR('ABCDEF','')
------------------
7

Robbie

"The rule is, not to besiege walled cities if it can possibly be avoided" -- Art of War
 
If you want a boolean return you could use

SELECT columns
FROM table
WHERE string2 != Rtrim(string2);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top