!Clarion Select Class !(c) 2004 Carlos Gutierrez / SCA (Sistemas de Computación Accesibles del Noroeste, S.C.) !This source code can be freely used, as long as it's not used to create non-free !Clarion 3rd.Party accesories/templates. A small class which allows to write code like this in Clarion: D.INIT(DUMMY) D.SELECT('C.CategoryName AS CATEGORY',| 'P.ProductName AS PRODUCT'... D.FROM('Categories C INNER JOIN Products P ON C.CategoryID = P.CategoryID .... D.WHERE('O.ShippedDate Between ''19970101'' AND ''19971231''') D.GROUPBY('C.CategoryName, P.ProductName') D.ORDERBY D.GO LOOP D.NEXT IF ERRORCODE() THEN BREAK. STOP(D.C('PRODUCT')&D.C('Sales')) D.DEEP(QRY) STOP(QRY.CATEGORY&' '&QRY.SALES) Features: - Easy to convert QA queries to clarion - Converts SQL dates to Clarion Dates - Columns available by column name D.COL('ColumnName') - Query Result can be assigned to a group or queue D.DEEP(GroupName) To Do: - D.HAVING - A method to return the number of rows in the query Installation: Copy cselect.clw and cselect.inc to X:\CLARIONX\LIBSRC\ Usage: In Global Data Section: INCLUDE('CSELECT.INC'),ONCE In your procedure's Data Section: D cSELECT In your Code, see example above or included DSELECT.APP In your dictionary, a dummy table with 12 columns linked to a string colum. See DSELECT.DCT DESELECT.APP Is an example using the NorthWind Database. Tested with Clarion 5.5 and 6.1 Carlos Gutierrez carlosg@sca.com.mx