Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
IOU
CREATE TABLE Debts ( InitialDebt DECIMAL(6,2), InitialDate DATETIME, CurrentDate DATETIME, Interest DECIMAL(6,2) ) INSERT Debts (InitialDebt, InitialDate, CurrentDate, Interest) SELECT 33, '09/06/2019', GETDATE(), 10 ALTER TABLE dbo.Debts ADD CalculateDebt AS (InitialDebt + (InitialDebt*Interest/100/DAY(EOMONTH(GETDATE()))) * DATEDIFF(DD, InitialDate, CurrentDate)) SELECT InitialDebt, InitialDate, CurrentDate, DATEDIFF(DD, InitialDate, CurrentDate) AS PayableDays, Interest, DAY(EOMONTH(GETDATE())) AS DaysInMonth, CAST(CalculateDebt AS DECIMAL(6,2)) AS PayToCreditor FROM Debts
run
|
edit
|
history
|
help
0
my sql2
Sql Server sys.syslanguages
Libros
1D Hotel
/Users/svetlanakanevskaa/Downloads/ACDB_LIGHT_MS.sql
SQL SERVER 2012 how to split records in a column separated by delimiter
Solution 1
Rno 37 boat 2
QLCB_CSDL
Preppin Data Challenge - Week 7