Ulrike Best way to do this is to build up a string, having retrieved the names of your columns, and then use Run Command to execute it
eg Run Command "Select * from table_X Where " & attribut_1 & " <> " & attribut_2 & " into new " - or you could dimension attribut_1 & attribut_2 as alias (instead of string). HTH Paul Crisp Syntegra Innovation Place Delta Bank Road Newcastle NE11 9DJ Tel 0191 461 4522 Fax 0191 460 1987 -----Original Message----- From: Witte, Ulrike [mailto:[EMAIL PROTECTED] Sent: 18 March 2003 10:56 To: '[EMAIL PROTECTED]' Subject: MI-L variables in a select statement Hello List, is there a way to use variables in a select statement ? I have got a table with polylines and want to choose some of them according to their attached attributes. The user chooses at runtime which colum names are relevant by ticking a checkbox. According to the choosen checkbox different colum names are assigned to the variables attribut_1 and attribut_2. When I print the value of attribut_1 and attribut_2 I can see that the right colum name has been assigned to the variable but I can�t use it in the select statement Select * from table_X Where attribut_1 <> attribut_2 into new Is there a way to keep the Select statement variable or do I have to state this select statement several times, embedded in an if statement, for every possible value attribut_1 and attribut_2 can get ? Thanks for any help Mit freundlichen Gr��en microm Micromarketing-Systeme und Consult GmbH Ulrike Witte Hellersbergstr. 14 41460 Neuss Phone: 02131-10 97 51 Fax: 02131-10 97 77 mailto:[EMAIL PROTECTED] ____________________________________________________________________________ __ Diese Nachricht wurde elektronisch versandt und ist daher auch ohne Unterschrift rechtsg�ltig. Der Inhalt dieser E-Mail enth�lt vertrauliche Informationen. Das Kopieren und die Weitergabe an Dritte ist nicht gestattet. Sollten Sie diese E-Mail irrt�mlich von uns erhalten haben, bitten wir Sie, diese zu vernichten und uns dar�ber zu informieren. Im Voraus vielen Dank. ____________________________________________________________________________ ____ --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 5989 ******************************************************************** This email may contain information which is privileged or confidential. If you are not the intended recipient of this email, please notify the sender immediately and delete it without reading, copying, storing, forwarding or disclosing its contents to any other person Thank you Check us out at http://www.syntegra.com ********************************************************************
