Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 8 of 8 total |
Multiline sql with parameters |
Fri, Apr 14 2006 12:06 PM | Permanent Link |
Roy Lambert NLH Associates 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 PM | Permanent 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 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. 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 AM | Permanent Link |
Roy Lambert NLH Associates 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 AM | Permanent Link |
Roy Lambert NLH Associates 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 Roy Lambert |
Mon, Apr 17 2006 7:20 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. 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 >> It can't, since it hasn't gotten to them yet. -- Tim Young Elevate Software www.elevatesoft.com |
Mon, Apr 17 2006 8:20 AM | Permanent Link |
Roy Lambert NLH Associates 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 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | "for aster" should have read "or faster" - duh
Roy Lambert |
This web page was last updated on Monday, May 6, 2024 at 12:23 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |