Microsoft
Software
Hardware
Network
Question : I need assistance with a SQL query
Hi Experts,
I have a query that returns a list of order numbers from the Orders table. I need to query for a field called EventDate, and UserName from the Events table. The event i am looking for is the ADD event. There could be multiple ADD events for the every record. so i need to get the one with the earliest date.
For example if I have an Order with 3 ADD events, I only want to select the first ADD event.
ORDERS
TABLE
OrderID OrderNumber
110 000110
EVENTS
TABLE
OrderID EventDate UserName EventName
110 4/1/2010 John Doe ADD
110 4/22/2010 Karen Baker ADD
110 5/6/2010 Mike Johnson ADD
My Query should return the following:
OrderNumber EventDate UserName
000110 4/1/2010 John Doe
How can i do this? Thanks in advance
mrotor
Answer : I need assistance with a SQL query
Ok, maybe try reversing the LIKE:
SELECT * FROM `df_modules_shares` WHERE '/home/florlpt1/public_htm
l/safeline
t_t/system
/data/defa
ult_home_f
older/test
e/FGCI 2010/Norte/123' LIKE CONCAT(path, '%')
Random Solutions
LCD Monitor weird behavior
How do I place a control to return in the subject of an email
W7 - windows explorer
What's the fastest way to do a wherein query in linq2sql
Need script to allow me to change permissions on a folder full of user folders
Changing Background colors for a column based on contents of cell
How to disable attribute in AD
Looking for bicycle cadence indicator using colored LEDs to show speed
Using perl, I need to check if all the files in a certain directory start with a certain character string.
How do I create a looping to add values in columns?