dfwcharles
Technical User
I'm trying to query a table to find certain Glaccount codes. The datalength of the code varies, the maximum length of the code is 15, but I only want to find the codes that have a datalength of 10. Here's the catch; Some of the codes have only 10 char, but there will be a code that matches the frist 10 with an additional 5 chars at the end. I only want the codes that have 10 with no matching 15. Here's an small example of the data.
glaccount
---------------------
1106195001
110619500181155
1106400000
110640000082167
1106400001
110640000100000
1106400002
1106400003
110640000381155
110640000381156
1106400004
110640000482141
110640000482142
1106400005
1106400006
110640000682723
In this example I would only what to see 1106400002 and 1106400005. I was thinking about joining the table to itself, with some kind of where clause, but I'm stumped.
Thanks in advance
Charles
glaccount
---------------------
1106195001
110619500181155
1106400000
110640000082167
1106400001
110640000100000
1106400002
1106400003
110640000381155
110640000381156
1106400004
110640000482141
110640000482142
1106400005
1106400006
110640000682723
In this example I would only what to see 1106400002 and 1106400005. I was thinking about joining the table to itself, with some kind of where clause, but I'm stumped.
Thanks in advance
Charles