"awkward"!? Spell correction at its worst, should be "SQL", sorry.
Pete lcSQL Software <http://www.lcsql.com> Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html> On Sat, Mar 15, 2014 at 8:36 AM, Peter Haworth <p...@lcsql.com> wrote: > You should have double quotes around sql entities like table and column > names. Single quotes will work in some but not all awkward > implementations. > > Pete > lcSQL Software > On Mar 15, 2014 12:50 AM, "Terence Heaford" <t.heaf...@btinternet.com> > wrote: > >> I normally do my Sqlite queries like this, I think examples speak a >> thousand words.: >> >> put merge("select date,type,description,amount,balance,category,recID >> from '[[the uAcctName of this stack]]' order by date asc") into tSQL >> put revDataFromQuery(tab, return, the uDB of this stack, tSQL) into >> tData >> >> or >> >> put "select categoryName from 'categoryList' order by categoryName >> asc" into tSQL >> put revDataFromQuery(tab, return, the uDB of stack "myStack", tSQL) >> into tCatNames >> >> or >> >> put merge("SELECT date,type,description,amount,balance,category,recID >> from '[[the uAcctName of this stack]]' where date >= [[tStartDate]] and >> date <= [[tEndDate]] [[tCatStatement]] order by date asc") into tSQL >> put revDataFromQuery(tab, return, the uDB of this stack, tSQL) into >> tData >> >> or >> >> put merge("type like '%[[tType]]%'") into tTypeQuery >> >> put merge("[[tQuery]] [[tCatQuery]] [[tAmountQuery]] [[tDescQuery]] >> [[tTypeQuery]] order by date asc") into tSQL >> >> >> Is mTextContent a variable? >> >> >> All the best >> >> Terry >> >> >> >> On 15 Mar 2014, at 05:44, Stephen MacLean <smacl...@madmansoft.com> >> wrote: >> >> > Hi All, >> > >> > I'm having a problem with this: >> > >> > put "SELECT mFromGUID from messages WHERE (mTextContent LIKE '%:1%')" >> into gMsgListQuery >> > >> > put revDataFromQuery(,comma, gDatabaseID, gMsgListQUERY,"tFld") into >> tSearchResult >> > >> > puts nothing into tSearchResult and the result is empty. >> > >> > Do I have escape something differently? Or just missing something? >> > >> > TIA, >> > >> > Steve MacLean >> > >> > >> > >> > >> > >> > _______________________________________________ >> > use-livecode mailing list >> > use-livecode@lists.runrev.com >> > Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> > http://lists.runrev.com/mailman/listinfo/use-livecode >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode