Subject Re: [firebird-support] Skipped internal numbers for rdb$relation_fields.rdb$field_position
Author Venus Software Operations
Thanks Ann for the script help. In the mean time, as I use VFP to
bring in the details, I used the RecNo() of the cursor containing the
field details as the position indicator and that seems to suffice the
requirement bypassing the direct hack to the system tables.

Now I have only one hack left, or two rather :), that modifies the
system tables directly, is when the DOMAIN or Field data type details
have changed. As I doubt the SQL command would allow me to do so.

Thanks and regards.
Bhavbhuti

On 14/07/2010 08:17 pm, Ann W. Harrison wrote:
>
> Venus Software Operations wrote:
> >
> > I noticed that there are skipped numbers for the series for a given
> > table fields in the rdb$relation_fields.rdb$field_position
>
> Dropping fields has that effect. And at least originally, there was
> no check that positions were dense - or even not duplicated.
> >
> > How can I get the corresponding visual field numbers? So even though a
> > table fields look the same in both the databases but internally the
> > development version has skipped numbers whereas not in the production
> > database. As I am trying to update a database remotely using script,
> > these missing numbers are flagging false positives.
> >
> > Currently I can hack the system tables and force the numbers as on the
> > dev. copy but I was hoping to detect field order changes if ever
> done on
> > the dev. copy and the same reorder to do on the prod. copy using
> > standard SQL command of ALTER TABLE aaa ALTER bbb POSITION 999
> >
>
> You could generate an ISQL script on the production database using a
> query like
>
> SELECT 'ALTER TABLE ' | rdb$relation_name | ' ALTER ' |
> rdb$field_name | ' POSITION ' | rdb$field_position
> FROM rdb$relation_field
> WHERE rdb$system_flag is null or rdb$system_flag = 0
>
> Run the script on the development table.
>
> Good luck,
>
> Ann
>
>
> Reply to sender
> <mailto:aharrison@...?subject=Re:%20[firebird-support]%20Skipped%20internal%20numbers%20for%20rdb$relation_fields.rdb$field_position>
> | Reply to group
> <mailto:firebird-support@yahoogroups.com?subject=Re:%20[firebird-support]%20Skipped%20internal%20numbers%20for%20rdb$relation_fields.rdb$field_position>
> | Reply via web post
> <http://groups.yahoo.com/group/firebird-support/post;_ylc=X3oDMTJycmpuam05BF9TAzk3MzU5NzE0BGdycElkAzI0NDI0MDYEZ3Jwc3BJZAMxNzA1MTE1Mzg2BG1zZ0lkAzEwOTIzNARzZWMDZnRyBHNsawNycGx5BHN0aW1lAzEyNzkxMTg4ODA-?act=reply&messageNum=109234>
> | Start a New Topic
> <http://groups.yahoo.com/group/firebird-support/post;_ylc=X3oDMTJlN2dxNmg2BF9TAzk3MzU5NzE0BGdycElkAzI0NDI0MDYEZ3Jwc3BJZAMxNzA1MTE1Mzg2BHNlYwNmdHIEc2xrA250cGMEc3RpbWUDMTI3OTExODg4MA-->
>
> Messages in this topic
> <http://groups.yahoo.com/group/firebird-support/message/109231;_ylc=X3oDMTM4OWJsa3IyBF9TAzk3MzU5NzE0BGdycElkAzI0NDI0MDYEZ3Jwc3BJZAMxNzA1MTE1Mzg2BG1zZ0lkAzEwOTIzNARzZWMDZnRyBHNsawN2dHBjBHN0aW1lAzEyNzkxMTg4ODAEdHBjSWQDMTA5MjMx>
> (2)
> Recent Activity:
>
> * New Members
> <http://groups.yahoo.com/group/firebird-support/members;_ylc=X3oDMTJmc2w4YW1rBF9TAzk3MzU5NzE0BGdycElkAzI0NDI0MDYEZ3Jwc3BJZAMxNzA1MTE1Mzg2BHNlYwN2dGwEc2xrA3ZtYnJzBHN0aW1lAzEyNzkxMTg4ODA-?o=6>
> 13
>
> Visit Your Group
> <http://groups.yahoo.com/group/firebird-support;_ylc=X3oDMTJlMWdiYW10BF9TAzk3MzU5NzE0BGdycElkAzI0NDI0MDYEZ3Jwc3BJZAMxNzA1MTE1Mzg2BHNlYwN2dGwEc2xrA3ZnaHAEc3RpbWUDMTI3OTExODg4MA-->
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups
> <http://groups.yahoo.com/;_ylc=X3oDMTJkb2dxMWFyBF9TAzk3MzU5NzE0BGdycElkAzI0NDI0MDYEZ3Jwc3BJZAMxNzA1MTE1Mzg2BHNlYwNmdHIEc2xrA2dmcARzdGltZQMxMjc5MTE4ODgw>
>
> Switch to: Text-Only
> <mailto:firebird-support-traditional@yahoogroups.com?subject=Change%20Delivery%20Format:%20Traditional>,
> Daily Digest
> <mailto:firebird-support-digest@yahoogroups.com?subject=Email%20Delivery:%20Digest>
> • Unsubscribe
> <mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe>
> • Terms of Use <http://docs.yahoo.com/info/terms/>
> .
>
> __,_._,__