SQL Statement on Multiple Lines

Charles Hartman charles.hartman at conncoll.edu
Mon Jan 2 16:27:44 EST 2006


One thing you can do in some situations is to put the parts of a long  
string into custom properties (or even just local variables, I  
suppose), concatenate them into another variable using "&", and send  
the result off to (for instance) the SQL db. I sometimes build long  
queries this way, especially if long bits of text will always be the  
same but I need to include the current contents of a variable here  
and there.

Charles


On Jan 2, 2006, at 3:53 PM, Jeff Honken wrote:

> Jim,
>   Thanks for the response.  I'm trying to create a script that will
> recreate my database.  I need to create multiple tables and allot of
> inserts.  Jeff
>
> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Jim Ault
> Sent: Monday, January 02, 2006 1:42 PM
> To: How to use Revolution
> Subject: Re: SQL Statement on Multiple Lines
>
>> two lines it dies.  I've tried using the / with no luck.
> The correct character is "\"
>
> Not sure what you are doing specifically, but remember, the "\" cannot
> be
> used to split a string:
> NO:
> put "the lazy brown dog jumped \
> and bit the mailman" into neverHappened
>
> Yes, even in the multi-line message box:
> put " the lazy mailman bit " & \
> "the brown dog" into newsAtSix
>
>
> Jim Ault
> Las Vegas
>
> On 1/2/06 12:34 PM, "Jeff Honken" <jhonken at x12.info> wrote:
>
>> Is there any way to have a SQL statement on multiple lines.  My code
>> works great if the statement is all on one line but once I try to go
> to
>> two lines it dies.  I've tried using the / with no luck.  Here's a
> very
>> cut down version of what I'm trying:
>>
>> --> CONSTRUCT SQL
>>   put "CREATE TABLE Provider
>> (ProvAutoNo INTEGER PRIMARY KEY, ProvActive text)" into tSQL
>>   --> EXECUTE SQL
>>   put revdb_execute(gConID,tSQL) into tList
>>
>> The Provider table is actually very large.
>>
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
> subscription
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list