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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sql: output to numerice field

Status
Not open for further replies.

cat5ive

MIS
Dec 3, 2004
184
US
Hi,

As my understanding when you output to numerice field in database file, you don't put quote around the variable name. The code below output data from &strinvamount& to phiamt and phnamt which are both numeric fields. It has quotes around it and still working. Can someone tell me if I miss something?

thanks in advance
Code:
sqll = "insert into cisdtalib.$mvaph(phinv#, phdesc, phivtp, phivdt, phdudt, phiamt, phissu, phrcvd, phrpgm, phnamt, phacpd, phacpu, phstag, phapvd, phapvu, phpmt#)"
     sqll = sqll & "VALUES ('"&strinvnumber&"','"&strdescription&"', '"&strmiscinv&"', '"&varinvdate&"', '"&varduedate&"'," 
     sqll = sqll & "'"&strinvamount&"', '"&strissuer&"', '"&sysdate&"', '"&username&"' , '"&strinvamount&"', '"&sysdate&"', '"&username&"', '"&strstatus&"', '"&varpaydate&"', '"&strpayby&"', '"&strpaynumber&"' )"
 
Hi

In theory you should not have the quotes around those numeric fields but in practice some SQL based databases will cope with it.

All the best

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top