in reply to Simplifying queries in DBI

I don't know what you mean by "ESCAPE '!' ".
That is not any standard SQL syntax.
Where does that come from and why are you using it?

Start with: "SELECT * FROM cf_status_log".
Get that to work and then try more complex things.

Basically start from the whole thing and then refine that to get a subset, then a better subset, etc.

Replies are listed 'Best First'.
Re^2: Simplifying queries in DBI
by afoken (Chancellor) on Mar 16, 2014 at 08:09 UTC
    I don't know what you mean by "ESCAPE '!' ".
    That is not any standard SQL syntax.

    The major players support LIKE ... ESCAPE all in the same way (PostgreSQL, Oracle, SQLite, MS SQL Server, MySQL, IBM DB2). This is a strong hint that it may be standardised. In fact, SQL-92 has it in Chapter 8.5, page 214:

    8.5 <like predicate> Function Specify a pattern-match comparison. Format <like predicate> ::= <match value> [ NOT ] LIKE <pattern> [ ESCAPE <escape character> ] <match value> ::= <character value expression> <pattern> ::= <character value expression> <escape character> ::= <character value expression>

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
      I learned something, thanks!