MTSkibum
Starting Member
1 Posts |
Posted - 12/03/2012 : 16:13:31
|
For ease of reading I am just going to post the select statement.
I have a sql that works just fine:
SELECT DISTINCT org.organization, epi.item, (NVL(net.xx_net_need, 0) * NVL(net.xx_conso_cost, 0)) Net_Need, (NVL(net.proj_on_hand, 0) * NVL(net.xx_conso_cost, 0)) Projected_on_hand, net.sales_date FROM ..............
;
The problem is when i try to turn the date into a month or month/year.
This does not work:
SELECT DISTINCT org.organization, epi.item, (NVL(net.xx_net_need, 0) * NVL(net.xx_conso_cost, 0)) Net_Need, (NVL(net.proj_on_hand, 0) * NVL(net.xx_conso_cost, 0)) Projected_on_hand, month(net.sales_date)
This does not work either:
SELECT DISTINCT org.organization, epi.item, (NVL(net.xx_net_need, 0) * NVL(net.xx_conso_cost, 0)) Net_Need, (NVL(net.proj_on_hand, 0) * NVL(net.xx_conso_cost, 0)) Projected_on_hand, DATEPART(mm,net.sales_date)
I have verified that I am working with a date.
COLUMN_NAME DATA_TYPE NULLABLE
SALES_DATE DATE No |
Edited by - MTSkibum on 12/03/2012 16:19:03
|
|