Unanswered: listing data having specific constraints
I just want to list the data in a 8 variable column whose specifications should be first three variabe must be a character and next five variables must be numeric. For example if the column name is USER_ID and i want to list the values having the data like 'AAANNNN'(ABC12345).
Can some one help me to sort this out?
I used the code like
select * from tablename where substr(USER_ID,1,3) is alpha and substr(USER_ID,4,5) is number
functions are not available. ??
select * from tab where substr(col,1,1)='x' and substr(col,4,5)='x'
for substr which is a character based function you can not specify numbers
check the doc SUBSTR
Best Regards, Guy Przytula
Database Software Consultant
Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
Information Server Datastage Certified http://www.infocura.be