We help IT Professionals succeed at work.
Get Started

Sort Text Date from SQL Server Table Column

199 Views
Last Modified: 2016-03-06
Hello All;
I have a Table.Field named PageList
               select PageList from TheList
Inside of this Field, is / separated word sets, with dates on them.
File_Date_(Jan_21,_1976) / File_Date_(Mar_18,_1996) / File_Date_(Jan_22,_1983) / File_Date_(Jan_20,_1983) / File_Date_(Jan_14,_1976) / File_Date_(Jan_18,_1979) / File_Date_(Dec_18,_1979)

Open in new window


I need the output, to be like this. (They are going to be wrapped inside of a BBCode Table Schema)

70s goes here
       76 goes here
File_Date_(Jan_14,_1976)
File_Date_(Jan_21,_1976)

79 goes here
File_Date_(Jan_18,_1979)
File_Date_(Dec_18,_1979)

80s goes here
       83 goes here
File_Date_(Jan_20,_1983)
File_Date_(Jan_22,_1983)


90s goes here
       96 goes here
File_Date_(Mar_18,_1996)

Open in new window


This is going to be the default look, pretty much.
The Date will be wrapped in the parenthesis, and will also have an underscore,
and as you can see, it also has a comma, at the end of the day.

I am trying to make this as simple as possible, as we have 1,000's of pages that are going to be updated on a regular basis, and without having these ordered, and within a decent generated code structure, it is going to be very time-consuming, to say the least.

Any idea's on this one?
I know it is not going to be a simple one.
Hopefully, I have provided enough information, to get going on it.

Carrzkiss
Comment
Watch Question
SQL Server DBA
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 14 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE