If it's a Char field:
s="SELECT LTRIM(jocuno) as customer from uscbjopf where jocuno = '" +custo+"'"
>I'm putting in customer number into an inputbox and have it retrieve that customer from our as400(IBM). This field in the 400 is a character with 8 spaces and then number. If I write the following code against our SQL Server all works fine but the info I need is on 400 any direction appreciate.
>
>
>custo = INPUTBOX("test")
>
>ms039=SQLCONNECT("as039a")
>
>s="SELECT LTRIM(jocuno) as customer from uscbjopf where jocuno = " +custo
>
>SQLEXEC(ms039,s,"Cust")
>
>SQLDISCONNECT(ms039)
>