CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 Error in JoinTab Field Propertie Window

Print topic Send  topic

Author Message
Peter roth
Posted: 03/05/2001, 1:17 AM

Hi all...

I get an error when I define a Join within the Join-Tab in
Field Properties window.

table:
categories
categorie_id
parent_catid
categorie_desc

grid-form:
field 1: categorie_id
url with link to the edit form
field 2: categorie_desc
label
field 3: parent_catid
label with the join to the categories table primKey=categorie_id
showing=category_desc

I get an error like this:

----begin-----
Database error: Invalid SQL: select c.category_desc as c_category_desc,
c.category_id as c_category_id, c.parent_catid as c_parent_catid,
c1.category_id as c1_category_id, c1.category_desc as c1_category_desc from
categories as c, categories as c where c.category_id=c.parent_catid order by
c.category_id Asc
MySQL Error: 1066 (Keine eindeutige(n) Tabelle/Alias: 'c')
Session halted.
----end

What happens now is: as I select again the categories table as a lookup CC
generates an alias for both tables. And in this
case the alias was create as a "c". This creates the error because the alias
isnt unique.

The solution can be: CC has to create aliases with a number as suffix e. g.
..... from categories as c1, categories as c2. With
this the alias will be unique and no error occurse.

As an enhancement to the join tab. It should be very helpful to define
additional where clause. Or to provide a textbox
to define the sql - statement itself. This field can be placed in addition
to the "List Of Valus"-Textfield


Kind Regards and I looking forward for any feedback

Peter Roth
software solutions, switzerland

Alexey Alexapolsky
Posted: 03/05/2001, 7:59 AM

Peter,

Please tell me what codecharge pattern you're using
for this example.

--
Regards,
Alexey
CodeCharge Support


Peter roth <proth@softsol.ch> wrote in message
news:97fnoi$mhb$1@mail.tankhill.com...
> Hi all...
>
> I get an error when I define a Join within the Join-Tab in
> Field Properties window.
>
> table:
> categories
> categorie_id
> parent_catid
> categorie_desc
>
> grid-form:
> field 1: categorie_id
> url with link to the edit form
> field 2: categorie_desc
> label
> field 3: parent_catid
> label with the join to the categories table primKey=categorie_id
> showing=category_desc
>
> I get an error like this:
>
> ----begin-----
> Database error: Invalid SQL: select c.category_desc as c_category_desc,
> c.category_id as c_category_id, c.parent_catid as c_parent_catid,
> c1.category_id as c1_category_id, c1.category_desc as c1_category_desc
from
> categories as c, categories as c where c.category_id=c.parent_catid order
by
> c.category_id Asc
> MySQL Error: 1066 (Keine eindeutige(n) Tabelle/Alias: 'c')
> Session halted.
> ----end
>
> What happens now is: as I select again the categories table as a lookup CC
> generates an alias for both tables. And in this
> case the alias was create as a "c". This creates the error because the
alias
> isnt unique.
>
> The solution can be: CC has to create aliases with a number as suffix e.
g.
> .... from categories as c1, categories as c2. With
> this the alias will be unique and no error occurse.
>
> As an enhancement to the join tab. It should be very helpful to define
> additional where clause. Or to provide a textbox
> to define the sql - statement itself. This field can be placed in addition
> to the "List Of Valus"-Textfield
>
>
> Kind Regards and I looking forward for any feedback
>
> Peter Roth
> software solutions, switzerland
>
>


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.