How Do I Create A Fulltext Index On A View?

Oct 30, 2007

Hello all,

I'm wanting to do a CONTAINS query on fields that belong to two seperate tables. So, for example, this is what I'd *like* to do :

SELECT ci.itemName
FROM Content_Items ci
INNER JOIN Content_Pages AS cp ON ci.contentItemId = cp.contentItemId
INNER JOIN FREETEXTTABLE(Content_Items, (ci.title, cp.pageText), @searchString) AS ft ON ci.contentItemId = ft.[KEY]

However, this will not work, since SQL Server won't let you do fulltext queries against more then one table.

So my idea is to create a view that combines my Content_Items table with the desired column from my Content_Pages table. I would then create a fulltext index on this view, and do fulltext queries against it.

It seems like this should work. However, when I try to create a fulltext index on my newly-created view, I get this error :
A unique column must be defined on this table/view.

How do I create a unique column within a view?

Also, will my approach work, or will it have unintended consequences? I'm using this as part of a search component in my software, so it has to perform reasonably well.

View 1 Replies


ADVERTISEMENT

How Do I Create A Fulltext Index On A View?

Oct 30, 2007

Hello all,I'm wanting to do a CONTAINS query on fields that belong to two seperate tables.  So, for example, this is what I'd *like* to do :SELECT ci.itemNameFROM Content_Items ciINNER JOIN Content_Pages AS cp ON ci.contentItemId = cp.contentItemIdINNER JOIN FREETEXTTABLE(Content_Items, (ci.title, cp.pageText), @searchString) AS ft ON ci.contentItemId = ft.[KEY]However, this will not work, since SQL Server won't let you do fulltext queries against more then one table.So my idea is to create a view that combines my Content_Items table with the desired column from my Content_Pages table.  I would then create a fulltext index on this view, and do fulltext queries against it.It seems like this should work.  However, when I try to create a fulltext index on my newly-created view, I get this error :A unique column must be defined on this table/view.How do I create a unique column within a view?Also, will my approach work, or will it have unintended consequences?  I'm using this as part of a search component in my software, so it has to perform reasonably well.

View 1 Replies View Related

How Do I Create A Fulltext Index On A View?

Oct 30, 2007

Hello all,


I'm wanting to do a CONTAINS query on fields that belong to two seperate tables. So, for example, this is what I'd *like* to do :


SELECT ci.itemName
FROM Content_Items ci
INNER JOIN Content_Pages AS cp ON ci.contentItemId = cp.contentItemId
INNER JOIN FREETEXTTABLE(Content_Items, (ci.title, cp.pageText), @searchString) AS ft ON ci.contentItemId = ft.[KEY]


However, this will not work, since SQL Server won't let you do fulltext queries against more then one table.


So my idea is to create a view that combines my Content_Items table with the desired column from my Content_Pages table. I would then create a fulltext index on this view, and do fulltext queries against it.


It seems like this should work. However, when I try to create a fulltext index on my newly-created view, I get this error :
A unique column must be defined on this table/view.


How do I create a unique column within a view?


Also, will my approach work, or will it have unintended consequences? I'm using this as part of a search component in my software, so it has to perform reasonably well.

View 7 Replies View Related

CREATE FULLTEXT INDEX

Sep 1, 2007

Hi All,

I am using SQL SERVER 2005 Express. I am trying to set up CREATE FULLTEXT INDEX.

I have confirmed that the Fulltext is installed with:

SELECT
fulltextserviceproperty('IsFulltextInstalled')

So no I need to create a Full Text index:

CREATE FULLTEXT INDEX
ON E190MELCDL(xmldata)
KEY INDEX PK_E190MELCDL

But I get this error:

Informational: No full-text supported languages found.

Informational: No full-text supported languages found.

Msg 7680, Level 16, State 1, Line 1

Default full-text index language is not a language supported by full-text search.

Any Ideas?

Thanks,

Bones

View 7 Replies View Related

FTS. Can't Create FullText INDEX

Jan 15, 2007

I've got fresh Installed SQLExpress 2005 Adv. with a following:
WinXP Pro, Developer PC, Admin/Full rights, Antivirus PC-Cilin was switched off for the installation.Enable User Instance - 0 (clear check box during installation)SQL Collation: Dictionary order case sensetive for1252 Char setSELECT @@language: us_englishcreate fulltext catalog testAPFullTextcatalog,
Sp_help_FullText_catalogs: 5 testAPFullTextcatalog C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLFTData estAPFullTextcatalog 0 0create unique index indexName_Comment on dbo.FullTextSearchTestTable(RecordID)
sp_configure:
allow updates 0 1 0 0
clr enabled 0 1 0 0
cross db ownership chaining 0 1 0 0
default language 0 9999 0 0
max text repl size (B) 0 2147483647 65536 65536
nested triggers 0 1 1 1
remote access 0 1 1 1
remote admin connections 0 1 0 0
remote login timeout (s) 0 2147483647 20 20
remote proc trans 0 1 0 0
remote query timeout (s) 0 2147483647 600 600
server trigger recursion 0 1 1 1
show advanced options 0 1 0 0
user instances enabled 0 1 0 0
user options 0 32767 0 0CREATE FULLTEXT INDEX ON dbo.FullTextSearchTestTable(Comment)
KEY INDEX indexName_Comment ON testAPFullTextcatalog
WITH CHANGE_TRACKING AUTO
Result:
Informational: No full-text supported languages found.
Informational: No full-text supported languages found.
Msg 7680, Level 16, State 1, Line 1Default full-text index language is not a language supported by full-text search.

I couldn't overcome the issue. Please help.

Alexei


P.S. May be Important: During installation (on Management Studio Express installation stage) a had to click twice the "Ignore" button for the following popUp message:
"Could not write value to key:
SoftwareClasses.xdropenWithProgIdsShared - verify, if you have sufficient access to hot key or contact your support.

View 10 Replies View Related

Can't Create Fulltext Index

May 1, 2007

I'm about ready to smash my computer. I've installed SQL Server 2005 Express Edition with Advanced Services on Win XP Pro SP2. I made sure to enable the Fulltext service at install. Installed to the default instance name, and made sure the fulltext service is running from the CM. I made sure to enable full text indexing on my database from the properties window. I can create the fulltext catalog, but not the index!

----

create fulltext index on [person.contact] (Lastname)

key index [PK_Person.Contact] on myfulltextcatalog



Informational: No full-text supported languages found.

Informational: No full-text supported languages found.

Msg 7680, Level 16, State 1, Line 1

Default full-text index language is not a language supported by full-text search.

----------------------------------------------

select * from sys.fulltext_catalogs



returns the catalog



----------------------------------------------



sp_fulltext_service 'update_languages'



Informational: No full-text supported languages found.



----------------------------------------------



select @@language



us_english



----------------------------------------------



select * from sys.fulltext_languages



Returns an empty table



----------------------------------------------

SELECT * FROM sys.configurations

ORDER BY name ;



1126 default full-text language 1033 0 2147483647 1033 default full-text language 1 1

----------------------------------------------



Does anyone have any idea what's going on? I've already removed and re-installed a couple of times to different directories, used different instance names, and still no luck. Any help would be greatly appreciated.



Mike

View 6 Replies View Related

Can't Create An Index On My View

Dec 1, 2004

G'day all.

I am trying to create an index on a view that joins two tables.

I get the classic error of course:
'Cannot index the view 'dbname.dbo.HJC_net'. It contains one or more disallowed constructs.'

Thing that gets me is that it all seems pretty normal stuff and I can't see what is stopping it.

Code is below and any help greatly appreciated.

CREATE VIEW dbo.HJC_net WITH SCHEMABINDING AS
SELECTt_number
FROM dbo.ticket_cancellations RIGHT OUTER JOIN
dbo.tickets ON dbo.ticket_cancellations.tc_system_ref = dbo.tickets.t_number
WHERE dbo.tickets.t_cancelled <> - 1 OR
-- Add all cancellation codes that are to be excluded from the NET view below
(dbo.ticket_cancellations.tc_cancellation_code <> 83943
AND dbo.ticket_cancellations.tc_cancellation_code <> 83946)

GO
-- Create a clustered index, it MUST be unique
CREATE UNIQUE CLUSTERED INDEX t_number_unique ON HJC_net(t_number)

View 1 Replies View Related

CREATE INDEX ON VIEW

May 28, 2008

Cannot create index on
view 'View name ' because the view is not schema bound." What is the
Schema bound ? How can i create the view Schema bound ?

Pls help me out Sir


Yaman

View 1 Replies View Related

Create Clustered Index On A View

Mar 16, 2001

I have a view named select id,name,state from customer where state ='va'
can I create clustered index on a view (name) if so please provide me with the sql statement.
Thanks
Al

View 2 Replies View Related

How To Create Index In The View On MS SQL 2000?--URGENT!!!

