In order to be able to index a cursor obtained from a select statement 
you should use the readwrite clause

What you do is this:

select fieldslist from yourtable into cursor yourcursor readwrite 
nofilter where conditions

(you don't even need a where clause and you would still be able to index 
the cursor)

select yourcursor
index on field1 tag tag1
index on field2 tag tag2
etc


Your resulting cursor does not need to have any records either in order 
to be able to index it.

You could as well have done this:

select fieldslist from yourtable into cursor yourcursor readwrite 
nofilter where 1 = 0

this would give an empty yourcursor  and you would still be able to 
index it with as many tags as you like.


Rafael Copquin


El 04/03/2010 19:14, Jon Westcot escribió:
> Hi all:
>
>      The subject line kind of says it all.  I'm trying to create a temporary
> cursor that has two indexes.  I'm using the SELECT... INTO CURSOR option to
> create said cursor, then issue my two index statements.  The first one,
> INDEX ON... TAG x works just fine, but the second one, INDEX ON... TAG y
> ADDITIVE, fails.
>
>      I _know_ that I've been able to do this in the past, and I just cannot
> remember how to do it.  Do I need to create the cursor first and then
> populate it?  Or is there a way to get this type of code to accept two (or
> more) indexes that I'm just not remembering?
>
>      Thanks for any help you can send my way!
>
>      Appreciatively,
>
>          Jon
>
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to