Sort problem

Results 1 to 3 of 3

Thread: Sort problem

  1. #1
    LUCIFER Guest

    Default Sort problem

    Hey !!!<BR>I have a problem and looking for someone to save me from my misery. I have a column in my SQL DB called titles. Entry looks something like this: "(October 7, 1973) Title goes here ...". I want to list all my titles as an output sorted by date. I know I should use inStr function but I&#039m not sure how. Any kinda help is greatly appreciated. <BR>Thank you.

  2. #2
    Join Date
    Dec 1969

    Default RE: Sort problem

    Hey!<BR><BR>First of all, is it really required to put all this in a single column? I mean, can&#039t you put the date in a separate col. This will make everything go much faster and a bit easier too. You can do this by using Instr function before inserting the values in the DB. This way you can simply use "order by" in your sql query.<BR><BR>The other way is a bit difficult. You&#039ll have to parse the string for the date part and then run it thru a custom developed function to arrange it in a sorted fashion (and you will need to use the date function for sorting it that way).<BR><BR>If this makes any sense, you can get back to this forum for more and we can discuss a little bit more about this.<BR><BR>Hope this helps!<BR><BR>Sandy

  3. #3
    Join Date
    Dec 1969

    Default RE: Sort problem

    Well, if the first ( is the first character always,<BR><BR>chop it off, then use instr to find the ) use left() to get the date, use isdate, and then vbs might compare that style of date.<BR><BR>I don&#039t have time to write out the code, but that is the general idea. its hard on scalability but thats the price you pay.<BR><BR>tada

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts