Creation of Database from Runrev

jhonken jhonken at
Thu Dec 7 11:32:50 EST 2006

  Thanks for the response.  How do you execute the SQL that you've
stored in "theSQL"?  Jeff

-----Original Message-----
From: Jim Ault [mailto:JimAultWins at] 
Sent: Thursday, December 07, 2006 11:26 AM
To: How to use Revolution
Subject: Re: Creation of Database from Runrev

On 12/7/06 7:55 AM, "jhonken" <jhonken at> wrote:

> My application has a Sqlite database that I'd like to create from 
> Runrev.  The problem I've had in the past is that I can't execute a 
> realllly long SQL statement within Rev.  Is there some trick to it or 
> is there another way?  The limitations I've run into are:
> 1.  It seems that the SQL statement likes to be on one line. 2.  I've 
> tried to use the continuation character in the statement in the past 
> but the statement is so long it seems to choke.
> Does anyone have any ideas on how I can execute a long create 
> statement?

If you mean build a long string in a variable then there are a few ways
Using the merge for SQL is my preference

Some readable ways for SQL
  --that  "do-it-all-in-one-line"
  --without using "replace"
  -- only one function call, merge()
  --   yet remain readable

------------------ one line  (watch word wrap)
  put merge("DELETE FROM [[tmysqltableName]] Where [[tIDcolumnName]] =
'[[tRecordID]]'") into theSQL

  -------------------- or another way = same result (watch word wrap)
  put merge("DELETE FROM [[tmysqltableName]] Where [[tIDcolumnName]] =
'[[tRecordID]]'") \
      into theSQL

  -------------------- yet another way = same result
  put merge("DELETE FROM [[tmysqltableName]] "  & \
  "Where [[tIDcolumnName]] = '[[tRecordID]]'") \
      into theSQL

  -------------------- or another way to get a COMPLEX result
  put tRecordID + 1 into tRecordID2

put merge("" & \
      "DELETE FROM [[tmysqltableName]] "& \
      "Where ([[tIDcolumnName]] = '[[tRecordID]]' "& \
      "OR  [[tIDcolumnName]] = '[[tRecordID-1]]') "& \
      "AND  [[tIDcolumnName]] = '[[tRecordID2]]'" & \
      "") into theSQL3

Fun with Rev  

Jim Ault
Las Vegas

use-revolution mailing list
use-revolution at
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:

More information about the Use-livecode mailing list