I'm new to SQL all together, but I have the following issue I really need help solving;

We have a list of customer transactions that are grouped together by customer. Each transaction has a start date that is pulled from the database. However we have supplied a stop date by looking at the next "like" transaction in the list and making that start date the current transactiosn stop date. But we need the last transaction to stop IF there is a stop date for another type of transaction. IF there isn't a stop date for that other transaction then there should NOT be a stop date for the last transaction....

Is there a way to make a transaction look for another type of transaction and pull that transactions stop date?

Yes, you can - but the details of how you would do it depends on how the data is stored. If you can post the table schemas with some sample data, people on the forum would be able to give more concrete suggestions.

My guess would be that you will need a query that has a where clause which goes something like

Sorry for the confusion...let's see if this helps this is an example of my info. This is a list of transactions for a customer for Trans "MSF" there is a StopDate and what I need to be able to do for the last Trans of "CS0" is make it look for a a Trans "MSF" and if there is a StopDate for that type of trans, put it in the StopDate line for Trans "CS0", but if there is not a StopDate for Trans "MSF" leave the StopDate for Trans "CS0" blank. There will always be a Trans "MSF", maybe more than one so I will need it to look for the latest StopDate for that particular type of Trans. The last Trans will not always be "CS0", but it should still look for a "MSF" Trans. Does that make sense?

UPDATE t
SET t.StopDate = t1.latestdate
FROM Table t
INNER JOIN (SELECT Name,
MAX(StartDate) AS StartDate,
MAX(CASE WHEN trans='MSF' AND StopDate IS NOT NULL THEN StopDate END) AS latestdate
FROM table
GROUP BY Name
HAVING MAX(CASE WHEN trans='MSF' AND StopDate IS NOT NULL THEN StopDate END) IS NOT NULL
)t1
ON t1.Name = t.Name
AND t1.StartDate = t.StartDate

UPDATE t
SET t.StopDate = t1.latestdate
FROM Table t
INNER JOIN (SELECT Name,
MAX(StartDate) AS StartDate,
MAX(CASE WHEN trans='MSF' AND StopDate IS NOT NULL THEN StopDate END) AS latestdate
FROM table
GROUP BY Name
HAVING MAX(CASE WHEN trans='MSF' AND StopDate IS NOT NULL THEN StopDate END) IS NOT NULL
)t1
ON t1.Name = t.Name
AND t1.StartDate = t.StartDate

We are trying to get stop dates for 2 transaction types one is MSF and the other is CS%. We want to make sure that when someone enters a transaction LIKE CS% that it is only stopped by the last MSF transaction