Jump to content

clarkdej

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

clarkdej's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I need to take the autoincrement value and add it to the first two letters of the last name, frist two letters of the last name, to create an 8 character barcode value.  Here is my Trigger; BEFORE INSERT ON patron FOR EACH ROW begin set @namestring = left(new.namel,2); set @namestring2 = left(new.namef,2); set @namestring3= last_insert_id(); set new.barcode = concat(@namestring,@namestring2,@namestring3); end Problem:  @namestring3 always returns 0. What is the proper way to do this? Using mySQL 5.0 with third party app generating insert.  Connector is 3.51.12
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.