searchIn {pgUtils}R Documentation

Perform a pattern search in a database table

Description

searchIn With this function it is possible to search a word or a pattern string in a database table. The function returns all the rows from the table where the string was found.

Usage

searchIn(Con,name=NULL,pattern=NULL,where=NULL)

Arguments

Con A connection object (create it with the dbConnect.PgSQL.conn function from the package RdbiPgSQL)
name The table name
pattern The string or part of the string that should be searched.
where An optional parameter that specifies the column where the string should be searched in the table. If not submitted, the function searches the string in all columns that are from the SQL data type TEXT.

Details

This function searches the string submitted with the SQL command LIKE %pattern%. So the string to search can be inside a word, or be the word itself. As a pattern search is only defined for text strings, the function will search only in those columns that contain text. So for all columns that have some SQL datatype different from TEXT (for example BOOL or INT) no search is performed.

Author(s)

Johannes Rainer


[Package pgUtils version 1.14.1 Index]