Re: Problem with prepare
Posted in 1998
Pretty basic stuff ... If you're going to use the column more than once in a select, you need to assign it an alias. Ex: PREPARE queryXYZ FROM 'select columnA, columnB, columnA newcolumn from testtable' Where newcolumn is the alias for columnA. Now all further references need to be made to newcolumn instead of columnA for this field. Nick Dirk Niemeier <dirk.niemeier@stueken.de> wrote in article <34D05826.B1DADDCD@stueken.de>... > Hello, > I have a problem with a select-statement in ESQL-C and SE which only > appears together with a prepare-Statement. It's very simple : I have to > select a column two times in one select-Statement, as usual. > > PREPARE queryXYZ FROM 'select columnA, columnB, columnA from testtable' > > this statement generates an Error -324 (Ambiguous column-name)! > Why ? Execute the select in isql separat gets no problem. > > Best regards > Dirk Niemeier > > >