.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

Grouping Records into buckets of 15 minutes ....

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :Sql Server
Hi, Let's say I have a table with the following fields: [Id] [UpdateDate] [Group] Now for one day starting from 00:00:00 to 23:59:59 Let's say I want to plot how many records exist for each group / type in the last day, BUT I want to count these groups in 15 minute intervals. How would I best structure a T-SQL (SQL 2008) query to do this? Example Results: 00:15:00    Group 01 = 211; Group 02 = 289 00:30:00    Group 01 = 205; Group 02 = 233 00:45:00    Group 01 = 200; Group 2 = 267 etc.      I.W Coetzer

View Complete Post

More Related Resource Links

Playing with Linq grouping: GroupByMany?

One of its features is grouping. Many people understand grouping like it is defined in Sql. Linq is implementing grouping quite the same way. Let's discover this syntax and how to make consecutive groups easier.

Grouping Gridview with jquery

The requirement of the project is to show a table of data with the riskdetails(just for assumption) which have the corresponing values for every month and people used to compare the values for last months.

Building a grouping Grid with GridView and ASP.NET AJAX toolkit CollapsiblePanel

I've posted an update to this post to apply on demand loading of Details data using ASP.NET AJAX PageMethods. I'm demonstrating the usage if CollapsiblePanelExtender client events on the new post. Check it out.

I admit, Matt Berseth is really inspiring me! Few days ago I pass through 2 of his great posts:

.Surrounding your Data Table and Dialog Controls with ComponentArt Styled Panels
.Building a Grouping Grid with the ASP.NET 3.5 LinqDataSource and ListView Controls
The first one is pure design tips one which I used for making good presentation of my demo here. The 2nd post is actually the idea.

Grouping Gridview with jquery in asp.net

The requirement of the project is to show a table of data with the riskdetails(just for assumption) which have the corresponing values for every month and people used to compare the values for last months.

ASP.NET GridView - edit records using JQuery Dialog

There are many ways in which you could modify modular data in Grid View:
1. Inline by making rows editable when u click on Edit
2. By using separate pages for Edit
3. By using popups/dialogs for adding/editing

adding XML 'records' with a key field


I have a vb.net Sub that is successfully adding 'records' to my XML file:

Private Sub btnSubmit_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles btnSubmit.Click             'for adding an XML 'record'
        Using ds As New DataSet()
            Dim dr As DataRow = ds.Tables(0).NewRow()
            dr("subject") = txtNewEvent.Text
            dr("year") = DateTime.Now.ToString("MM/dd/yy")
            txtNewEvent.Text = ""

how to increase Performance onloading page and navigation of records ?? Help








this is my aspx and cs code , let me know whether it is correct or not??

onload and performance on navigation of record show be good.

Plz help me

<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="True"

                DisplayGroupTree="False" ReuseParameterValuesOnRefresh="true" HasToggleGroupTreeButton="False" Height="1039px" ReportSourceID="CrystalReportSource1"

                Width="901px" />

            <CR:CrystalReportSource ID="CrystalReportSource1" runat="

Showing filtered Records in Crystal Report as per User Requirement


ReportDocument reportDocument = new ReportDocument();
    ParameterField paramField = new ParameterField();
    ParameterFields paramFields = new ParameterFields();
    ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
    protected void Page_Load(object sender, EventArgs e)
        if (!IsPostBack)
            paramField.Name = "@Ext";
            //*Remember to reconstruct the paramDiscreteValue and paramField objects
            paramDiscreteValue.Value = 44854
            CrystalReportViewer1.ParameterFieldInfo = paramFields;

dropdownbox which selects records based on criteria (TODAY, THIS WEEK, THIS MONTH, etc)


I have a dropdownbox which I want to use to search records based on a timescale. The gridview populates results based from that search.

So here is how I want to work this;

If a user selects "today" - a list of records input today are populated. If "this week" is selected, a list of all records added within that week from todays date is populated.

I created a forum on this issue previously but to no avail whatsoever. How do I work around this problem?

