Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 8 of 8 total
Thread Multiline sql with parameters
Fri, Apr 14 2006 12:06 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

I'm not sure if this should be considered a bug or not, but with a multiline sql statement (example below signature) unless the parameters are on the first line of the statement they are not shown when Params is clicked in the IDE.

Roy Lambert

DROP TABLE IF EXISTS "Memory\M1";
UPDATE BandA SET _Unread = NULL, _OnFile = NULL
WHERE _BoxNo BETWEEN :LowBox AND :HighBox;

SELECT _BoxNo, COUNT(_MsgUnread) AS _Unread INTO "Memory\M1" FROM ELN
WHERE _BoxNo BETWEEN :LowBox AND :HighBox AND _MsgUnread GROUP BY _BoxNo;

UPDATE BandA SET _Unread = M1._Unread FROM BandA JOIN "Memory\M1" M1 ON M1._BoxNo = BandA._BoxNo
WHERE _BoxNO BETWEEN :LowBox AND :HighBox;

DROP TABLE IF EXISTS "Memory\M1";
SELECT _BoxNo, COUNT(_BoxNo) AS _OnFile INTO "Memory\M1" FROM ELN
WHERE _BoxNo BETWEEN :LowBox AND :HighBox GROUP BY _BoxNo;

UPDATE BandA SET _OnFile = M1._OnFile FROM BandA JOIN "Memory\M1" M1 ON M1._BoxNo = BandA._BoxNo
WHERE _BoxNo BETWEEN :LowBox AND :HighBox;

DROP TABLE IF EXISTS "Memory\M1";
Fri, Apr 14 2006 2:25 PMPermanent Link

Aage Johansen
Roy Lambert wrote:
> I'm not sure if this should be considered a bug or not, but with a multiline sql statement (example below signature) unless the parameters are on the first line of the statement they are not shown when Params is clicked in the IDE.
>
> Roy Lambert
>
> DROP TABLE IF EXISTS "Memory\M1";
> UPDATE BandA SET _Unread = NULL, _OnFile = NULL
> WHERE _BoxNo BETWEEN :LowBox AND :HighBox;
>
> SELECT _BoxNo, COUNT(_MsgUnread) AS _Unread INTO "Memory\M1" FROM ELN
> WHERE _BoxNo BETWEEN :LowBox AND :HighBox AND _MsgUnread GROUP BY _BoxNo;
>
> UPDATE BandA SET _Unread = M1._Unread FROM BandA JOIN "Memory\M1" M1 ON M1._BoxNo = BandA._BoxNo
> WHERE _BoxNO BETWEEN :LowBox AND :HighBox;
>
> DROP TABLE IF EXISTS "Memory\M1";
> SELECT _BoxNo, COUNT(_BoxNo) AS _OnFile INTO "Memory\M1" FROM ELN
> WHERE _BoxNo BETWEEN :LowBox AND :HighBox GROUP BY _BoxNo;
>
> UPDATE BandA SET _OnFile = M1._OnFile FROM BandA JOIN "Memory\M1" M1 ON M1._BoxNo = BandA._BoxNo
> WHERE _BoxNo BETWEEN :LowBox AND :HighBox;
>
> DROP TABLE IF EXISTS "Memory\M1";
>

> ... a multiline sql statement ...

Isn't this 5 multiline statments plus 1 single line statement?
Is this in a script, or can you use the all the 6 statements in a single
query?

--
Aage J.
Fri, Apr 14 2006 3:42 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< I'm not sure if this should be considered a bug or not, but with a
multiline sql statement (example below signature) unless the parameters are
on the first line of the statement they are not shown when Params is clicked
in the IDE. >>

It's normal - DBISAM only loads up the first SQL statement in the IDE.  The
others have to be populated at runtime using the OnGetParams event.

--
Tim Young
Elevate Software
www.elevatesoft.com

Sat, Apr 15 2006 3:31 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Aage


Sorry - yes its a script - lots of sql statements all run in a single query.

Roy Lambert
Sat, Apr 15 2006 3:36 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


I knew I had to populate the params in the OnGetParams event I just thought the IDE would at least tell me the parameters existed Smiley

Roy Lambert
Mon, Apr 17 2006 7:20 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< I knew I had to populate the params in the OnGetParams event I just
thought the IDE would at least tell me the parameters existed Smiley>>

It can't, since it hasn't gotten to them yet. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Apr 17 2006 8:20 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

Would it help it to walk a bit further (for aster) if I dangled a carrot in front of it?


Roy Lambert
Mon, Apr 17 2006 12:16 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

"for aster" should have read "or faster" - duh

Roy Lambert
Image