convert database entrys
Tschoatscho Kettl
ich at medienzar.de
Mon Nov 24 11:43:09 CST 2003
Hi Jonathan,
>But it is very hard for me finding the right way to create that database
>structure aut of my .csv file.
Create a temporary table for importASCII.
Then repeat with every record in that table checking for "new" (yet
unknown in your final database) values in the different fields. Best
way is to write a handler that takes a table name and a
corresponding value for that field as parameters and return the recID
of the record matching your value. Therefore you create a dbCursor
using
"SELECT recID, <tableName> FROM <tableName> WHERE <tableName> = <value>"
If dbCursor's record count is zero (new value for that field) than
add a new record with this value.
>In the table "tblLink" i have now numeric repetitions. Isnt it the same
>problem only with numbers?
No, numbers are much faster to process than strings and take less
space in database.
>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?
Use the itemDelimiter.
>And how i mark that product in his Table that it is an Product of "BMW;
>Wheel; Tire"?
SELECT * FROM product WHERE car = 'BMW' AND part = 'Wheel' AND detail = 'Tire'
--
Greets Tsch.
---------->
on stopMovie
mRemember gRealLife
updateStage
no end
More information about the Valentina
mailing list