Finding the month in a birthdate

I'm trying to find all my March birthdates and Anniversaries, as entered in attributes in the format of mm/dd/yyyy.

How would I set up the search to find "03" in the two leftmost characters? 

I'd like to avoid getting anyone that was born/married on the 3rd day of the month.

It seems this is kind of like a reverse wild-card.  Rather than finding within a string of characters, I'm trying to limit it to only specific characters within the field.

Is this even possible?

Parents
  • Chris,

    Something like this should work:

     

     

    select distinct customer_no

     

     

    from tx_cust_keyword

    where

     

    keyword_no = 1

    and substring(key_value, 1,2) = '03'

    A word of warning, if some of your birthdates were from conversion data they may be stored in different formats - for example YYYY-MM-DD or something else crazy.  Values in tx_cust_keyword are stored as text so there could be anything in there.  I would check before you run any restrictive criteria like the one above.

    Dale

  • Unfortunately I didn't get any results when I did this.

    Is there a place to enter the Attribute value/name during the search?

  • Chris,

    I thought you were working in SQL Server Mgt.  If you are in list manager in Tessitura you can still do the following query just do it as a manual edit.  Create a new list, click on "Manual Edit" and paste into the bottom of the window:

    select distinct customer_no

    from tx_cust_keyword

    where keyword_no = 1

    and substring(key_value, 1,2) = '03'

    If you are getting nothing, I'm guessing you might have issues with the way the data is stored in the table.

    Dale

Reply
  • Chris,

    I thought you were working in SQL Server Mgt.  If you are in list manager in Tessitura you can still do the following query just do it as a manual edit.  Create a new list, click on "Manual Edit" and paste into the bottom of the window:

    select distinct customer_no

    from tx_cust_keyword

    where keyword_no = 1

    and substring(key_value, 1,2) = '03'

    If you are getting nothing, I'm guessing you might have issues with the way the data is stored in the table.

    Dale

Children
No Data