0

I want to convert a formula from Excel to a query SQL: I want to find every line in a table that has a column B calculated with a formula in Excel.

table X has 2 columns: Column A and Column B The formula to calculate Column B in Excel using Column A is like this :

Column B = CONCATENER("FR";(TEXTE((MOD((12 + 3*MOD((Column A);97));97));"00"));TEXTE(Column A;"000000000")))

So basically, the query in excel will be like this:

Select * from X where Column B = **Query SQL using the Excel Formula** (Column A)

2 Answers 2

1

Instead of complete answer, let me give you some hints:

0

I found the answer :

column B  = ( 'FR'
  || TO_CHAR(mod(12 + 3 * mod(Column A, 97), 97))
  || TO_CHAR(Column A)
1
  • 1
    consider using explicit format in the TO_CHAR function, e.g. TO_CHAR(Column_A, 'fm000000000') Commented Aug 10, 2021 at 15:03

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.