Results 1 to 2 of 2

Thread: Format question

  1. #1
    Join Date
    May 2009
    Posts
    1

    Unanswered: Format question

    I am new to ISQL for Sybase.

    I have a currency column that is currently shown as 222.05 (d.amount) and I want it to be formated as 000002205.

    I have tried several different formating types but can not find one that works.

    Also, I need to get rid of the column headings.

    Can someone point me in the right direction?

    select('"C",'+'"9848836525",') ,
    d.printed_check_num,
    '"'+dateformat(d.Tran_date,'mm')+dateformat(d.tran _date,'dd')+dateformat(d.Tran_date, 'yyyy')+'",',
    d.amount,
    '"'+d.payee_name+'",' ||'"'+d.address_line_1+'",'||'"'+d.address_line_2+ '",'||'"'+d.city+'",'||'"'+d.state+'",'||'"'+d.zip +'",'||
    '"'+d.memo+'",'||'"'+e.SSN_or_FEIN+'"'
    from disburse d, entity e,
    where d.tran_Date = '2009-03-10*'
    and d.entity_id = e.entity_id
    and d.payment_method = 'Check'


    Thanks,
    Cindy

  2. #2
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    It seems you want comma delimited output.
    It might be easier to create a view for the data you want and then bcp out from the view.
    Quote Originally Posted by Honeyrun
    ...222.05 (d.amount) and I want it to be formated as 000002205
    right('000000000' +convert(varchar(9), convert(int,d.amount*100)),9)
    Quote Originally Posted by Honeyrun
    Also, I need to get rid of the column headings.
    isql -b

Posting Permissions

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