Subject Re: converting text to value in SQL
From James Reed <james@myissinc.com>
Date Mon, 17 Jan 2022 22:25:23 -0500
Newsgroups dbase.getting-started

Heinz Kesting Wrote:

> Hi Rouke,
>
> > how do I do this in sql:
> >
> > str(val(trapnumber),2,0,'0')
>
> Try this:
>

This has worked for me in the past.  Since dBase uses standard SQL statements most any SQL funtions for string manipulation should work.  Hope this is helpful.

Cast(equipment.equipmentid As VarChar(10))

equipment.equipmentid is a numeric field.  Below is an example of it being used in  concatenating literals.

--Database:PGEASERSS
Select '*ID:' || Cast(equipment.equipmentid As VarChar(10)) || '*' As Barcode,
  equipment.equipmentname As Trailer,
  equipment.equipmentserialnumber As VIN
From equipment