.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


Posted By:      Posted Date: April 10, 2011    Points: 0   Category :ASP.Net


Work Done
John 75
David 15
john 15
David 20
smith 10
John 10
smith 20

as u can see repitition of Names and their work done, i want below result but what will be the query?

as u can see below sum of work done,and only one time name is showing,plzz tell me how it will be done?

the Name in about table are coming from database but  work done is not coming from database,it is calculated in query,through 'Case'

below table is the concatenation of names but how it will be???? plzz answer...

Name Work Done
John 100
David 35
smith 30

View Complete Post

More Related Resource Links



How can I make this work since when I do this in asp.net, I'm having problem but in mysql query builder it's working fine.

SELECT CONCAT(employee.LastName,', ',employee.FirstName,' ',SUBSTRING(employee.MiddleName,1,1),'.') FROM employee

Concat and Conversion of char data type to smalldatetime data type resulted in an out-of-range small




I am trying to create a new date as below and add this date to the BDMRY field (smalldatetime data type) in SQL Server 2005.

MostRecentCompletionDate -  (smalldatetime data type)

StudentBirthdate - (smalldatetime data type).

SET BDMRY =  CAST(CAST(YEAR(MostRecentCompletionDate) AS VARCHAR(4)) + '/' +
                      CAST(MONTH(StudentBirthdate) AS VARCHAR(2)) + '/' +
                      CAST(DAY(StudentBirthdate) AS VARCHAR(2)) AS DATETIME)

When I run this I'm getting the error as:

Msg 296, Level 16, State 3, Line 1
The conversion of char data type to smalldatetime data type resulted in an out-of-range smalldatetime value.
The statement has been terminated.

It works fine on my laoptop but doesnt work on the production server.

Any help would be greatly appreciated.



concat strings and put into 1 column?


I have TableA with values

Rec. No    Name

Rec#1     Mark

Rec#2     Jason

Rec #3    Mark

I would like to put these data into TableB, with the data being this way

Rec. No                 Name

Rec#1, Rec#3       Mark

Rec#2                   Jason

Is this possible? Im writing this in a stored prod..


concat repeating table value in email subject



I have a question. Can i concat the last value that is inserted in a repeating table in an email subject?

if i concat one of the field in the email subject it gives me the first value and i want to use the last value that is inserted.

in advance thank you

concat a special character (ampersand)?



In DFWP XSLT, I am using a Concat funtion inside my href code. I would like to add an ampersand character in URL.

<a href="{concat('Lists/mylist/dispform.aspx?ID=',@ID,'amp;','blah)}">

I want my link to be like this:  http://sp/lists/mylist/dispform.aspx?ID=1&blah

I've tried:
%26  => This generates http://sp/lists/mylist/dispform.aspx?ID=1%26blah  which did not work well. I need really "&" itself.
&amp; => This generates http://sp/lists/mylist/dispform.aspx?ID=1&amp;blah  I cann't set disable-output-escaping property since it's a href tag..

Any idea? Thanks.

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