Home : Products : Hach WIMS : Hach WIMS Client : Documentation : Terms : Sample Number
Q11097 - INFO: Sample Number

Sample Number is a unique id for a sample.  Sample Numbers consist of 10 digits and are automatically assigned by WIMS when the Sample is first placed on the calendar.

The first 6 digits are the current year, month, day (yymmdd) that the sample is to be scheduled for. 

The last 4 digits are simply a counter for the day (i.e. the 5th sample for a day is 0005).

 

NOTE: You can add a Prefix to the sample number using a Facility Setting.  You may need to do this if you have more than one database to keep the Sample Numbers unique.  For example, you want all your Samples in the Drinking Water database to start with DW- and all your samples in your wastewater database to start with WW-.

1. Go to the System Setup, Admin Console and Execute the "Execute custom SQL commands against the current database. Experienced users only!" command.  You MUST be a Super user to execute this command.

2. Enter the following command: 

MS SQL SERVER or MSDE:
insert into settings values('SUPER','2006-10-02 10:00:57','SAMPLENUM_PREFIX','DW-')

ORACLE:
INSERT INTO SETTINGS VALUES('SUPER', TO_DATE('02-Oct-2006 10:26:42 AM','dd-Mon-yyyy HH:MI:SS AM'),'SAMPLENUM_PREFIX','DW-')

To enter the date (the second value) click the Insert DateTime button.

3. Click Execute. 

4.  All samples that will be generated in the future will now start with DW-.  In order to add the DW- prefix to existing samples, execute the following command:

MS SQL SERVER or MSDE:
update LC_SAMPLE SET SAMPLENUM = 'DW-' + SAMPLENUM

ORACLE:
UPDATE LC_SAMPLE SET SAMPLENUM = CONCAT('DW-',SAMPLENUM)

 

Generating Sample Numbers using the alternate yymmdd-ss format:

Lab Cal can also generate Sample Numbers in the format of YYYY followed by a sequential number for the year. Example - first Sample for Dec 17th,  2015 would be "151217-01", second would be  "151217-02", etc...

  • The first 6 digits are the current year, month, day (yymmdd) that the sample is to be scheduled for.
  • The last 2 digits are simply a counter for the day (i.e. the 5th sample for a day is 05).

 

1. Go to the System Setup, Admin Console and Execute the "Execute custom SQL commands against the current database. Experienced users only!" command. You MUST be a Super user to execute this command.

2. Enter the following command:

update Settings Set CURVALUE = 'yymmdd-ss' where setting = 'LABCAL-SAMPLENUM-FORMAT'

3. Click Execute.

WARNING: This setting does not reset the sample numbers for any existing samples, only new samples. This setting should be set when starting to use Lab Cal for the first time.

 

Generating Sample Numbers using the alternate YYYYsssss format or yymmdd-ss format:

Lab Cal can also generate Sample Numbers in the format of YYYY followed by a sequential number for the year.  Example - first Sample of 2015 would be "201500001", second would be "201500002", etc...

1. Go to the System Setup, Admin Console and Execute the "Execute custom SQL commands against the current database. Experienced users only!" command. You MUST be a Super user to execute this command.

2. Enter the following command:

update Settings Set CURVALUE = 'YYYYsssss' where setting = 'LABCAL-SAMPLENUM-FORMAT'

3. Click Execute.

WARNING: This setting does not reset the sample numbers for any existing samples, only new samples.  This setting should be set when starting to use Lab Cal for the first time. 

 

 

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 5/4/2008 8:42 AM.
Last Modified on 2/8/2017 8:25 AM.
Last Modified by Scott Dorner.
Article has been viewed 5780 times.
Rated 4 out of 10 based on 2 votes.
Print Article
Email Article