AW: convert database entrys
Florian Bogeschdorfer
fb at memedia.de
Mon Nov 24 11:07:23 CST 2003
> -----Ursprüngliche Nachricht-----
> Von: valentina-bounces at lists.macserve.net
> [mailto:valentina-bounces at lists.macserve.net] Im Auftrag von
> Jonathan Fiagbedzi
> Gesendet: Montag, 24. November 2003 10:25
> An: Valentina Developers
> Betreff: Re: convert database entrys
>
> > tblDetail TblDetailKind tblCar
> > Wheel Tire BMW
> > Window Rim Audi
> > Front
> >
> >
> >
> > And now you need have 4th table that link all 3 tables:
> >
> >
> > tblLink { ptrCar, preDetail, ptrKind, }
> >
> > 1 1 1
> > 1 1 2
> > 1 2 3
> > - 2 1 1
> > 2 1 2
> > 2 2 3
>
>
> I see that this is a better solution.
> But it is very hard for me finding the right way to create
> that database structure aut of my .csv file.
But this is a lingo problem. Infact you will need to write your own csv
import routine. I can give you a start if you want with this.
> In the table "tblLink" i have now numeric repetitions. Isnt
> it the same problem only with numbers?
>
> How do i now search for an product which is in "BMW; Wheel;
> Tire" for example and i only know that the user has clicked
> on the path BMW\Wheel\Tire?
Again, this is lingo. You'll need to extract BMW, WHEEL and TIRE from that
string (look at the itemDelimiter from Director)
> And how i mark that product in his Table that it is an
> Product of "BMW; Wheel; Tire"?
Jonathan, I think no matter if you use one or more tables. If you want to
show BMW/WHEEL/TIRE,FELGE,WHATEVER and AUDI/WINDOW/FRONT,REAR,WHATEVER you
will need to do more than one SELECT command, e.g.
SELECT detail FROM myTABLE WHERE car=BMW AND part=TIRE
Then put this in your display.
Then SELECT detail FROM myTABLE WHERE car=AUDI AND part=TIRE
...
Or is there a neater SQL syntax, Ruslan?
Best regards, Florian
More information about the Valentina
mailing list