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

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

Window Functions (OVER Clause) - Help Make a Difference

Posted By:      Posted Date: September 18, 2010    Points: 0   Category :Sql Server
Hi all, Need your help with what I believe will benefit all of us SQL Server developers in the future--more complete support for the standard window functions in SQL Server. I tried to post the entire article text here, but apparently entries in this forum are limited to 60,000 characters. So here's a link to the article (no subscription required): Window Functions (OVER Clause) – Help Make a Difference. Cheers, BG-- BG

View Complete Post

More Related Resource Links

i make a web site using frame . A.Text box is in parent window . but i want when frame is load(fram

i make a web site using frame . A.Text box is in  parent window . but i want when frame is load(frame window Coding ) then parent window text is changed l(1)suppose parent window Text. is a when child widow is load thenparent window Text. is b

make Gridview data as hyper link with alias open in new window



I have one asp.net C# page in which i have gridview..

This are the url comes from database and binded in gridview




what i need is i need to show this url has like this

www.xxxxxx.com/A/Default.aspx is like Test1

www.xxxxxx.com/B/Default.aspx is like Test2

www.zzzzz.com/C/Default.aspx is like Test3

if user click Test1 it will open a new browser window with www.xxxxxx.com/A/Default.aspx

if user click Test3 it will open a new browser window with www.zzzzz.com/C/Default.aspx 

how to make this in gridview please help me in this...

How to make a wpf child window follow it's parent




I've been trying to make a child window follow it's parent, I've bound the child's Top and Left properties to it's parent and that works for resizing of the parent and when the parent is dragged around the screen.  However I've hit a problem when I maximize and minimize the parent the child doesn't match it's size. I've watched the values of the parents Top and left in the debugger and it seems to get set twice once with a value that matches the new size and again with it's previous value and I guess this is whats making the child window appear incorrectly. I'm starting to think that just binding to the parents Top and Left properties isn't going to work. Is there a better approach to achieve this?



How to make window based site accessible from outside



We are using MOSS 2007. We have created window based site and extended it to use SQL-Form based Authentication so that users can access it from outside. Now we have a requirement to use the Active Directory Authentication and test the application from outside. Our Alternate Access Mapping settings are as below:

Internal URL                                  Zone                                         Public URL for Zone

http://server01                             Default                                        http://server01 

http://server01:12345                 &n

How make Controls scalable when resizing Window?


How do I make my Controls scalable in relation to the size of the Form?

I mean, when the Anchors of a Panel on a Form are set to all 4 borders then the Panel Width/Height properties change when changing the Form size but the Left/Top position of the Panel is fixed and not changing. What properties do I have to set to what value to also make the Panel's Left/Top position move when the undelying Form size is changed?



The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common ta


Any ideas how I can order inside the subquery? I get the following error. I have tried ORDER BY MAX([Count]) but it doesn't like this much either... Also, I don't want to use TOP in the subquery as I need to use all the records!

			 COUNT(*) AS [Count]
		GROUP BY System_User_ID
		ORDER BY [Count]) l
	INNER JOIN aspnet_Membership m
	ON CAST(m.UserId AS VARCHAR(36)) = l.System_User_ID
Msg 1033, Level 15, State 1, Line 11
The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP or FOR XML is also specified.

Working with Ranking Window Functions

As the name suggests, ranking functions let you rank the rows in your result set based on specified values in those rows. SQL Server supports four ranking functions:

ROW_NUMBER: Assigns a sequential number to each row in the result set.
RANK: Ranks each row in the result set. If values in the ranking column are the same, they receive the same rank. However, the next number in the ranking sequence is skipped.
DENSE_RANK: Ranks each row in the result set. If values in the ranking column are the same, they receive the same rank. The next number in the ranking sequence is then used to rank the row or rows that follow.
NTILE: Divides the result set into the number of groups specified as an argument to the function. A group number is then assigned to each row identifying which group the row belongs to.

What make the difference here..


can any body tell whats the exact difference in these two.How do they reflect on other things ..

which is best synatax to use to create FK key.







--------------------------------------And the below one-------------------------------------------











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.

Introduction to Functions

A function is a section of code that is used to perform an isolated assignment. Once it has performed its assignment, the function can be accessed to present its result(s).

In Transact-SQL, a function is considered an object. After creating the function object, it becomes part of a database. You can then execute it when necessary.

Built-In Functions Fundamentals

While your primary job as a database developer consists of creating lists, probably your second most important job is to assist your users with the various assignments they must perform on your application. One way you can assist is to use functions that perform otherwise complex tasks. We introduced and described functions in the previous lesson. To assist your development with the different tasks of a database, Transact-SQL ships with various already created and tested functions. You just need to be aware of these functions, their syntax, and the results they produce.

What is the difference between "dynamic" and "object" keywords?

Let's take a quick look at the object keyword first. I'm not going to talk a lot about it because it's been around since C# 1.0. This keyword is nothing more than a shortcut for System.Object, which is the root type in the C# class hierarchy. (However, as Eric Lippert pointed out in his blog post, not everything in C# derives from object.) This is a powerful mechanism, since you can assign almost any value to instances of this type.

Power of using Clause in SharePoint

The Using Clause will help to avoid memory leaks in SharePoint by automatically Disposing the MOSS objects.

For example when we create SPSite and SPWeb objects, if we don't dispose it explicitly it might create memory leaks,

Built-in Functions - Text and Image Functions in SQL Server

Text and image functions operate on TEXT, NTEXT and IMAGE data types. These data types are deprecated with SQL Server 2005 and should be replaced by VARCHAR(MAX), NVARCHAR(MAX) and VARBINARY(MAX) when possible. Alternatively you can also consider storing large string values using XML data type. Text and image functions are nondeterministic.

Future versions of SQL Server will not support TEXT, NTEXT and IMAGE data types. Columns with TEXT / NTEXT data type do not support commonly used string functions such as LEN, LEFT, RIGHT, etc. Furthermore, due to the large size of TEXT data you''re likely to see performance issues if you store such data in the database. However, at times you can''t help but use the TEXT / NTEXT / IMAGE data types (for example when supporting 3rd party databases when you cannot change the schema) - this is when text and image functions come in handy.

Date and Time Functions in SQLSERVER

Date and time functions allow you to manipulate columns and variables with DATETIME and SMALLDATETIME data types.

1 DATEPART Function
2 DATENAME Function
3 DAY, MONTH, and YEAR Functions
5 DATEADD Functions
6 DATEDIFF Function
7 More SQL Server Functions

Modal popup window in ASP.Net

A Masked div or modal popup window is a child window created from the parent window which prevents the user from interacting with parent window before he returns to the parent application.

Built-in Functions - Aggregate Functions

Aggregate functions return a single value summarizing a given data set. All aggregate functions are deterministic. NOTE: AVG, SUM, STDEV, STDEVP, VAR and VARP functions cannot operate on BIT data types; they can operate on all other numeric data types.
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