Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder2.hal-mli.net!newsfeed.CARNet.hr!garrison.bnet.hr!gregory.BNet.hr!not-for-mail From: "m" Newsgroups: comp.databases.ms-sqlserver Subject: Re: indexes Date: Tue, 10 Jan 2012 08:39:09 +0100 Organization: B.net Hrvatska d.o.o. Lines: 39 Message-ID: References: NNTP-Posting-Host: 83.139.114.5 X-Trace: gregory.bnet.hr 1326181149 31951 83.139.114.5 (10 Jan 2012 07:39:09 GMT) X-Complaints-To: abuse@globalnet.hr NNTP-Posting-Date: Tue, 10 Jan 2012 07:39:09 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: x330-a1.tempe.blueboxinc.net comp.databases.ms-sqlserver:896 Thank you. "Erland Sommarskog" wrote in message news:Xns9FD5EF9621647Yazorman@127.0.0.1... >m (web12master@gmail.com) writes: >> I've been trying to run this sql: >> >> SELECT b.fill_factor, b.type_desc, a.index_id, b.name, >> a.avg_fragmentation_in_percent, a.avg_page_space_used_in_percent >> >> FROM sys.dm_db_index_physical_stats ( DB_ID() , NULL, NULL, NULL, NULL) >> AS a >> >> JOIN sys.indexes AS b ON a.object_id = b.object_id AND a.index_id = >> b.index_id; >> >> We have few database on our server. >> >> On most of them this sql statement works fine, but on few of them I got >> error >> >> Msg 102, Level 15, State 1, Line 8 >> >> Incorrect syntax near '('. >> >> What could be a problem? > > These databases are in compatibility mode 80. > > > -- > Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se > > Links for SQL Server Books Online: > SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx > SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx >