ending 0's????

Results 1 to 2 of 2

Thread: ending 0's????

  1. #1
    Join Date
    Dec 1969

    Default ending 0's????

    I asked earlier but didn&#039;t explain well. I simply need to add 8 0&#039;s to the end of a field. MY DB is down and I believe this is correct but wanted to make sure. The first part is right but I thought I had to have tics around the x=&#039;00000000&#039; but when usuing interdev it comes back green like a comment. Is the below code correct. Account_Number is not an integer.<BR><BR><BR>&#039;Select the next reg # based on the above next reg function<BR>sql="select distinct next_reg() as Regnum " & _<BR> "From dummy "<BR><BR>set rs9=cnn.Execute(sql)<BR><BR>x=00000000<BR>y=rs9("R egnum") & x<BR><BR>&#039;Insert the registration number(based on the bus_id and the next_reg combined)<BR>&#039;and the account # into the account table <BR> <BR>sql= "INSERT INTO Account(Account_Number, Business_ID, Registration_Number ) "<BR><BR>sql=sql & "Values("<BR>sql=sql & "&#039;" & y &<BR>sql=sql & "," & rs2("fred") <BR>sql=sql & "," & rs9("Regnum") & "&#039;"<BR>sql=sql & ")"<BR> <BR>cnn.Execute sql

  2. #2
    Join Date
    Dec 1969

    Default Look for LPAD and RPAD functions..<eop>


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts