How can i execute query with charachter condition with database toolbox R2011b
    1 visualización (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    yasser
 el 7 de Sept. de 2014
  
    
    
    
    
    Comentada: yasser
 el 8 de Sept. de 2014
            Hello I have problem when i execute query with charachter condation using database toolbox commands but no result output. I write this command sql_age = ['select LINGUSTIC_NAME from METAKNOWLEDGE_DET' ... 'where FIELD_NAME = ' '''AGE''']; select_age = exec (conn,sql_age); q1=fetch(select_age); agelist = q1.data; the output must get some result but no result out.
0 comentarios
Respuesta aceptada
  Geoff Hayes
      
      
 el 7 de Sept. de 2014
        Yasser - if I build the same SQL string using your code, then the string becomes
 select LINGUSTIC_NAME from METAKNOWLEDGE_DETwhere FIELD_NAME = 'AGE'
Note how there is no space between the table name and the where condition. Try re-creating your SQL command as
 sql_age = ['select LINGUSTIC_NAME from METAKNOWLEDGE_DET ' ... 
            'where FIELD_NAME = ' '''AGE'''];
Más respuestas (0)
Ver también
Categorías
				Más información sobre Database Toolbox en Help Center y File Exchange.
			
	Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

