Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

jorge1973

Status
Not open for further replies.

jorge1973

Technical User
Joined
Aug 2, 2021
Messages
1
Location
AR
Estimados, buenas Tardes, tengo campo C_U_I_L_ ej: 20-24494420-6 y necesito armar funcion para sacar 20- y -6, en concreto que me quede solo el numero de documento 24494420 genere la funcion mid[(RPT_RECIBO_SUELDO_ttx.C__U__I__L__),4,8)] sin embargo me da error. me podran ayudar? - gracias totales
 
You need to check for nulls or field lengths < 10, as in:

If isnull(field) or
Len(field)<10 then
"Unexpected value" else
Mid(field,4,8)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top