-
top urgent, i need help
hi for all programmers, please i was made sql project but a am faced many problems the problims is (i have table contens of 3 rows credit,debit,total) i want the row of total show the result of credit-debit so i was wrote this query (select credit,debit,(credit)-(debit) as total.
this code was succsess to show the result, but i want to make this row show automaticly this function and contain this function not wrtite this code every time whene i want it.
please answer me A.S.A.P
regards
-
Do you use sql server? Can you post table schema, sample data and expected result?
-
ALTER TABLE myschema.mytable ADD total AS (ISNULL(credit, 0) - ISNULL(debit,0))
--HTH--
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|