15,885,537 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Abdulnazark (Top 14 by date)
Abdulnazark
13-Mar-15 16:03pm
View
declare @in varchar(max),@sql Nvarchar(max)
set @in=cast((select stuff((select ',['+datenumber +']' from ##t2 group by datenumber for xml path('')) ,1,1,'')) as varchar(max))
set @sql='SELECT *
FROM (
SELECT
code,
dt,
datenumber
FROM ##t2
) as s
PIVOT
(
MAX(dt)
FOR [datenumber] IN ('+@in+')
)AS p'
exec(@sql)
Abdulnazark
13-Mar-15 15:16pm
View
thanks..
Abdulnazark
12-Mar-15 12:24pm
View
Sql view only available for Query not for table
Abdulnazark
2-Mar-15 9:08am
View
Deleted
don't use Clipboard, see the link
http://www.aspsnippets.com/Articles/Export-GridView-to-Excel-in-ASPNet-with-Formatting-using-C-and-VBNet.aspx
Abdulnazark
2-Mar-15 2:35am
View
did you enabled the
sp_configure 'show advanced options', 1
RECONFIGURE;
GO
sp_configure 'Ole Automation Procedures', 1
GO
RECONFIGURE;
GO
Abdulnazark
1-Mar-15 12:04pm
View
is this work for you,
select * from yourtable where acid=100
union select * from yourtable where acid <>100
Abdulnazark
1-Mar-15 9:19am
View
worked below
var qry = (from a in cm.Cust_Complaints.ToList()
group a by new { Year = a.RecDate.Value.Year, Month = a.RecDate.Value.ToString("MMMM"), Dept = a.RelDept } into grp
select new
{
Year = grp.Key.Year,
Month = grp.Key.Month,
Dept = grp.Key.Dept,
AvgIA = grp.Average(g => ((g.Intl_Ack != null ? g.Intl_Ack.Value : DateTime.Today.Date) - g.RecDate.Value).Days) + 1,
AvgRD = grp.Average(g => (((g.Resol_Date != null ? g.Resol_Date.Value : DateTime.Today.Date) - g.RecDate.Value).Days) + 1),
SumOp = grp.Sum(g => g.Status == "Open" ? 1 : 0)
});
GridView1.DataSource = qry;
GridView1.DataBind();
thank you,
Abdulnazark
1-Mar-15 8:59am
View
this fine except a.RecDate.ToString("MMM")
thank you,
the error is
An exception of type 'System.NotSupportedException' occurred in EntityFramework.SqlServer.dll but was not handled in user code
Additional information: LINQ to Entities does not recognize the method 'System.String ToString(System.String)' method, and this method cannot be translated into a store expression.
Abdulnazark
1-Mar-15 7:37am
View
How to check the null
Abdulnazark
1-Mar-15 6:18am
View
attached sample data, It will be appreciated if you could post a complete LINQ query
Abdulnazark
1-Mar-15 6:15am
View
TrID RecDate ModeOfComp RelDept Intl_Ack Resol_Date ClosureDate Status
27 19/01/14 Letter Service 00:00.0 19/02/14 19/02/14 Closed
28 05/02/14 Fax Service 00:00.0 20/02/14 20/02/14 Closed
29 25/03/14 Email Service 00:00.0 30/03/14 30/03/14 Closed
30 06/04/14 Fax Service 00:00.0 18/05/14 20/05/14 Closed
31 08/04/14 Direct Service 00:00.0 12/04/14 15/04/14 Closed
32 09/04/14 Telephone Service 00:00.0 10/04/14 12/04/14 Closed
33 28/04/14 Telephone Service 00:00.0 02/06/14 NULL Closed
34 12/05/14 Fax Construction 00:00.0 15/05/14 NULL Closed
35 12/05/14 Letter Service 00:00.0 20/05/14 NULL Closed
36 12/05/14 Email Service 00:00.0 20/05/14 NULL Open
37 30/04/14 Telephone Service 00:00.0 03/05/14 NULL Open
38 24/06/14 Telephone Service 00:00.0 02/07/14 NULL Closed
40 25/06/14 Fax NESales 00:00.0 NULL NULL Open
41 30/06/14 Fax NESales 00:00.0 NULL NULL Open
42 27/07/14 Email Service 00:00.0 03/08/14 NULL Closed
43 25/09/14 Fax Service 00:00.0 NULL NULL Open
44 30/09/14 Email Service 00:00.0 NULL NULL Open
45 30/09/14 Telephone Construction 00:00.0 31/10/14 NULL Open
Abdulnazark
26-Feb-15 7:45am
View
Just run the attached sql after creating the table from the above,you will get the result,
Abdulnazark
26-Feb-15 4:24am
View
your dates may be starting from February only, please check
Abdulnazark
26-Feb-15 3:30am
View
see below link
http://csharp.net-informations.com/excel/csharp-open-excel.htm
Show More