15,906,097 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 Andrw_S (Top 11 by date)
Andrw_S
8-Sep-15 9:44am
View
The result is exactly as I would expect - i.e. the "true" page is loaded.
Andrw_S
27-Apr-15 4:02am
View
This is not a solution to the original condition, however I shall add this in case it happens to be of use to anyone in a similar spot.
If you also have a primary ID column in there, then the below works:
Select
m.ID,
m.UserName,
l.Date,
l.Time,
l.LoginStatus
From LoginStatus l
inner join
(
Select
max(LoginStatusID) [ID],
UserName
From LoginStatus
group by
UserName
) m
on l.LoginStatusID=m.ID and l.UserName=m.UserName
Order by
m.UserName
Andrw_S
27-Apr-15 3:54am
View
Hi Pratap420,
Apologies for the late reply. Thank you very much.
That works fine!
NOTE: I had to make a small alteration to your code for the "desc" condition on "_date", thus:
Select UserName,_date,_time,LoginStatus
from
( Select * ,ROW_NUMBER() over (partition by username order by _date desc,_time desc ) rk
from @t) A
where rk=1
I'm sure this was just an omission
Andrw_S
24-Apr-15 9:11am
View
Hi,
Yes, I did.
It's very similar to:
http://stackoverflow.com/questions/1049702/create-a-sql-query-to-retrieve-most-recent-records
Andrw_S
24-Apr-15 8:43am
View
Hi,
So if you put together a query that looks something like this:
Select
UserName,
MAX(CAST([Date] AS datetime) + CAST([Time] AS datetime)) [Last Entry],
LoginStatus
from LoginStatus
Group By
UserName,
LoginStatus
order by
UserName
Then you end up getting TWO results per person. One each for loginStatus=1 and loginStatus=0.
I've got this far with several queries, but not managed that last step of retrieving only the most recent record.
Thanks.
Andrw_S
8-Apr-15 3:26am
View
Yes, apologies. I shall do so.
Thanks once again.
Andrw_S
7-Apr-15 10:32am
View
Nice tool!!
Thank you very much!
Andrw_S
7-Apr-15 3:42am
View
Hi,
Apologies for the late reply - Easter break.
I shall be using a variety of websites - an example of which is: "http://uk.rs-online.com/web/"
These websites are all equipment suppliers, and I shall be searching these suppliers to get prices and other details on some of the items they sell. The data I shall therefore enter into the "Search" space will be the Manufacturer's Part Number. So a typical part supplied by the website shown above might be: "1578433" (An A2D converter from Panasonic).
There are some third party tools for this job (e.g. "https://octopart.com/") however none I've come across so far do exactly what I want. Hence the attempt to develop something myself.
Thanks for your help.
Andrw_S
2-Apr-15 6:18am
View
Hi,
No, you've missed the point. I know that the information IS NOT on the home page. There is a "search" textbox on this home page. Into this you enter the search term and hit the corresponding "search" button.
This load A NEW webpage and it is this page that I parse for its information.
It is the method of getting to this NEW page FROM the home page that I'm trying to improve. Sorry, I can see how my initial phrasing of the question can result in the confusion.
Thanks.
Andrw_S
26-Mar-15 12:39pm
View
Sorry, but I do not follow.
~~>Where does this code go?
~~>Where does the "homepage" string go?
This needs quite a bit of expansion to make it clearer to someone who is knew to this area of coding.
Thanks.
Andrw_S
25-Mar-15 8:06am
View
Thank you! Work's a treat.
Show More