I have field called CallingParty in My CDR table it contains data like this
CallingParty
267672668788
I want to select the first 3 number of each of those numbers like
CallingParty
267
I have field called CallingParty in My CDR table it contains data like this
267672668788
I want to select the first 3 number of each of those numbers like
267
if
CallingParty
is of type int:Try this:
Use this query:
SQL Server has a Left() function, but it works best on strings. (varchar/char in SQL)
If the data length does not change then you can always divide by 10 * the digits you have