Avatar of maximyshka
maximyshka

asked on 

Use "-" in the unique field

Hi, does it make any difference whether or not I will use "-" in the Unique number field.

Example "1111111111-222222".  We have such field in master file for reporting purposes.

Unique field is the main field we use for programming, groupping, indexing, reporting etc.

Is this OK to use field "1111111111-222222" or I have to use field "1111111111222222" as primary key and use field ""1111111111-222222" for reporting purposes
Microsoft AccessSQL

Avatar of undefined
Last Comment
maximyshka
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Why not use the Access Auto Number as your Primary Key ... then it becomes a non-issue.

mx
Avatar of lee555J5
lee555J5
Flag of United States of America image

You can use "-" in a unique number field. However, it is obviously text and not a number. Neither will it be automatically incremented as an Autonumber type. Your only requirements would be uniqueness.
Avatar of maximyshka
maximyshka

ASKER

I have a field in the format 1111111121-2222222 which I want to use as primary key. Yes this field i text. Incrementing not needed
Avatar of lee555J5
lee555J5
Flag of United States of America image

Then, yes, you may include and use the "-".

Lee
Avatar of maximyshka
maximyshka

ASKER

MX, autonumber will not work.  Value "1111111121-2222222" is uniquely identify all information about this loan.

Something similar to composite key

1111111121
2222222
ASKER CERTIFIED SOLUTION
Avatar of lee555J5
lee555J5
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of maximyshka
maximyshka

ASKER

Thanks a lot
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo