.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

How to create Index on Inline View columns

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :Sql Server


i faced one problem when worked with Inline views.

For some reasons, i used Inline views in our project. Is there any possiblity to create Index on InlineViews. I will expain more clearly using my code.

select (Row_Number() over (order by Net)), * from (select ID,Fname,LName,Sal, Sal + 1000 as Net from EMP) cc where Net between 10000 and 20000

Here, ID,Fname,Lname,sal are the table columns and Net is the newly cretaed column in Inline view. I know how to create Index on table columns but i am getting struck how to create Index on Inline View columns means here i need to create index on Net column.

Thanks in Advance.....

View Complete Post

More Related Resource Links

How to create scrolling table for columns in a SharePoint Designer Data View


I have a fairly complex SharePoint Designer 2007 Data View they have added two more requirements.

1. Have the columns on the right side be able to scroll left to right as there is a large number of columns, while the first 3 columns on the left side stay locked in place.  This is only one list not two, and because of some other requirements I have it must remain to be just one list.

2. Then they also need to have scrolling up and down of the entire list with the headers locked in place.

The first requirement is more important than the second, but preferrably I need to do both.

I am new to XSL so not familar with the syntax. Is this something I can do on a custom Data View? Does anyone have any examples of how?

I have a drawing that show how it needs to look but I don't see an option here to upload a graphic.

So here is a link to my graphic example uploaded to my blog area: http://lindachapman.blogspot.com/  or just the image here: http://4.bp.blogspot.com/_aB01ue__NvQ/TGL42MOvrGI/AAAAAAAAAA4/c3xP4uCy4BU/s1600/Scrolling.png

I failed to mention that 3/4 of the columns are HTML Calculated fields wh

cannot create an index on a view

Hi All, Can I create an index on the following view? Create view myview with schemabidning as select id, date, value from tablea a right join (select id,min (date) as mindate, value from tablea ) b on a.id = b.id and a.date = b.mindate GO CREATE UNIQUE CLUSTERED INDEX IDX_1 ON MYVIEW(ID)     Right now i am getting an error.   Cannot create index on view "myview" because it references derived table "B" (defined by SELECT statement in FROM clause). Consider removing the reference to the derived table or not indexing the view. shamen

Unable to create index for view

Hi, I'm including the script for my ProductCategories table but I think it might be very beneficial for you to understand what I'm doing first: As the name implies, the ProducttCategories table is where I store all product categories for an ecommerce site. Furthermore, the CategoryHierarchy column uses the HierarchyID datatype in SQL Server 2008 so that I can have a hierarchy and make suggestions to users who are looking for a product in a category along with all its child categories. Also, in order to make the site as user friendly as possible, I've implemented friendly URLs. Therefore, I need to do a reverse look up when someone requests: Electronics-DigitalCameras-DigitalSLRs to figure out the CategoryID (int) for the Digital SLR's category. I wanted to create an index in the database to make sure these look ups would have pretty good performance and that's where I got stuck. First, I got a message that told me that I couldn't create an index because my view was not bound to schema. And when I tried to do that, I got another error saying "Cannot schema bind view 'dbo.vwProductCategoriesAndPathsOrdered2' because name 'ProductCategories' is invalid for schema binding. Names must be in two-part format and an object cannot reference itself." The view simply creates a category path that looks like this: Electronics > Digital Cameras > Digital SLRs I'd

Hiding Columns In Create View Page


Is it possible to hide one or more columns where the columns are chosen to add them into the view? The users (who is creating the view) should not be able to see some of the columns in the create view page so that it is not possible to add them in the view.



Multiple "Name" and "Title" columns when I create a view progammatically


I am trying to progammatically create some datasheet views to make it easy for my users to have grids to edit bulks of documents at once.  Everything seemed to work fine at first but then I discovered that when I switched from a Datasheet View to a Standard View, I noticed that the "Name" and "Title" columns repeat themselves.  Upon further investigation, I discovered that it actually added another "Name" and "Title" column to my document library. 

I think this may be due to the "Show with edit menu" values but after trying to filter out columns where AuthoringInfo == null, I still get the same problem.

Does anyone have a solution for this? 

My code is below: 

