[adminer-tracker] [ adminer-Bugs and Features-3088214 ] MSSQL - Error in gathering index informatio
Database management in a single PHP file
Brought to you by:
jakubvrana
From: SourceForge.net <no...@so...> - 2012-03-22 20:47:01
|
Bugs and Features item #3088214, was opened at 2010-10-15 10:07 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1127745&aid=3088214&group_id=264133 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: MS SQL Group: 3.0.0 Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Jakub Vrána (jakubvrana) Summary: MSSQL - Error in gathering index information Initial Comment: Adminer with MS SQL Server 2005 uses following query to gather index informations: SELECT indexes.name, key_ordinal, is_unique, is_primary_key, columns.name AS column_name FROM sys.indexes INNER JOIN sys.index_columns ON indexes.object_id = index_columns.object_id AND indexes.index_id = index_columns.index_id INNER JOIN sys.columns ON index_columns.object_id = columns.object_id AND index_columns.column_id = columns.column_id WHERE OBJECT_NAME(indexes.object_id) = 'table_name' Query returns these errors: The multi-part identifier "indexes.object_id" could not be bound. The multi-part identifier "index_columns.object_id" could not be bound. The multi-part identifier "indexes.index_id" could not be bound. The multi-part identifier "index_columns.index_id" could not be bound. The multi-part identifier "index_columns.object_id" could not be bound. The multi-part identifier "columns.object_id" could not be bound. The multi-part identifier "index_columns.column_id" could not be bound. The multi-part identifier "columns.column_id" could not be bound. The multi-part identifier "indexes.object_id" could not be bound. The multi-part identifier "indexes.name" could not be bound. The multi-part identifier "columns.name" could not be bound. Correct query (version A): SELECT sys.indexes.name, key_ordinal, is_unique, is_primary_key, sys.columns.name AS column_name FROM sys.indexes INNER JOIN sys.index_columns ON sys.indexes.object_id = sys.index_columns.object_id AND sys.indexes.index_id = sys.index_columns.index_id INNER JOIN sys.columns ON sys.index_columns.object_id = sys.columns.object_id AND sys.index_columns.column_id = sys.columns.column_id WHERE OBJECT_NAME(sys.indexes.object_id) = 'table_name' Correct query (version B): SELECT i.name, key_ordinal, is_unique, is_primary_key, c.name AS column_name FROM sys.indexes i INNER JOIN sys.index_columns ic ON i.object_id = ic.object_id AND i.index_id = ic.index_id INNER JOIN sys.columns c ON ic.object_id = c.object_id AND ic.column_id = c.column_id WHERE OBJECT_NAME(i.object_id) = 'table_name' ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2012-03-22 13:47 Message: vNsVnH <a href="http://gmxlgrryfetc.com/">gmxlgrryfetc</a>, [url=http://uhmkdxdharzm.com/]uhmkdxdharzm[/url], [link=http://nssxtodoqmjo.com/]nssxtodoqmjo[/link], http://onbbidhodhju.com/ ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2010-10-16 06:57 Message: Thanks for fixing. Adminer shows correct index information. ---------------------------------------------------------------------- Comment By: Jakub Vrána (jakubvrana) Date: 2010-10-15 23:24 Message: Fixed in Git, thank you for the report. Can you please confirm if Adminer works with MS SQL 2005? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1127745&aid=3088214&group_id=264133 |