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

using nvl lpad functions in java form

Status
Not open for further replies.

chochoo

Programmer
Aug 24, 2003
33
PK
hi to all
i am making a form in java connected to ms access behind.
it is based on a table of vendor's record. i m auto generating vendor id .... by using of sql query
select max(vendor_id)+1 from vendor;
this is going fine but when i use nvl function alongwith the query it generates error. though the query is correct as applied on sql editor.
select nvl(max(vendor_Id),0)+1 from vendor; so that if no vendor is entered then query must generate 1 as id.
is there some other way to handle nvl function in java. and i m also having problem in lpad function. so please guide me in both matters.
thanks in advance
 
I think this is just an SQL question not Java but anyway, what's nvl?

Cheers,

Dian
 
it checks it the value is null I think - a bit like a tertiary statement that checks for null froma value or returns a default.

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top