Create a SQL script to insert values from a spreadsheet(excel/csv ) file to a table
Budget: $30 – $250 AUD
Please write a script in SQL Server to create a table called Officers and takes officers from the example spreadsheet attached.
- An officer needs to have sign-in name (NHVR email), first name, last name, Role, and Organisation (active defaulted to 1) as a minimum on the template to be successful.
- Sign-in name must be unique.
- Role has to be part of the enum of roles: SCO, SSCO,PSCO, OM, BSO, Intel, OMU, MOS, It Support
- Organisation must be 291 (for WA) or 290 (for NHVR users).
- ID must not be null and auto-generated
- All other fields are optional
A report should be given based on the success/failure of the upload. This error message/report should outlined how many officers added, how many failed and why they failed.
e.g:
100 officers added successfully
25 officers failed to add
Row 2: username already in use
Row 3: active can only be 0 or 1
etc…
Please remember, the csv is just an example, format and columns will be the same, just values can be changed.
- An officer needs to have sign-in name (NHVR email), first name, last name, Role, and Organisation (active defaulted to 1) as a minimum on the template to be successful.
- Sign-in name must be unique.
- Role has to be part of the enum of roles: SCO, SSCO,PSCO, OM, BSO, Intel, OMU, MOS, It Support
- Organisation must be 291 (for WA) or 290 (for NHVR users).
- ID must not be null and auto-generated
- All other fields are optional
A report should be given based on the success/failure of the upload. This error message/report should outlined how many officers added, how many failed and why they failed.
e.g:
100 officers added successfully
25 officers failed to add
Row 2: username already in use
Row 3: active can only be 0 or 1
etc…
Please remember, the csv is just an example, format and columns will be the same, just values can be changed.