Skip to Content
Jul 24, 2013 at 01:19 PM

Simple Query on Sales Quotes


Hello Experts,

I am trying to create a simple query on sales quotes. Each of our sales quotes have multiple detail lines (QUT1 table). I need to extract some data from the first raw that appear on the detail line. I can not say show me "Where T1.linenum < 1" because sometimes rows get deleted so the number do not start at zeor. Any idea how I can solve this issue. Here is the example of my query:

SELECT T0.[DocNum], T0.[DocDueDate], T0.[CardName], T0.[NumAtCard], T1.[U_WordCount] FROM OQUT T0 Left JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry WHERE T0.[DocDueDate] between [%0] and [%1]

Thank You.

Abdul Ranginwala