if (contenttype.Name !=

create index on view


HI Guys

Can any one please tell me how to create Index on this view

Create VIEW [dbo].[Vw_Fact_GLTransactions]








how to create index for a column


Hi Friends,

                       I need to create the index for a column and accessing that in sqlserver 2005. Please any one help me.


Entity Data Model and database view returning the same columns as there are in a table


When adding a stored procedure into the Entity Data Model I can select whether the procedure returns a scalar, a (new) complex type or one of the entity types I already defined. 

How do I do something similar for a view?

I mean assuming I have a view like this

CREATE VIEW FilteredFoos as SELECT Foo.* FROM Foo join ... WHERE ...

(that is a view that implements some involved filtering, but returns all columns from one table) how do I add it to the project so that I can use the entity set, but get the Foo objects, not some new FilteredFoo objects.

var foos = myDB.FilteredFoos.Include("Bar").ToList();

foreach (Foo foo in foos) { ...

Thanks, Jenda

create a dynamic view on code

How i can create a new view on code (on runtime) if this view dont exits?   Thanks

Create view

I need to create aview like this. Field1        Field2 James         Here it will be a SELECT from various tables where name='James' Helen          Here it will ............................................    where name='Helen' How to create this view.  Field1 is also from some table. NSG12

How to create a view in my database from a table in another server/database

Is there a way to create a view in my database referencing a table in another server/database if I have the connection information.  I know how to do it in Oracle, simply create a database link, but have never done so in sqlserver.

Create Colors for columns in Chart , WPF

Hi, How can i dynamically create colors , which i want to asigned to the Columns in a WPF toolkit Chart control. i want the colors, which are suitable to the chart control (like the ones which are by default generated). thanks Naresh

how to create jquery tree view

A Simple Query Pass to connection String 1 My Query is SELECT a.HD, a.HEAD, a.SH, a.SUBHEAD, a.TRK, a.TRACK, a.TGT, a.TARGET, a.PDC, a.DT_RELEASE, a.STATUS, a.COFROM V_HIERARCHY1 a2,My Data isHD    HEAD    SH    SUBHEAD    TRK    TRACK    TGT    TARGET    PDC    DT_RELEASE    STATUS    COHR    HR    Rec    Records    Leave    Leave Records    HRL.0002    Quarterly Review    01.07.2010    04.07.2010    Planned    EdlinkHR    HR1    DB    Database    SAL    Salary    DDS.0001    Calculation of Monthly salary    08.08.2010    09.08.2010    WIP    EdlinkHR    HR    Rec    Records    Ind    Induction Records    HRI.0001    Completion of dossiers.    08.07.2010    10.07.2010    WIP    EdlinkHR    HR    DB &

List view - inline editing with read only fields

I'm new to sharepoint and using SP2010. I would like to use the inline editing feature of list view and at the same time to lock some of the fields. Is there a simpler way to achieve this like adding some field property using SP designer?

Unable to create columns in document library after applying custom master page to site

Hi, I have applied a custom master page to a site.There is a document library in it. I am unable to add columns in it or change the default view.Nothing happens when I click on OK butoon after making my changes. However the columns are created/default view is changed when I apply the default master page. Guess I am missing some TagPrefix or sharepoint control on master page.I had solved this problem earlier in this way but don't remeber it now. Can anyone help?

Create a new list View Style

Hi, In SharePoint 2010 for XSLT List View Web Part you can assign different view styles using SharePoint Designer. For example "Basic Table", "Boxed" or "Shaded" etc. These styles just don't fit my needs. So my question is how can I create my own View Style which I can apply to any list? I came across "Customize XSLT > Customize Entire View" option under Design tab in SharePoint Designer which allows me to change the XSL stylesheet and control the rendering for a list. But how can I create my own list "View Style" which I would like to reuse with other lists too? Thanks, Hitesh  

dynamically create columns from xml

<?xml version="1.0" encoding="utf-8" ?> <mappings root="sound" child="item" delimiter=",">    <mapping pos="0" name="product" type="Element" />    <mapping pos="1" name="partID" type="Attribute" />    <mapping pos="2" name="numberInStock" type="Element" />    <mapping pos="3" name="numberOnOrder" type="Element" />    <mapping pos="4" name="deliveryDate" type="Element" />    <mapping pos="5" name="supplierStreet" type="Element" />    <mapping pos="6" name="supplierCompany" type="Element" />    <mapping pos="7" name="supplierPhone" type="Element" />    <mapping pos="8" name="orderedBy" type="Element" /></mappings>this is my xml file what i need is a table with 9 columns say item,product....orderedBy
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend