Add SQL base to a letter

Asked

Viewed 84 times

0

Good afternoon!

In a database I have two tables. A so-called Accounts, where you have for example a column of accounts 1(Active), 1111(Cash), 1112(Banks), 1113(Receipts).

Another table called Values where has the value of the accounts, but this table has only values of the accounts with 4 digits. Ex: 1111(Box).

I need to make the sum of all accounts that the first character is "1", thus obtaining the value of account 1 (Asset).

Thank you very much in advance.

  • 1

    What did you try?

  • In the table of accounts does not have a field indicating the nature of the account ( asset , liability or result) ? It would be more "clean" a Join and treat this field .

  • Good afternoon! I managed to solve, I created relationships between the tables and the values adjusted automatically. Thank you very much

No answers

Browser other questions tagged

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