BUG: Using Col Name Input to index_col Causes Alignment Fault

Last reviewed: April 30, 1997
Article ID: Q119109

The information in this article applies to:

  - Microsoft SQL Server version 4.21
BUG# NT: 870 (4.2 - NTMIPS)

SYMPTOMS

The function index_col expects three parameters:

  • object name, where object_name is the table name.
  • index id, where index id is sysindexes.indid for the index in question.
  • key_id, where key_id is syscolumns.colid for the column in question.

This tells you the column name of a specific indexed column.

For example:

   select index_col('roysched', 2, 1) yields "title_id" as the result.

However, if instead of using colid as parameter three, you use a column name and if the column name is from a table containing
int data, an alignment fault occurs on MIPS.

For example,

   select index_col('roysched', 2, tab1.a) from tab1

causes an alignment fault on MIPS.

Using a column name instead of a column id is permissible syntax and is used as an example in the "Transact-SQL Reference," page 163.

WORKAROUND

Use an integer or integer variable as the third parameter to index_col. See the SQL Server installation scripts in \SQL\INSTALL for more examples on using the index_col function.

STATUS

Microsoft has confirmed this to be a problem in SQL Server version 4.21. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional query words: Windows NT
Keywords : kbbug4.21 kbprg SSrvRISC SSrvWinNT
Version : 4.21
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.