Help would be much appreciated

search multiple words into textbox and populate all records in gridview related those keywords


I have a textbox and a gridview which is bound to a table

what I want to achieve is a solution where lets say there are two records - e.g. "1. Book and 2. Red", i want a user to type in those words and the gridview shows the results as followed;

1. Book

2. Red

I have set up the sql data source and everything and my like operator is this...

LIKE '%' + @record + '%'

how can I solve this problem?

sqldatasource's filter returns too few records


I have a puzzling issue.  This is in asp.net 2.0, using vb.  I have a gridview that is bound to a sqldatasource.  Here is the datasource code:

<asp:SqlDataSource ID="fellowsSqlDataSource" runat="server"
        ConnectionString="<%$ ConnectionStrings:PFPFellowsConnectionString %>"
        ProviderName="<%$ ConnectionStrings:PFPFellowsConnectionString.ProviderName %>"
        FilterExpression="{0}"  >
            <asp:SessionParameter Name="psuaccessid" SessionField="username" />         

How to save records with autogenerated html links in Sql database?


Hi I would like to create a database where users can search for multiple fields. For example: if the record is personal details info like name, address, phone number and email id i would like to generate link for this automatically with the fields using stored procedure.. Is that possible.? If so can anybody provide me with the line of code or guideline on how to do that?

Any help much appreciated. Thanks

How to stop unauthorized users from sending documents to a Records Center site?


I can't find a way to stop unauthorized users from sending documents to a Records Center site. Can someone please help me? Do i need to configure anything to restrict it to the members of the web submitters group?

I'm still using MOSS2007


The impossibility of doing things depends on your will to do it.

workflow and "child" records events ?




In a project, I have two lists that are linked together with a lookup column (it's not the actual scenario, but I simplify it) :

* a parent list, that defines some fields and especially a state field that will follow the life of the object (created, open and archived)

* a children list, that also defines some fields including a lookup field to the parent list and a similar state field for its own lifecycle (created, open and archived)


the life cycle of both kind of objects are linked together. For example, when the parent is opened, all children must be opened too (looks like easy because it's a workflow action from parent, and finding children is simply an activity of the workflow).

Another requirement is to archive the parent when all children are archived.

What is the best approach ?

In the parent life cycle workflow, can I monitor children events (I don't think so :() ?

I can cheat a bit by adding an hidden field "all children archived" in the parent, and set this to true from a child workflow or event. I'm not at ease with this solution as it's not a proper way. Anything else I may dive ?



Any idea, advice, tip, encouragement?



Paying back the community for its help by writing articles :

User complaining about getting kicked out repeatedly after only a few minutes...


Hi, I am using forms authentication.  My web.config file contains this:

<authentication mode="Forms">
 <forms loginUrl="Login.aspx" defaultUrl="LeaseTracker.aspx" protection="All"   timeout="30" slidingExpiration="true"/>
 <deny users="?"/>

And the login includes this:

FormsAuthenticationTicket formsAuthenticationTicket =
 new FormsAuthenticationTicket(1, userName, DateTime.Now, DateTime.Now.AddMinutes(30),
 _isPersistent, userData, FormsAuthentication.FormsCookiePath);


Response.Redirect(FormsAuthentication.GetRedirectUrl(userName, _isPersistent));

Any ideas on why it would be treating the user this way?

grouping summary data gridview


how can I gruping summary data in gridview like that; Thanks for helping


Car                   Rate 1               Rate 2            Rate 3  

 BMV                 5                          7                       9

                         4                          6                      7


changing records frm control in update panel


i have a list box, a command button and a grid

when i click a particular record / or multiple records on the  list box and then cclick the command button the records r transferred 2 the grid

i also have custom paging, the paging shld ocur as many times i clcik the command button

i have used updatepanel with the command button in it so that partial postback ocurs or there is no page flicker ,

but when i use update panel i get teh records in the grid but custom page is not working . it has no affect even if the records are added

if i remove update panel the paging works properly

how do i manage it with update panel

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