Page 1 of 1

Duplicate Parameter

PostPosted: Mon Oct 01, 2012 8:38 pm
by WStansbury
I have created a table (please see attached) using a field named 'STATUS_CODE'. One of the parameters within that field, IAP, repeats twice in the table. I had the owner of the database look at that field and he does not see where there are two IAPs. First thought was that there were spaces in one of the IAPs but could not find any. Have you ever run across this situation where there is a duplicate of a parameter?

Re: Duplicate Parameter

PostPosted: Mon Oct 01, 2012 8:53 pm
by admin
This could be a case of a heading or trailing space - as in 'IAP' vs 'IAP ',
if you browse the table and create an extra column with LEN(STATUS_CODE), you will see how many characters each variation contains.

Best regards

Bo

Re: Duplicate Parameter

PostPosted: Tue Oct 02, 2012 3:28 am
by Bob Cergol
Wayne,

Bo is correct. I looked at your report and tested adding a plus StatCode +column with the formula: "rtrim(Status_Code)" to remove any trailing space character, and grouped on it instead of Status_Code, and then you got a single row grouper for all of the counts for "IAD". In other words in the underlying data -- all of the data rows that are older than 120 days have an extra space in the Status_Code column when the value is "IAD". I will bet you that the length of that column was altered in the table less than 120 days ago, and/or the table data was reloaded and the length of the source data was different

Regards,
Bob