I need to automatically generate a 5-character value for my Business Key. Without any user interaction.
2 character -> from 01,02,03,04 to 05
+
3 character -> Sequential Number (001,002,003).
The Sequential Number must reset on each new day.
This is my Example:
ComboBox= 01 or 02 or 03 or 04 or 05
if ComboBox= 01 and MyDate = 4/6/2015
MyTable
PK Castumer_Number Seq_Number
1 1 01-001
2 2 01-002
3 3 01-003
if ComboBox= 02 and MyDate = 4/6/2015
MyTable
PK Castumer_Number Seq_Number
1 4 02-001
2 5 02-002
3 6 02-003
if ComboBox= 01 and MyDate = 4/6/2015
MyTable
PK Castumer_Number Seq_Number
1 7 01-004
2 8 01-005
3 9 01-006
and The Sequential Number must reset on each new day.
I hope it's clear now
thanks
2 character -> from 01,02,03,04 to 05
+
3 character -> Sequential Number (001,002,003).
The Sequential Number must reset on each new day.
This is my Example:
ComboBox= 01 or 02 or 03 or 04 or 05
if ComboBox= 01 and MyDate = 4/6/2015
MyTable
PK Castumer_Number Seq_Number
1 1 01-001
2 2 01-002
3 3 01-003
if ComboBox= 02 and MyDate = 4/6/2015
MyTable
PK Castumer_Number Seq_Number
1 4 02-001
2 5 02-002
3 6 02-003
if ComboBox= 01 and MyDate = 4/6/2015
MyTable
PK Castumer_Number Seq_Number
1 7 01-004
2 8 01-005
3 9 01-006
and The Sequential Number must reset on each new day.
I hope it's clear now
thanks