15,919,931 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 Kristian_dk (Top 39 by date)
Kristian_dk
20-Mar-17 5:50am
View
Found the solution finally:
,Convert(DATE, LEFT(CREATED, 8)) AS CREATIONDATE
That did the trick..
Thanks for helping out.. I have never thought about the Int vs. String confusion..
Kristian_dk
18-Mar-17 18:00pm
View
Of yes it is true. Just checked the columne. Its a Interger.
Kristian_dk
18-Mar-17 11:43am
View
This code throws a:
Msg 8116, Level 16, State 1, Line 2
Argument data type int is invalid for argument 1 of substring function.
Kristian_dk
18-Mar-17 11:43am
View
I cant really get your code to work. CREATED is my timestamp with format yyyymmddhh.
SELECT CAST(SUBSTRING(CREATED, 1, 4) + '-' + SUBSTRING(CREATED, 5, 2) + '-' + SUBSTRING(CREATED, 7, 2) + ' ' + SUBSTRING(CREATED, 9, 2) + ':00' AS DATETIME)
,[USERNAME]
,[USERTYPE]
,[CREATED]
,[USED]
,[USERNAME2]
,[EMAIL]
FROM [EDW].[User]
Kristian_dk
18-Mar-17 11:37am
View
I do unfortunatly not have access to change anything on the database since it is an old application i have to do some reporting on. But I will clearly try to get the storing of dates changed to datetime for the future.
Kristian_dk
18-Mar-17 11:33am
View
I believe that it is yyyymmddhh
I hope that is better.
Kristian_dk
27-Nov-16 1:34am
View
hi Jamuro77
Thank you very much!! This solution did the trick.
Awsome
/Kristian
Kristian_dk
15-Sep-16 4:38am
View
okay, point taken! Thanks for helping out
Kristian_dk
8-Jun-16 1:02am
View
Thanks for tipping in Richard. I was not aware of Encoding. Good learning for me.
Kristian_dk
7-Jun-16 10:58am
View
I see your point. You are absolutely right. I was simply aiming for consistency in my entire web application. But you are right!
Kristian_dk
7-Jun-16 7:45am
View
Thanks Prateek - you led me in the right direction :-) now it works
Kristian_dk
12-Apr-16 14:23pm
View
RyanDev.. You are the MAN!! I have tried so many Things and spend now 7-8 hours solving this. You solution is absolutely awsome!! thank you!
Kristian_dk
12-Apr-16 13:35pm
View
Hello RyanDev. I'm a newbie - could you elaborate a little bit on how I do that ?
I have two sql queries. The first one on Webform1 which populates all products and the productnumber. The second sql query is on webform2 which shows all product details. This sql query is based on a WHERE product_no = @product_no
But how do i pass my productnumber from Webform1 into that WHERE statement?
Help :-)
Kristian_dk
1-Apr-16 13:29pm
View
Thanks for helping me. I'll try this tomorrow. ;-)
Kristian_dk
1-Apr-16 13:28pm
View
Thanks for helping out RyanDev. Any specific reasons for not doing it from the sql server side?
Kristian_dk
30-Mar-16 10:25am
View
I don't understand the code but it really Works! Thanks RyanDev...
Kristian_dk
29-Mar-16 11:53am
View
The problem is that the query currently returns the results from each SELECT in two datarows:
100800 : 2016
659333,06 : 2016
I need only one row with the two numbers added to eachother.
Any ideas?
Kristian_dk
29-Mar-16 11:05am
View
Thank you for replying. I also believe that my results are okay, but how do i get the 2016 results added in the end. I have already ensured in my Querys that the results are now in DKK without VAT so i simply need to get
THIS:
100800 : 2016
49402,44 : 2015
659333,06 : 2016
TO BE LIKE THIS
49402,44 : 2015
760133,06 : 2016
Kristian_dk
7-Mar-16 7:04am
View
I don't know SQL fiddle, but i will learn this for the NeXT time i post an question in here. Thanks for submitting to my question.
Kristian_dk
7-Mar-16 7:03am
View
Thank you (both of you) for helping out. UNION ALL did the exact trick that i was looking for.
Kristian_dk
7-Mar-16 7:02am
View
Thank you so much for helping out. This Works!! yehaa
Kristian_dk
9-Feb-16 7:27am
View
I am constructing this in my asp application by dragging in a DataGridView and then configuring the datasource by a SQL Query.
Hope this makes sense.
Kristian_dk
9-Feb-16 7:21am
View
is this a ADO.net access?
Kristian_dk
9-Feb-16 7:21am
View
My connectionstring looks like this:
<asp:SqlDataSource ID="SqlDataSource1701" runat="server" ConnectionString="<%$ ConnectionStrings:WebCrmMsAzureConnectionString %>" SelectCommand="SELECT CAST(SUM(Cust.[Sales (LCY)]) AS decimal(8 , 2)) AS Totalsales, Cust.[Customer No.], Customer.Name, Customer.[Sell-to Type] FROM [Cust. Ledger Entry] AS Cust INNER JOIN Customer ON Cust.[Customer No.] = Customer.[No.] WHERE (YEAR(Cust.[Posting Date]) = YEAR(GETDATE())) GROUP BY Cust.[Customer No.], Customer.Name, Customer.[Sell-to Type] ORDER BY Totalsales DESC">
Kristian_dk
8-Feb-16 15:20pm
View
Richard that actually helped ;-) great - now it Works!
Kristian_dk
8-Feb-16 15:13pm
View
Both of these also Works - and i have decided to include both in my report. Really nice to both post the number and the actual list. Can i challenge you a Little bit.
In the Number of organisations solution, what if I would like to have to numbers. to compare in a chart.
1. The total number of organisations
2. The number of organisations with no contact persons related (as you have already solved)
Then i can make a percentage chart of our dataquality.
Can you help me here?
Kristian_dk
8-Feb-16 15:10pm
View
This Works - i get a list thanks !!!
Kristian_dk
8-Feb-16 15:09pm
View
Thanks for posting two very cool suggestions. Sorry that my question was a Little unspecific. However, non of your SQL code is working against my server.. hmm thats weird
I get at incorrect syntax near keyword 'GROUP'
Kristian_dk
8-Feb-16 15:06pm
View
Sorry i did not think about that :-)
Kristian_dk
4-Feb-16 12:24pm
View
But your code actually works on another SQL server.. hmmm thats weird..
Kristian_dk
4-Feb-16 12:24pm
View
This one was accepted - nice finally i can continue with my project. Thanks for helping
Kristian_dk
4-Feb-16 12:22pm
View
Dosen't work :-( Sql server is returning an error when doing so..
Kristian_dk
4-Feb-16 12:22pm
View
Dosen't work :-( Sql server is returning an error when doing so..
Kristian_dk
3-Feb-16 9:26am
View
This helped :-) Thanks a lot
Kristian_dk
3-Feb-16 9:26am
View
Thank for helping out Ryan - your solution was actually correct :-)
Kristian_dk
21-Jan-16 13:49pm
View
Hello Herment, Thanks for helping me out here. I'm not so techincal strong.
The thing is that my IIS is running on a Windows 2003 server which was running .net 2.0 and then i asked him to upgrade it to .net 4.0.
Could this be the issue - and is there anything that should be done to integrate this new .net 4.0 to IIS.
I'm not so happy about uninstalling anything on the server since it is running our Company ERP system.
/Kristian
Kristian_dk
21-Jan-16 13:48pm
View
Hello Ryan. Thanks for helping out.
I have ensured that it is targeting Default.aspx
When i click browse it get a 404 error page without any useful information now. I have tried to deploy the webapp to another server (2012) here i actually works.. Hmm i'm confused
Kristian_dk
21-Jan-16 4:09am
View
Deleted
Hello Herment, Thanks for helping me out here. I'm not so techincal strong.
The thing is that my IIS is running on a Windows 2003 server which was running .net 2.0 and then i asked him to upgrade it to .net 4.0.
Could this be the issue - and is there anything that should be done to integrate this new .net 4.0 to IIS.
I'm not so happy about uninstalling anything on the server since it is running our Company ERP system.
/Kristian
Kristian_dk
3-Dec-15 13:36pm
View
That was exactly what i was looking for.. You have made my day! Thanks!
Show More