Link to home
Start Free TrialLog in
Avatar of dcgimo
dcgimo

asked on

Sorting in Access 2013/SQL 2012

I've been given a database to modify.  It's an Access front with a SQL back-end.  
They want to sort by the case number with the newest one listed first; no big deal, except that the case number is the two digit year followed by another number..."15-017" (basically, the 17th case in 2015).  Basically I need to sort by the first number, then the second number.  It's stored as one record (nvarchar10) in SQL.  Unfortunately, there is data from the late 1900s so there are some cases that start with 99-, 98-, 97-, etc.
The sorting only needs to be done on one form so I would like to do this within the Access front end and not have to change anything in SQL.
I'm not overly experienced in Access so would like to keep the resolution as simple as possible.

Any ideas?

Thanks,
~Rick
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dcgimo
dcgimo

ASKER

Is there a way to split it in the front-end without modifying the table in SQL?

Thanks,
~Rick
No Points wanted...

What Scott posted would be done in a query, (in the front end)...then that query would be used instead of a "table"
As Jeff indicates, you can do this in the FrontEnd with a Query, or you can add a View to the backend (no table mods needed) and perform the split there. If you use a View, you'll have to "link" the view to your FE, of course. In most cases, unless there are some heavy duty lifting to be done, you're better off doing this in Access.
Avatar of dcgimo

ASKER

Working with a coworker on this that is more proficient in Access/SQL, she was able to get what we need with a view and your statements above, Scott.  All we need now is to figure a way to enter data via the view.  

Thanks,
~Rick
Generally speaking, if the tables on which your View is based allow for mods/adds/deletes, then you should be able to edit data through the view.

This MSDN article may shed some light:

https://msdn.microsoft.com/en-us/library/ms180800.aspx
Avatar of dcgimo

ASKER

Thanks for the assistance.  It's working great now!
~Rick