Hi All
I am interfacing my software with QuickBooks - in my SQL insert statements I do the following
do while cInvcNo == oInvItms:invcno .and. ! oInvItms:eof()
aadd(aInvItems,{cClient,cInvcNo,nQty,nAmount})
oInvItms:skip()
enddo
for I := 1 to len(aInvData)
cSql :=''
cSql+= "INSERT INTO InvoiceLine (ClientName,InvoiceNumber,LineQuantity,LineAmount) VALUES ('" + aInvItems[I,1] + "','" + aInvItems[I,2] + "', // how to insert numeric values
Cheers
Colin
Numeric Data in SQL insert
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Numeric Data in SQL insert
Colin,
here it is a sample:
EMG
here it is a sample:
Code: Select all
cSql = "INSERT INTO MyTable ( MyNumericField ) VALUES ( " + LTRIM( STR( nMyValue ) ) + " )"
-
- Posts: 310
- Joined: Mon Oct 10, 2005 5:10 am
Re: Numeric Data in SQL insert
Hi Enrico
Thank you very much !!!!!
Cheers
Colin
Thank you very much !!!!!
Cheers
Colin
-
- Posts: 845
- Joined: Sun Oct 09, 2005 5:36 pm
- Location: la laguna, mexico.
Re: Numeric Data in SQL insert
colin
try
INSERT INTO MyTable ( MyNumericField1,MyNumericField2 ) VALUES ( `" + STR( nMyVal1 ) + "`,`" + STR( nMyVal2 ) + "` )"
regards
paco
try
INSERT INTO MyTable ( MyNumericField1,MyNumericField2 ) VALUES ( `" + STR( nMyVal1 ) + "`,`" + STR( nMyVal2 ) + "` )"
regards
paco
____________________
Paco
Paco
Re: Numeric Data in SQL insert
Colin:
In SQL, everything is stored as string, example for Date fields you should use DTOS(YourDate).
Regards
In SQL, everything is stored as string, example for Date fields you should use DTOS(YourDate).
Regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero