.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

How can i show the data thourgh query

Posted By:      Posted Date: September 09, 2010    Points: 0   Category :Sql Server
I have a  Table named Test. Only one column is there that is INT colun.Data in that column is 1 2 3 My expected result is   1 2 1 3 2 1 2 3 3 1 3 2 How can i show this?  Ramesh.M

View Complete Post

More Related Resource Links

Linq to XML query doesn't show data with null values...need it to!


I've got a web service that returns xml from a linq query.

If i have fields 'name' and 'title' my linq query will return results that have data in both 'name and 'title' fields.

How can I get linq to return a query when both fields are populated, and when only the name field contains data?

Here's what I've got:

        public XmlDocument GetUsersByDate()
            StringBuilder sb = new StringBuilder();
            XmlWriter writer = XmlWriter.Create(sb);


            var SelectedUsers = (from u in db.Users
                                 select "<UserName>" + u.UserName + "</UserName><x>" + u.Title + "<x>").ToList();


MS SQL Server: Search All Tables, Columns & Rows For Data or Keyword Query

If you need to search your entire database for specific data, this query will come in handy.

So when a client needs a custom report or some sort of custom development using Great Plains, most of the time I will have to track down the data in the system by running this query and find the table(s) it is in.

GridView control to show master-child or master-slave data, written in c#, asp.net

I previously made a master slave datagrid using Visual Studio 2003 .Net (original article) that would allow users to show data to clients using collapse and expand features. These features however did not carry over to gridview for many users. This tutorial will explaing how to create a collapsable/expandable gridview in frameworks 2.0 and higher

Data Points: Standard Query Operators with LINQ


LINQ to Objects and LINQ to Entities have an arsenal of Standard Query Operators that operate on sequences to perform a wide variety of operations.

John Papa

MSDN Magazine March 2008

Web Q&A: Storing SQL Data, URL Query Length, and More


Find out the best way to store large amounts of XML data in SQL Server, along with the performance implications. What's the maximum length of an XML query to SQL Server in a URL?

Edited by Nancy Michell

MSDN Magazine May 2003

show data in grid view error Arithmetic operation resulted in an overflow.



i have a table there is 17 columns in 17 column 3 are number and other are varchar . when i try to display all data of that column error occures.

one more intersting think is when i try to display 6 column then grid show there data an no more error occures. 

when i run my project this error occures in grid view

Arithmetic operation resulted in an overflow. 

show two tabs for different data


I need ure help,

my question is that I need to show a tab two times in my web page ,,, each time this tab will be showed it will have different data will be called from a database while the page loaded >>>> when I use my code I can show the tab one time only

I will insert my code here look at it and tell me where the error

<td align=left >
    <cc2:TabContainer   ID="TabContainer1" runat=server BorderStyle="None" BorderColor="White" BorderWidth="0">
    <cc2:TabPanel  ID="TabPAnel1" runat=server BorderStyle="None" BorderColor="White" BorderWidth="0px">
   <asp:DataList ID="DataList3" runat=server  >
<cc2:CollapsiblePanelExtender ID="CollapsiblePanelExtender1" runat="server"
                TargetControlID="PnlContent" ExpandControlID="PnlTitle" CollapseControlID="PnlTitle"
                TextLabelID="Label1" CollapsedText='<%# Eval ("BookName") %>' ExpandedText='<%# Eval ("BookName") %>'
                ImageControlID="Image1" ExpandedImage="App_Themes/ima

New Data does not show in DVWP


I have two web parts on the page. The left one has regions listed. Clicking on a region hte right web part (DVWP) displays the data about that region (sales, etc.). 

Everything works as expected. Now, I added a region. And the new region does not show up. The regions are in an SP list. I am using SP 2003 and SPD 2007. 

I can see the new region data in a standard view or a datasheet view.

Can someone please help? Thanks much.

Show data in RowEditing mode


hello ,

        I have show data in gridview. when search item. And for updating We use Edit button. When I click on edit button it doesn't show data. I have also bind again data. It doesn't show data . The gridview doen't display.

        but When I enter search number again then display it.

I have paste some code snippest.

protected void gvFaxValidation_RowEditing(object sender, GridViewEditEventArgs e)

         gvFaxValidation.EditIndex = e.NewEditIndex;

         GridViewRow editingRow = gvFaxValidation.Rows[e.NewEditIndex];


         if (ddlSearchCriteria.SelectedValue == "PRESCRIBER_ID")

             gvFaxValidation.DataSource = objMasterBLL.FaxSearch(Txt_Search.Text);


SQL Query to retrive the data in XML Predefined tag format

I am looking out the way for  instead of using column names as tags, be able to use a predefined mapping. For example Select firstname from employee <firstname>John</firstname> Instead, Have a file that maps the firstname to fname so when we run the TSQL should get:  <fname>John</fname> Please consider that there are over 100 columns in the Query for which how can I use the predefined format.  Sivaprasad S http://sivasql.blogspot.com Please click the Mark as Answer button if a post solves your problem!

FieldTemplate_Edit to show value when custom meta data is set editable equals false

Have a custom FieldTemplate (RadioButtonChooser_Edit.ascx) that shows a radiobuttonlist based on a single character.  Using LinqtoSQL/DynamicData enabled.Example G, F, P  (Good, Fair, Poor).If the custom metadata for a field in the table is set  [Editable(false)]  I get a G, F, or P.  I would like to show the full word when editable is set to false.  Not sure how to approach this.

Show Data in Sequence

I am trying to creat a report which shows qualification and contract information of employee.Each Employee has usually more than one qualification e.g intermediate, graduation, masters etc..Similiarly most of the employees has more than one contracts in their history.i have split reprot into two details sectionsSection contains data Qualifcation: TitleInstitueYearsGrade/DivisionSection B ContainsContract Information  starting date  ending date  reference letter no   joinging letter no------------------------------------------------------------------------Now what report shows is as followsQualification  first qualificationContract Information first contract Qualification second qualificationContract information second contractwhat i want is that qulification and contract infromation should be shown in sequence e.g first all qualifications then contract please let me know how can i do that

Expand rows in a data grid to show details in the same page

<asp:templatecolumn headertext="Purchase Order"> <headerstyle horizontalalign="center"></headerstyle> <itemstyle horizontalalign="center"></itemstyle> <itemtemplate> <%# DataBinder.Eval(Container.DataItem, "PurchaseOrder") %> </itemtemplate> </asp:templatecolumn> <asp:templatecolumn headertext="Order"> <headerstyle horizontalalign="center"></headerstyle> <itemstyle horizontalalign="center"></itemstyle> <itemtemplate> <a href="OrderDetail.aspx?Order=<%# DataBinder.Eval(Container.DataItem, "OrderNumber")%>"> <%# DataBinder.Eval(Container.DataItem, "OrderNumber") %> </a> </itemtemplate> </asp:templatecolumn> <asp:templatecolumn headertext="Ack Date"> <headerstyle horizontalalign="center"></headerstyle> <itemstyle horizontalalign="center"></itemstyle> <itemtemplate> <%# DataBinder.Eval(Container.DataItem, "AcknowledgeDate") %> </itemtemplate> </asp:templ

Data query task issue

Hi Someone help me undersand how to implement a Data meaning query  in SSIS project step by step. even a small package for testing this task ThanksThe complexity resides in the simplicity

How to query for id's of the fields with List Data Retrival Services Query() web service

Since i marked a post as answer in my previous topic, it seems that people dont visit the topic anymore as they see it as "answered" while it actually is only partially answered. So i guess i have to ask again in a different topic.    I need to get data from Sharepoint Server (3.0 i belive) for my Integration Services project. For that i use Sharepoint's webservices. I've read tutorials and downloaded sample programs to talk to WSS web services. I realise i have two ways to get items in a list: Use Query() or GetListItems(). Problem is, GetListItems() has a mandatory "Row limit" field and i might have to import ALOT of fields, so i thought Query() is better for me.  But, when using GetListItems(), the WSS returns the ID of the fields (for example, for a field of type user, something like "395;Ivanov Ivan Ivanovich" is returned) but when using Query() for the same list, WSS returns only the field value ("Ivanov Ivan Ivanovich") without the ID. I need it to return the ID as well. How can i set it up, on my side or server side, so i would receive the ID's, not only the values of the fields that are actually linking to something by ID when i use Query() web service?     

How can i show Transpose Query In SSRS ?

Hi, Any one help me for following Output. please tell immidiatly.  How I use this expression as follow: I have Database Table Like ----------------------------------------------------------- Date                 ShiftName                    Tons 7/21/2009               Day                          (Ans by Formula) 3 7/21/2009               Night                          (Ans by Formula) 4 7/22/2009               Day                           (Ans by Formula) 8 7/22/2009               Night       &

Unable to Show Edit item Links in Data Form Web Part

I have a DFWP connected to custom list and the boxes to Show Edit Item Links, Show Delete item links and Show Insert Item links are grayed out so that they can not be checked. This works fine when I use a DFWP connected to a standard list (i.e., Contacts). Is there something special that needs to be done to activate this functionality?ThanksDean
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