home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.oracle      Overblown overpriced overengineered SHIT      2,288 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,672 of 2,288   
   Jim Kennedy to jmaxsherkimer   
   Re: basic plsql question   
   27 Aug 04 13:38:02   
   
   From: kennedy-downwithspammersfamily@attbi.net   
      
   "jmaxsherkimer"  wrote in message   
   news:f8606b97.0408270420.167b32fb@posting.google.com...   
   > i had a basic question on plsql, if i have a variable as varchar2,   
   > containing some text like 'A12345', how do i write a function to make   
   > sure that the first char. is the letter 'A' or 'a' and the next five   
   > characters are numbers?  sorry about asking a basic question, but i'm   
   > not the dba here, he recently left and i'm just the web developer   
   > having to do this for now.   
   Look in the docs you can find documentation at otn.oracle.com.  Look in the   
   SQL Reference guide. (there are a ton of docs, but that is the one you want)   
   You will probably use substr and translate.  You can test it in sqlplus by   
      
      
   select substr('A12345',1,1) from dual;   
      
   etc.   
   That will allow you to evaluate the expression so you can test your function   
   quickly.  Once you are satisfied with your exprerssion you can put the   
   expression in your code.   
   Jim   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca