Hi,
i have to do a view but i have problem with query its all about asset.
i have table with data as below, table name is assetaable ofc i`ve got about 10k rows in table
ASSETID NAMEALIAS ACQUISITIONDATE_W ACQUISITIONPRICE_W
GR4-0008184 Zamknięty 2008-03-06 00:00:00.000 2873.920000000000
GR4-0009001 Zamknięty 2008-12-31 00:00:00.000 2963.000000000000
GR4-0010100 Zamknięty 2005-08-18 00:00:00.000 835.250000000000
GR4-0008184 Otwarte 2008-03-06 00:00:00.000 2873.920000000000
GR4-0009001 Otwarte 2008-12-31 00:00:00.000 2963.000000000000
What i need to do is a view with this data and new column as "currently value".Depreciation is 40 month so if i good think takeACQUISITIONPRICE_w /40= "xxxxxx" its price that should be deduct every month. Then takeACQUISITIONDATE_w and every new month deduct (ACQUISITIONPRICE_w /40= "xxxxxx") and "namealiast" shoul be only 'otwarte'... so easy to say but i have no clue how i can do this