🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.vdbase.data.sql
2 messages
2 total messages Started by Andrea Fri, 19 Mar 1999 00:00
Index composed
#56
Author: Andrea
Date: Fri, 19 Mar 1999 00:00
40 lines
1449 bytes
Hi,
How i can do for create an index on 2 filelds of a table; the first fields
is LONG type (userID) and the second fields is CHARATER type (nameID).
This for display in a grid the name of a type of user in alfabetic order in
a ralation 1-N with the table father that contains the various types of
userID.
es.

this.QUERY1 = new QUERY()
   this.QUERY1.parent = this
   with (this.QUERY1)
      left = 19
      top = 0.5
      database = form.database1
      sql = 'select * from "typeusers.dbf"'
      active = true
   endwith

   with (this.QUERY1.rowset)
        indexName = "USERTYPE"
   endwith

   this.QUERY2 = new QUERY()
   this.QUERY2.parent = this
   with (this.QUERY2)
      left = 24
      top = 0.5
      database = form.database1
      sql = 'select * from "users.dbf" '
      active = true
   endwith

   with (this.QUERY2.rowset)
      indexName = "USERID"
      masterRowset = parent.parent.query1.rowset
      masterFields = "USERID"
   endwith

Thank's.
Andrea.
Re: Index composed
#57
Author: Romain Strieff [TeamB]
Date: Fri, 19 Mar 1999 00:00
15 lines
906 bytes
In article <7csov0$acc11@forums.borland.com>, Andrea politely paraphrased 
...
> How i can do for create an index on 2 filelds of a table; the first fields
> is LONG type (userID) and the second fields is CHARATER type (nameID).

Index on str(userid,10,0,"0")+nameid tag mytag


Naturally you'd also need a such a one (of type character) for the 
_parent_ or it wouldn't be possible to relate the 2 tables.

Index on str(userid,10,0,"0") tag mytag

-- 
Romain Strieff [dBVIPS]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads