I have the following SQL in a VB script to create a new table in a Microsoft Access 2010 Database:
The Length for each of them is arbitrary. I just want to give each of the fields enough space that I never have to deal with one being too small. The SQL works correctly and the table is created in the Access Database, but when I try to put anything in one of the fields, it autofills the rest of the field with spaces. So if I put in say
in the first field it adds 44 spaces so the field now contains
. Needless to say, this is a problem when I attempt to export the table, the file has thousands of unnessesary spaces. Does anyone know a way to solve this issue?
Code:
CREATE TABLE ElectionFile( Record_Type CHAR(50) WITH COMPRESSION NULL,
Employer_ID CHAR(50) WITH COMPRESSION NULL,
Member_Number CHAR(50) WITH COMPRESSION NULL,
Plan_Year_Effective_Date CHAR(50) WITH COMPRESSION NULL,
Account_Type INT,
Election_Effective_Date CHAR(50) WITH COMPRESSION NULL,
Annual_Deduction_Amount CHAR(50) WITH COMPRESSION NULL,
Annual_Contribution_Amount CHAR(50) WITH COMPRESSION NULL,
Scheduled_Deduction_Amount CHAR(50) WITH COMPRESSION NULL,
Scheduled_Contribution_Amount CHAR(50) WITH COMPRESSION NULL,
Debit_Card_Selected CHAR(50) WITH COMPRESSION NULL,
Auto_Pay_Dental CHAR(50) WITH COMPRESSION NULL,
Auto_Pay_Healthcare CHAR(50) WITH COMPRESSION NULL,
Auto_Pay_Vision CHAR(50) WITH COMPRESSION NULL,
Auto_Pay_RX CHAR(50) WITH COMPRESSION NULL,
Election_Expiration CHAR(50) WITH COMPRESSION NULL,
FSA_First CHAR(50) WITH COMPRESSION NULL,
CoPayCode_Medical CHAR(50) WITH COMPRESSION NULL,
CopayCode_Dental CHAR(50) WITH COMPRESSION NULL,
CopayCode_Vision CHAR(50) WITH COMPRESSION NULL,
CopayCode_RX CHAR(50) WITH COMPRESSION NULL,
CSA_Number CHAR(50) WITH COMPRESSION NULL)"
The Length for each of them is arbitrary. I just want to give each of the fields enough space that I never have to deal with one being too small. The SQL works correctly and the table is created in the Access Database, but when I try to put anything in one of the fields, it autofills the rest of the field with spaces. So if I put in say
Code:
"Record"
Code:
"Record "