Ceriwis

Ceriwis (https://forum.ceriwis.com/forum.php)
-   Programming (https://forum.ceriwis.com/forumdisplay.php?f=63)
-   -   [ask]sql query (https://forum.ceriwis.com/showthread.php?t=573122)

SinggahDapur 20th November 2011 01:19 AM

[ask]sql query
 

gan,misalny gua punya query keq gini..



SELECT abc,cde, 'jumlah' = CASE WHEN abc is null then 0 else (qty1-qty2) end



trus misalny gua mau tambahin 1 kolom lagi, misalny namany "total".

total = jumlah + cde



gua coba keq gini tp kolom jumlah invalid katanya

SELECT abc,cde, 'jumlah' = CASE WHEN abc is null then 0 else (qty1-qty2) end, (jumlah+cde) as total





gimana yah carany?

thanks

</div>


All times are GMT +7. The time now is 12:49 PM.