Doubt with Concat on Oracle

Asked

Viewed 66 times

-2

I have a problem in exporting data to Excel, the number recorded in the database and very large generating several strange characters in the conversion that Excel tries to do, so I need to send it thus:'51150547067525018740550080000038621721439107'

Original value: 51150547067525018740550080000038621721439107

How could I have this exit?

select  CONCAT( CAST (nf.chave AS VARCHAR(255)),'*')  from NF nf

Current result: 51160307053693005199550510000032181665018130*

  • @cat, what was the problem of the question?

  • 1

    I wasn’t the one who objected, I just edited your question.

  • @cat, ok, I’m already used to it, so much so that I have other options that I started using more due to this, is already getting exhausting using the forum

  • 1

    What was the original value, which after formatted, generated the cited result?

  • @Andersoncarloswoss, adjusted the question

  • So what you need to do is remove the asterisk at the end and put in simple quotes?

  • @Andersoncarloswoss, I wish it had single quotes two two sides, I put * because this way Excel can not change the format of the field

  • @Andersoncarloswoss, I found the solution, but thank you for your help

Show 3 more comments

1 answer

0


The solution to the problem:

select  ''''|| nvl(nf.chave, '-')||''''  from NF nf

This way I get the result:

'51160307053693005199550510000032181665018130'

Browser other questions tagged

You are not signed in. Login or sign up in order to post.