Note that there are some explanatory texts on larger screens.

plurals
  1. POGetting the sum of a specific row
    primarykey
    data
    text
    <p>I have a maintenance table named <code>ticket</code> table and a transaction table called <code>workplan</code>.</p> <p>Ticket table contains <code>tickedID</code>, <code>ticketName</code>, <code>startdate</code>,<code>estimated time of completion</code> and <code>total number of hours</code> columns.</p> <p>And then <code>workplan</code> table has <code>workplanID</code>, <code>ticketID(foreignkey)</code>, <code>currentdate</code> , <code>ticket name</code>, <code>no of hours</code>, and <code>hours remained</code> columns.</p> <p>For instance:</p> <p>I have ticket entry as shown below.</p> <pre><code>ticket ID / ticket name / start date / estimated time of c. /total number of hours 1 /sample name / 05.21.2013 / 05.23.2013 / 21hours </code></pre> <p>and the next table represents the <code>workplan</code>.</p> <pre><code>workplanID / ticket ID / currentdate / ticket name / no of hours / hours remained 1001 /1 / may.21.2013 /sample name /3 /18 </code></pre> <p>...<code>Workplan ID is autogenerated.</code></p> <p>If the user manage his/her workplan. The current date will automatically derived. The user will input his/her no of hours.</p> <p>My question is how can i get the difference between the total number of hours from the ticket table and the hours remained in the workplan table?</p> <p>so if the user has managed his workplan again the next day,</p> <pre><code>workplanID / ticket ID / currentdate / ticket name / no of hours / hours remained 1001 /1 / may.21.2013 /sample name /3 /18 1002 /1 / may.22.2013 /sample name /4 /14 </code></pre> <p>Im using vb.net and sqlserver as my backend.</p> <p>(binding source)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload