We are trying to search all text_long or text_with_summary fields for all content type nodes. I can do it for the field_data_body. I need to expand this for all content types using text_long and text_with_summary. I would like to iterate all nodes for all content types and select all fields in the node with the text_long and text_with_summary field type.
Here is what I use for selecting just the body. I use a cursor to search each db which is why I have a v_db variable. Don't worry about v_db and @j is the search string I pass to the select statement. I wish there was a nice GUI for visualizing joins.
select "',v_db,'", ',v_db,'.node.nid, LEFT(',v_db,'.node.title,30), LEFT(',v_db,'.body.body_value,300) from ',v_db,'.node INNER JOIN ',v_db,'.field_data_body AS body ON node.nid = body.entity_id WHERE body.body_value like ',@j);
thanks