Cursors and Where clauses - Point 5.

Joe Boyle atla38 at dsl.pipex.com
Tue Sep 6 09:02:33 CDT 2005


it's probably easier to use ' where ( matchcol like :d_mycol' ) and then
index on the returned/matched rows if you need it.

Define d_ mycol char * n =   '%' + truncate(mycol) + '%'

Regards, Joe. 

  _____  

From: powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com
[mailto:powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com] On Behalf Of
Joe Boyle
Sent: 06 September 2005 14:45
To: 'Glenn'; powerh-l at lists.sowder.com
Subject: RE: Cursors and Where clauses - Point 5.

 

Point 5.

 

I think it's the 'locate' function in SQLserver and 'INSTR' in Oracle.

 

Regards, Joe. 

  _____  

From: powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com
[mailto:powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com] On Behalf Of
Glenn
Sent: 06 September 2005 12:40
To: powerh-l at lists.sowder.com
Subject: Cursors and Where clauses

 

Hi List!

 

Environment ==

WindowsXp for Axiant 3.4D or D1

Win2000 Server and Sqlserver2000

Powerhouse 8.41D/D1 although 

Compilations via Axiant32 as above.

 

These issues preface the replacement of many Omnidex features embedded
within a Hp3000 environment, so your experience and help is much
appreciated!

 

A few Questions! ==

1.	A declare cusor statement supports how many characters? I think it
may be 255; given compilation errors. We have since trimmied variable names
to achieve ~230 with Ok compilations but reduced "parms" as passed from a
calling screen.
2.	Still needing more; "Where" clause content; from the passed
variables eg data ranges, invoice ranges etc -  lot's of "or t_var = blank";
I have used the Access statement on the record cursor. The documentation
suggests that this supplements any pre-existing where clauses {as above} ie
"and". It seems to work.
3.	As I still need to add more selects/where clauses to the new SQL;
but before trying; some assistance with respect to ::where_and etc
substitution would be great! The documentation reads well, but I am not
positive as to where to create the substitution strings - a define, a
temporary - neither seem to work - yet.
4.	Assistance with the SET LIST SQL clause would also be handy. With
Axiant, you can set this statement for Quick screens within the active
"Build Profile" - but where does it go? I would like to see the resulting
SQL as passed to the server.
5.	And Lastly:! A previous select clause used onb the Hp3000 using PH8
select syntax was : "and if 0> index(Passed_Variable, column) i.e. is the
Column value in the passed_variable? so to speak. A pointer at specific SQL
syntax would be handy! The Passed_Variable contains a list of
Customer_Codes, joined as {abcd+your+comp}, a Customer_Code will always be a
qualified "abcd", via lookup noton stuff on the calling form. 

Thanks

Glenn Baxter

=======================

Baxter IT Solutions Pty Ltd

e:  <mailto:glenn at baxterit.com.au> glenn at baxterit.com.au

=======================

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sowder.com/pipermail/powerh-l/attachments/20050906/7c1110fe/attachment.htm


More information about the powerh-l mailing list