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

Top 5 Contributors of the Month
Sandeep Singh
Melody Anderson
Eminent IT
Post New Web Links

Table Name and order

Posted By:      Posted Date: September 15, 2010    Points: 0   Category :ASP.Net
Hi I can set the table name using the following attribute   [DisplayName("My Table Name ")]  Or [TableName("My Table Name ")]   but how can i set the table order ?

View Complete Post

More Related Resource Links

Dimensions order in excel pivotal table

The list of dimensions in excel pivotal table are in alphabetical order. is it possible to reorder the dimensins?

how can we re-order of Table X

here I have table X that comes from certain operation where step_order is not start from 1...here order can start from > 1..but in sequence (e.g, 5,6,7) and row number can vary...hence how can I reset/update the order from 1...please help CREATE TABLE X(STEP_NAME VARCHAR(50), STEP_ORDER INT) INSERT INTO X VALUES ('A', 5) INSERT INTO X VALUES ('B', 6) INSERT INTO X VALUES ('C', 7) SELECT * FROM X /************************** OUTPUT OF TABLE X, STEP_NAME STEP_ORDER A 5 B 6 C 7 **************************/ /************************** HOW TO UPDATE TABLE X FOR BELOW EXPECTED OUTPUT - RE-ORDER, STEP_NAME STEP_ORDER A 1 B 2 C 3 **************************/

How keep order of an table after inner join it to another



I have @temp that take 5 random rows from sp_get_Randomly. The sp_get_Randomly return top (5) of myTable and only select id to improve performance. This 5 rows are unsorted(in @temp). When I inner join it with MyTable, the result insert into #tempNew sortly. My problem is here: I want to #tempNew remain unsorted like @temp. How can I stop sorting there? I Know I can unsort it with “Order by newid()” again. But is there anyway to keep same discipline of @temp in #tempNew, too?


declare @temp table(id int)


How to count records placed different order in a table?


In a table i have two column

for eg

column1 column2

1              2

2              1

3              1

2              3

1              1

From front end i m passing parameters like(1,2)OR(2,1)

i want to get a count of the pattern like (1,2)OR(2,1) only so i will get count 2 for the abv table.

tell me a select query to get the count?

how to create list order and unorder list using data table(asp.net,or jquery)


1 My DataTable Return following Data

Acct    Books    Annual
Acct    Books    Monthly
Acct    Tax    Income Tax
Admin    GH    Eqpt
Admin    Offc    Eqpt
Admin    Offc    Misc
Admin    Offc    Eqpt
BPO    DE    DE.US
Corp    Comp    Insurance
Corp    Legal    Court
Corp    Legal    Court

but i require in this format

  Income Tax
<ul>   GH 
<li>   Eqpt

<ul> Offc 

SQLXML BulkLoad Table Insertion Order?


So I am trying to load some XML into SQL Server 2008, using SQLXML 4.0 which I am calling from C# to bulkload the xml. I have generated the DB tables and build the XSD. I have annotated the XSD so that it should understand the relationships in SQL Server. I have been trouble shooting an error related to a foreign key constraint, and I believe that the only issue is that the tables are not loaded in the correct order. To prove this I simplified my example to something like this:

Table_A (id, adata)
Table_B(id, bdata)
Table_C(id, fk_a_id, fk_b_id)
Table_D(id, fk_c_id)

All of the ids are IDENTITY fields generated by SQL Server. It works and I am able to load the data. I am quite pleased because at least I am loading some of it, as it has been a long time in coming. But then if I start adding back in more of the full xml schema to something like this, I start with the foreign key constraint problems again:

Table_A (id, adata)
Table_B(id, bdata)
Table_C(id, fk_a_id, fk_b_id)
Table_D(id, fk_c_id, fk_x_id)
Table_X(id, xdata)

It should be able to load these tables in an order like A, B, C, X, D and the constraints shouldn't cause any issues. But it doesn't seem to work that way. The must be loading like A, B, C, D, X.

