Substringing in mysql 
Author Message
 Substringing in mysql

SELECT  SUBSTRING('000000'||CHAR(SSN) ,5,5)
   , STATUS_CODE              
   , DATE_SEPARATION, CONTR_AT_SEP        
   , INTEREST_AT_SEP, YTD_REFUNDED_INEST  
   , REFUND_DATE, BAL_FWD_CONTRI      
   , YR_END_ACTUARY_STA                  
   , PREV_INCORRECT_SSN                  
   , DATE_SSN_CORRECTED, DATE_ADDED      
   , ACTV_DATE, NON_CONT_FLA          
   , PRIOR_YR_CONTRIB, ASMA_FLAG          
   , STAR_FLAG, PRE_TAX_CONTR            
   , 'CNVTD'                              
   , 'CNVTD', DATE_LAST_MAIN              
FROM db0.table1                
WHERE db0.table1.NAME LIKE 'REFUND%'              
AND db0.table1.SSN < 1000                        
UNION ALL

I'm getting an error that field SSN doesn't exist on line one when I
am sure it does.  Also if I specify the db and table, it says the
table doesn't exist.  This is a db2 query brought over to mysql.
Don't know much about mysql. Any help greatly aprec.



Fri, 01 Jul 2005 22:41:09 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. MySQL Memo Fields Returned (D5e, BDE5.11, MySQL on Linux Server, MyODBC)

2. Problem with passwords (MySQL, mm.mysql.jdbc driver)

3. getLastID with mySQL; MM.MySQL API

4. tips on ASP-MySQL port to VB-MySQL

5. JDBCfor MySQL: org.gjt.mm VS com.mysql

6. Using MySQL without MySQL Driver

7. jdbc/mysql/mm.mysql

8. Mysql Database replication and the mysql database and it's tables

9. MySQL preparedStatement (org.gjt.mm.mysql) relocated braces

10. jdbc/mysql/mm.mysql

11. ANN: ImportER MySQL-reverse engineer MySQL databases

12. MySQL OLE DB v3.0 for Win9x and MySql 3.23.30 on Linux 2.4.9


 
Powered by phpBB® Forum Software