Here is the working one, here its take the value "Tim" from same table wich is "kostnader" but i want to take the "Tim" value from another table.
Working code
Expand|Select|Wrap|Line Numbers
- SQL = "SELECT projekt.projekt, projekt.id, projekt.lock, (SELECT COUNT(ID) FROM kostnader WHERE kostnader.personal_id = "& session("id") &" AND kostnader.projekt_id = projekt.id) AS antal, (SELECT SUM(varde) FROM kostnader WHERE kostnader.projekt_id = projekt.id AND kostnader.personal_id = "& session("id") &" AND kostnader.enhettim = 'Tim') AS antaltim FROM projekt "
Instead of kostnader.enhettim = 'Tim' i have this to get the value from another table priskategori.enhet = 'Tim'
The table priskategori and colum enhet dose exist so dont get this-.
The error iam haveing is this.
* No value given for one or more required parameters.