Subject SQL question
Author Michael Vilhelmsen

I would like to know, if there is a SQL command like COPY in Delphi.

Actually I need to do this:

I have a table contains EANNumbers.
All fields contains 13 characters.

I would like to see, how many of those are the same on the first 12
places (I dont care what the last digit is).

Lets say I have these records:

Field1 Field2
1 0298716111114
2 0298716111115
3 0298716111116
4 0298716111222

Then I would like a result like:

029871611111 3
029871611122 1

So I need something like

"First 12 digits",
from table
group by 1

Can this be done in SQL ?