Is there a way in the XSD or somewhere else to load tables in a certain order? I read s

Import Wizard lists table out of order when connected to SQL Azure


When you use the import wizard to copy data from SQL Azure, the list of table on the Azure server is out of order.  This makes it very time consuming to find a particular set of tables. 

Is this something that I could get some feedback on, or perhaps submit as an issue, either here or another forum?



SQL 2008 table ORDER BY (individual specific value in column)?


Hi I have SQL 2008 table like,
AccountCode       AccountDesc       Value            Date                         ......       ....          ......
ACC1                  Receipts Total     50.88       2010-12-25
ACC1                  Delivery Total      140.12     2010-12-25
ACC1                  Post Amt            798.88      2010-12-25
ACC1                  Check Amt          31.70       2010-12-25
ACC1                  Cross Amt          90.82        2010-12-25 
ACC2                  Receipts Total     50.88       2010-12-25
ACC2                  Delivery Total      140.12     2010-12-25

calc'd measures and order of fact table processing



I have a calc'd measure that depends partly on measure group a and partly on measure group b.  It is associated with measure group a.  When I process measure group b FULL, is SSAS smart enough to "update" my calc'd measure?  Even if I dont process measure group a?

Export Visio Database Table Names to Excel

If you use the Enterprise Architect edition of Microsoft Visio for data modeling regularly, then there is a good chance that at some point you've wanted to export just the table names into Excel. You might want to do this to map logical ERD entities to physical data model tables, track project status by entity, or track overlap between database versions.

Insert value using Table Value Functions

a real gem in Sql Server 2008. mostly people still using Stored procedure may be they shifted to SQL Server but they are not using TVF right now.

Using jQuery to Filter Table Rows

The project is using the .net GridView control, so I had limited control over the output HTML code. Still, I think this code can work for most tables. One thing to notice: you should use the class "filterable" on your table or on one of its parents for the code to work.
First, we need a text box:

RadioButton Groups, Table Rows And NamingContainers in asp.net

The RadioButtonList. Very handy for inviting users to select just one item from a list although because of the screen real estate it takes up, used less and less in favour of the DropDownList. In plain HTML, the browser knows to enforce the unique selected value amongst a list of radio buttons because they all have the same value for their name attributes.

RadioButton Groups, Table Rows And NamingContainers

(In which AJAX-enhanced CheckBoxes become more useful than RadioButtons but inheritance saves the day, and a simple RadioButton-derived control establishes the purpose of a control's naming container)

The RadioButtonList. Very handy for inviting users to select just one item from a list although because of the screen real estate it takes up, used less and less in favour of the DropDownList. In plain HTML, the browser knows to enforce the unique selected value amongst a list of radio buttons because they all have the same value for their name attributes.

Building a 3-Tier App with Silverlight 3, .NET RIA Services, and Azure Table Storage

Silverlight 3, .NET RIA Services, and Windows Azure Services Platform makes a 3-tier Cloud application easier to build: Silverlight 3 as presentation tier, .NET RIA services as the business logic and data access tier, and Windows Azure Table as the data storage tier. The sample application in this article demonstrates the architecture with a simple Survey application with all these technologies working together from Windows Azure.

Temporary tables in SQL Server vs. table variables

When writing T-SQL code, you often need a table in which to store data temporarily when it comes time to execute that code. You have four table options: normal tables, local temporary tables, global temporary tables and table variables. I'll discuss the differences between using temporary tables in SQL Server versus table variables.

Import XML File to SQL Table

Here is a brief example of importing an XML file into SQL Server table. This is accomplished by using the BULK option of OPENROWSET to load the file, and then utilizing the XQuery capabilities of SQL Server to parse the XML to normalized table format. This example requires SQL server 2005 or SQL Server 2008.

First, the following XML is saved to XML file C:\Products.xml.
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