Sep 14, 2001

Hi ALL,

How to create index in the view on MS SQL 2000?

Thank you very much!

View 4 Replies View Related

Fulltext Index Is Not Covering All Entries

Dec 5, 2007

Hello,
i have a database with about 300.000 entries. The database gets about 30 new entries every day. The Database has an FulltextIndex on several columns. This FulltextIndex will be updated every night.
But now i have found out, that the fulltextsearch doesn't work anymore for all entries that where added after April 2006.
When i for example make following sql-statementSELECT id,date FROM MyTable WHERE (CONTAINS((columnA),' "mykeyword" '))

i only get results that have a date after April 2006 (although there are matching entries after that date).
What can the reason for that be?
According to Management Studio the last Update of the FulltextCatalog has been made on 1st of December 2007. Everything looks normal and I didn't find any logs that are saying that there has been any errors.
Where do I have to look to be sure if the FullTextIndex does work?
Specs:
SQL Server 2005
Microsoft SQL Server Management Studio      9.00.1399.00Microsoft Analysis Services-Clienttools      2005.090.1399.00Microsoft Data Access Components (MDAC)      2000.086.3959.00 (srv03_sp2_rtm.070216-1710)Microsoft MSXML      2.6 3.0 6.0 Microsoft Internet Explorer      6.0.3790.3959Microsoft .NET Framework      2.0.50727.832Operating System 5.2.3790
 
greetings
Klaus

View 3 Replies View Related

Weighted Search On Fulltext Index

Aug 20, 2007

SQL Server 2005:
Anyone know how best to rewrite this SQL string to perform a weighted search on my table?
here's my code:
SQL="SELECT RecipeName FROM recipeList WHERE FREETEXT(*,'ISABOUT " & ing01 & " WEIGHT (.1) or " & ing02 & " WEIGHT (.2) or " & ing03 & " WEIGHT (.3) or " & ing04 & " WEIGHT (.4) or " & ing05 & " WEIGHT (.5)')"
the idea is to get a list of recipes most pertinant to the ingredients entered.
table 'recipeList' contains the ingredients in several columns. so column 2 might say '5oz of flour', column 2 - '2oz butter' etc.

at the moment it returns the correct recipes but not in the right order.
If I use 'CONTAINS' it returns nothing.
hope that's not too vague!

View 10 Replies View Related

Can't Backup DB Or Drop FullText Index

Mar 29, 2008

I just tried to backup a database I recently deployed to to SQL Server 2005 box, and got the following error:

The backup of full-text catalog 'myCatalog' is not permitted because it is not online. Check errorlog file for the reason that full-text catalog became offline and bring it online.
Or BACKUP can be performed by using the FILEGROUP or FILE clauses to restrict the selection to include only online data.


I don't need the index so I tried to drop it with both:

DROP fulltext catalog 'myCatalog'

and

DROP catalog 'myCatalog'


but both give me a syntax error.

How can I get rid of this index so I can backup my database?

Thanks,

Tristan

View 2 Replies View Related

Merge Replication And FullText Index

Oct 5, 2007

We are designing a scenario in which we will have a central publisher and several subscribers in a server to server environment using Merge replication. We also will have a fulltext index for one of the tables being replicated and synchronized. What are your recommendations for the index? Would auto change tracking reduce the impact? We are building for a possible 1 billion row table but do not anticipate more than 100K rows at any time of replication.

Thanks,

Sally

View 4 Replies View Related

How Can I Check Whether A Table In Database Has The FULLTEXT INDEX Or Not.

Oct 7, 2004

Our production DBs are SQL Server 2000(Enterprise Edition) on Windows2003.
Can anybody tell me how can I check whether a table has a FullText Index or not?

Thank you!

View 1 Replies View Related

Fulltext Index Taking Up All The Disk Space

Mar 27, 2007

I am running a DB with 250Gb of documents, the fulltext index just keeps growing and growing. The files in the MssearchCatalogDir folder is currently taking up 106Gb, it was only 74Gb this morning. The full text catalog size property says its only 53.6Gb and this is remaining steady while the files in the MssearchCatalogDir folder seem to be balloning out of control. I ran a reorg on the fulltext catalog and it did not alter the file space (actually increased it).

There is one *.ci file that is doing most of the growing, its about three times as big as the second biggest one and is expanding before my eyes.

Should I have turned population off when I did the reorg?

Manamgement studio has an Optimize catalog option on the fulltext catalog properties dialog, is this different from a fulltext catalog reorg? Should I run this.

Should I run a shrink file on the filegroup containing the fulltext catalog (the filegroup itself is very small, all the space is in the MssearchCatalogDir folder)?

I have 140Gb left on this drive, is it just going to keep on expanding until I'm out of room, I just dont know what I should do.



Abit more info.....

I was rebuilding the index from scratch (needed to move it to another filegroup).

When I first started the rebuild, msftesql.exe and msftefd.exe were both taking alot of cpu and the overall cpu usage was high. Now after 12 hours, only msftesql.exe is running and is taking up 5-10% cpu. Could it be that the rebuild is not complete yet? Although the Item Count property of the full text catalog does seem to indicate that all documents have been processed, the processes keeps running and disk space keeps going down.

View 1 Replies View Related

SQL Server 2005 : Piecemeal Restore With Fulltext Index

Mar 27, 2008

Hi,

I have a problem restoring a Read-Only filegroup in a database.
I've restored the Read/Write filegroups first without any problem.

Then, I am able to recover Read-Only filegroups which do not contain fulltext indexes with the command :
RESTORE DATABASE GSM FILEGROUP = 'FG_RO_20080214' WITH RECOVERY

However, for filegroups containing FullText indexes (Fulltext indexes are in the same filegroup as data used for this index), I always get the following error :

Server: Msg 3149, Level 16, State 6, Line 1
The file or filegroup "sysft_CAT_SM_20080127" is not in a valid state for the "Recover Data Only" option to be used. Only secondary files in the OFFLINE or RECOVERY_PENDING state can be processed.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

If I'm looking at sys.database_files catalog view, I can see the following
name type_desc state_desc
------------------------ ----------- -----------------
sysft_CAT_MS_20080127 FULLTEXT RECOVERY_PENDING

Does anyone have an idea, please.

Thanks in advance
Patrick

View 2 Replies View Related

Fulltext Index Error With Query Word BARBE

Jul 30, 2007

For demonstration I created a fulltext index on table employee in Northwind database.

The following query gives an error:

SELECT * FROM employees
WHERE CONTAINS (FirstName, 'Barbe')

Replacing 'Barbe' by 'Barb' or other words it works fine.

The error message is (I have a french version of SQL installed, here the translation: "A clause in the query contains only ignored words"
Une clause de la requête ne contient que des mots ignorés)

Language for wordbreak in fulltext index is French and the error happens only with French, with English it works.

Is this a Microsoft bug?

View 1 Replies View Related

FullText Change-tracking And Update-index Were Disabled

Jul 30, 2007

How can i enable my fulltex change-tracking and update-index in my table?
I recreated my fulltext catalog and start the full population, but although my fulltext index status shows active, my full-text change-tracking and the update index were disabled. - and I don't know how to enable them.
Thanks in advance

View 3 Replies View Related

SQL Search :: Truncate And Load A Table With FullText Index?

Jun 4, 2015

I am using SSIS to replace set of tables daily. One of the table has primary, unique, foreign keys and full-text index. Before truncating, I am dropping the foreign key constraints (to truncate the parent table), truncating the tables and recreating the foreign keys.

I have few questions:

1) Do I need to drop and recreate the unique key as well? (I am not dropping the primary key) - Unique key is identity column created just for the full-text indexing since it was mentioned that key on integer is better than key on varchar and my pk is a varchar.

2) Do I need to drop and recreate the full-text index or just rebuild/repopulate it every time the table is loaded.

This is the first time i am using  full text index and I was able to learn a lot about it from the sites. I would like to understand the correct approach while loading the tables.

View 4 Replies View Related

FullText Search Not Returning Results After Rebuilding Full Text Index

Aug 6, 2012

We have a table that is Full Text Search index enabled on one column.This table has 200 lakhs of rows(20000000) . ContainsTable() function is searching data with in these 200 lakhs of rows(20000000), if any new rows are inserted then the ContainsTable is not going to search in these recent inserted rows.

We observed when we try for a data to search. it is returning the rows till the rows that are inserted date is less than 30th of march 2012. but not searching in the records that are created after April month , if even the data we are searching is available .

TableFulltextItemCount is around 2.2 crores.

Then we done rebuilt the FT catalog Index. then the TableFulltextItemCount became 0.Again we run the containstable query ,but still it is not getting results.

As the no of rows are very more . so i am not able to show the actual rows from which the data is not coming.

the below query gives 2 results that are from actual base table

HTML Code:
select * from g_case_action_log where cas_details like '%235355%' and product_id = 38810

To search for the same above word using FTS,I have used the query as below

HTML Code:
SELECT Distinct top 50 cal.case_id,cal.cas_details From g_case_action_log cal (READUNCOMMITTED)inner join containstable(es.g_case_action_log, cas_details, ' ("235355" OR "<br>235355" OR "235355<br> ") ') as key_tbl on cal.log_id = key_tbl.[key] Where cal.product_id = 38810 ORDER By cal.case_id DESC

I have attached one sql script file for your ref that contains create logic and index schema properties

Why it is not returning results all the time.

View 1 Replies View Related

Language Error When Creating FULLTEXT INDEX By Using SQL Server 2005 Management Express!

Apr 12, 2007

Hello..
When I used Microsoft SQL Server 2005 Management Studio Express to Create FULL TEXT INDEX by this code:

CREATE FULLTEXT INDEX ON txtfilestbl(txtfile) KEY INDEX PK_txtfilestbl ON ForumsArchiveLibCtlg WITH CHANGE_TRACKING AUTO

It returns this ERR MSG:

Informational: No full-text supported languages found.
Informational: No full-text supported languages found.
Msg 7680, Level 16, State 1, Line 1
Default full-text index language is not a language supported by full-text search.

I Use same this code to create FULL TEXT INDEX by using Microsoft SQL Server 2005 Management Studio, and it was working properly.
What I have to do?

View 2 Replies View Related

CREATE FULLTEXT CATALOG Inside A User Transaction.

Jan 15, 2007

hi:

I try to create full text for new created tables.

Since all new created tables will have same columns with different table name.

After I run the stored procedure to create table, after i got the new table name, I would like to create full-text on that table in the DDL triger.

But I got error like this:

CREATE FULLTEXT CATALOG statement cannot be used inside a user transaction.

Any one has idea how to deal with it?

Thanks

View 3 Replies View Related

Creating Index On A View To Prevent Multiple Not Null Values - Indexed View?

Jul 23, 2005

I am looking to create a constraint on a table that allows multiplenulls but all non-nulls must be unique.I found the following scripthttp://www.windowsitpro.com/Files/0.../Listing_01.txtthat works fine, but the following lineCREATE UNIQUE CLUSTERED INDEX idx1 ON v_multinulls(a)appears to use indexed views. I have run this on a version of SQLStandard edition and this line works fine. I was of the understandingthat you could only create indexed views on SQL Enterprise Edition?

View 3 Replies View Related

Clustered Index On Client_ID+ORderNO+OrdersubNo, If I Create 3 Noncluster Index On Said Column Will It Imporve Performance

Dec 5, 2007



Dear All.

We had Teradata 4700 SMP. We have moved data from TD to MS_SQL SERVER 2003. records are 19.65 Millions.

table is >> Order_Dtl

Columns are:-

Client_ID varchar 10
Order_ID varchar 50
Order_Sub_ID decimal
.....
...
..
.
Pk is (ClientID+OrderId+OrderSubID)

Web Base application or PDA devices use to initiate the order from all over the country. The issue is this table is not Partioned but good HP with 30 GB RAM is installed. this is main table that receive 18,0000 hits or more. All brokers and users are using this table to see the status of their order.

The always search by OrderID, or ClientID or order_SubNo, or enter any two like (Client_ID+Order_Sub_ID) or any combination.

Query takes to much time when ever server receive more querys. some orther indexes are also created on the same table like (OrderDate, OrdCreate Date and Status)

My Question are:-


Q1. IF Person "A" query to DB on Client_ID, then what Index will use ? (If any one do Query on any two combination like Client_ID+Order_ID, So what index will be uesd.? How does MS-SQL SERVER deal with these kind of issues.?

Q2. If i create 3 more indexes on ClientID, ORderID and OrdersubID. will this improve the performance of query.if person "A" search record on orderNo so what index will be used. (Mind it their would be 3 seprate indexes for Each PK columns) and composite-Clustered index is also available.?

Q3. I want to check what indexes has been used? on what search?

Q4. How can i check what table was populated when, or last date of update (DML)?

My Limitation is i Dont Create a Partioned table. I dont have permission to do it.



In Teradata we had more than 4 tb record of CRM data with no issue. i am not new baby in db line but not expert in sql server 2003.


I am thank u to all who read or reply.

Arshad

Manager Database
Esoulconsultancy.com

(Teradata Master)
10g OCP










View 3 Replies View Related

Write A CREATE VIEW Statement That Defines A View Named Invoice Basic That Returns Three Columns

Jul 24, 2012

Write a CREATE VIEW statement that defines a view named Invoice Basic that returns three columns: VendorName, InvoiceNumber, and InvoiceTotal. Then, write a SELECT statement that returns all of the columns in the view, sorted by VendorName, where the first letter of the vendor name is N, O, or P.

This is what I have so far,

CREATE VIEW InvoiceBasic AS
SELECT VendorName, InvoiceNumber, InvoiceTotal
From Vendors JOIN Invoices
ON Vendors.VendorID = Invoices.VendorID

[code]...

View 2 Replies View Related

Dynamic Create Table, Create Index Based Upon A Given Database

Jul 20, 2005

Can I dynamically (from a stored procedure) generatea create table script of all tables in a given database (with defaults etc)a create view script of all viewsa create function script of all functionsa create index script of all indexes.(The result will be 4 scripts)Arno de Jong,The Netherlands.

View 1 Replies View Related

Problems On Create Proc Includes Granting Create Table Or View Perissinin SP

Aug 4, 2004

Hi All,

I'm trying to create a proc for granting permission for developer, but I tried many times, still couldn't get successful, someone can help me? The original statement is:

Create PROC dbo.GrantPermission
@user1 varchar(50)

as

Grant create table to @user1
go

Grant create view to @user1
go

Grant create Procedure to @user1
Go



Thanks Guys.

View 14 Replies View Related

Grant CREATE VIEW, CREATE PROCEDURE ...

Apr 12, 2006

Hi,

I have currently a problem with setting up the permissions for some developers. My configuration looks like this.

DB A is the productive database.

DB B is a kind of "development" database.

Now we have a couple of users call them BOB, DAVID, ...

who are members of the db role db_reader and db_writer for the productive db a but they should be allowed to do nearly everything on db b.

Therefor I added them to the db role db_owner for db b.

For testing purposes I tried to "CREATE" a view TEST as BOB in database B but I received the error message

'Msg 262, Level 14, State 1, Procedure Test, Line 3

CREATE VIEW permission denied in database 'b'.'

I cross checked the permissions on db level and I even granted all available permissions on db level but nevertheless I receive this error message.

What's my mistake?

Of course it worked fine when I give them sysadmin rights but then they have far too much permissions.

Regards,

Stefan

View 8 Replies View Related

Alter View / Create View

Aug 14, 2000

I had given one of our developers create view permissions, but he wants to also modify views that are not owned by him, they are owned by dbo.

I ran a profiler trace and determined that when he tries to modify a view using query designer in SQLem or right clicks in SQLem on the view and goes to properties, it is performing a ALTER VIEW. It does the same for dbo in a trace (an ALTER View). He gets a call failed and a permission error that he doesn't have create view permissions, object is owned by dbo, using both methods.

If it is doing an alter view how can I set permissions for that and why does it give a create view error when its really doing an alter view? Very confusing.

View 1 Replies View Related

Index On View

Jun 15, 2004

Hi

I have a problem creating an index on a view. The view should return the record corresponding to the Maximum Obje_ID. This seems to work.

CREATE VIEW dbo.D_Object_View
WITH SCHEMABINDING
AS
SELECT
Policy_ID,
Obj_ID,
Environment_Code,
CoB,
Sub_CoB,
Policy_No,
Version_No,
Object_Type,
Item_Seq,

FROM dbo.D_Object
WHERE
(Obj_ID IN
(SELECT MAX(Obj_ID)
FROM dbo.d_object
GROUP BY Environment_Code, COB, Policy_No, SUB_COB, Object_Type, Item_Seq))


I create the index with the following statement :
CREATE UNIQUE CLUSTERED INDEX [IX_Object_ID] ON [dbo].[D_Object_View]([Obj_ID]) ON [PRIMARY]

but get the following error :
Cannot index the view 'DB.dbo.D_Object_View'. It contains one or more disallowed constructs.

I think it is because of the MAX statement but don't know of any other way to do it. :confused:

View 4 Replies View Related

Index On View

Sep 30, 2004

Is it possilbe to create an index on a view using a linked server table? I am using openquery and I know I can't use rowset functions if I want to index a view.

I just didn't know if there was any other way to access the linked server data in order to create an index.

thanks!!

View 2 Replies View Related

About Index And View

Jul 8, 2006

hi,i am a beginner, i want to know
what is the different between index and view?
in my option,i think they do one job:let the select quickly!

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved