Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old August 13th, 2008, 06:46 AM
Newbie
 
Join Date: Aug 2008
Posts: 3
Default To check space in varchar2 column

Hi Guiders,

I need to check the whether space is there in verchar column or not.


select a.mycol1,a.mycol2 from mytable a where (decode(length(a.mycol1),length(rtrim(a.mycol1)),' No') is NULL and a.prcs_dte='11-Aug-2008';

The above query only i have used.But i need to check for n number of varchar columns in same table.Can any one suggest me.

Note : I have only select permission on the tables.So i could not able to use user_tab_col.
Reply
  #2  
Old August 13th, 2008, 07:33 AM
Administrator
 
Join Date: Sep 2006
Posts: 11,312
Default

Why not just use INSTR ?
Reply
  #3  
Old August 13th, 2008, 07:53 AM
debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 6,867
Default

simply try to check if

column=trim(column)

i think you are not trying to findout space inbetween chars.
Reply
Reply

Bookmarks

Thread Tools

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 Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles