DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: result

  1. #1
    Join Date
    Mar 2001
    Location
    south africa
    Posts
    401

    result

    How do i display the following:

    select count(*) from student;

    count(*)
    --------
    12345

    but i would like to display the result like this,like adding "*" before the result.

    count(*)
    -------
    *12345

    how do i do that

    Pls help

  2. #2
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    SELECT '*' || TO_CHAR(COUNT(*)) FROM student;
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  3. #3
    Join Date
    Mar 2001
    Location
    south africa
    Posts
    401
    thanks

  4. #4
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    A very strange requirement!

    If you're really looking at padding out a field with *'s (as is done on cheques) then look at LPAD.

Posting Permissions

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


Click Here to Expand Forum to Full Width