Formatting text from a database

Results 1 to 3 of 3

Thread: Formatting text from a database

  1. #1
    John Rodgers Guest

    Default Formatting text from a database

    I&#039ve been looking all over and I can&#039t seem to find the answer to my specific question. <BR><BR>I have results from a database that need to be formatted for display on a web page. In one case, an account number needs to have a dask placed between the last, and second-to-last numbers in the string. For example, account number "9437593" should read "943759-3". To compound the problem, the length of the account number will vary. Sometimes it is 6 digits, but it can be as many as 11 digits long. <BR><BR>Are there any functions I can use to perform this? I come from the AS/400 world, where can specify an Edit Word of &#039 - &#039 to format the text, but I haven&#039t seen anything similar in VBScript. <BR><BR>Any help is appreciated. Thanks in advance,<BR>John Rodgers<BR>

  2. #2

    Default Possible ANSWER; RE: Formatting text from a databa

    This may assist you; also, you can format it in MS Access (if you use it) prior to sending to asp.<BR><BR><BR>

  3. #3
    John Rodgers Guest

    Default RE: Possible ANSWER; RE: Formatting text from a da

    Thanks for the response. The example you listed is for formatting numbers that contain decimals. The account number field I&#039m using contains only integers. It might work if I could use a dash instead of a period.<BR><BR>The data is being pulled from an AS/400 database using SQL. I&#039ll see if I can do something in SQL with it, but I&#039d like to see if there is a VBScript solution.<BR><BR>Regards,<BR>John

Posting Permissions

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