markSaunders
Programmer
Hi,
I currently have a process that involves
[ul][li]importing from Excel to Access[/li]
[li]run several queries to reformat the imported table into a structured db format (e.g. x=category x.x=topic x.x.x=subtopic)[/li]
[li]run a DTS package to copy from Access to SQL[/li][/ul]
The main process involved in the queries is parsing the ID field according to the number of points it contains (see bold above)
I've included examples of the main queries
appending to the category:
appending to the topic
appending to the subtopic
Mark Saunders 
I currently have a process that involves
[ul][li]importing from Excel to Access[/li]
[li]run several queries to reformat the imported table into a structured db format (e.g. x=category x.x=topic x.x.x=subtopic)[/li]
[li]run a DTS package to copy from Access to SQL[/li][/ul]
The main process involved in the queries is parsing the ID field according to the number of points it contains (see bold above)
I've included examples of the main queries
appending to the category:
Code:
INSERT INTO Tbl_Category ( Id, Description )
SELECT CLng([ClassId]) AS NewId, Tbl_import.ClassDesc
FROM Tbl_import
WHERE (((InStr([ClassId],"."))=0));
appending to the topic
Code:
INSERT INTO Tbl_Topic ( Description )
SELECT DISTINCT Tbl_Import.ClassDesc
FROM Tbl_Import
WHERE (((IsNumeric([classId]))=True) AND ((InStr([ClassId],"."))>0))
ORDER BY Tbl_Import.ClassDesc;
appending to the subtopic
Code:
INSERT INTO Tbl_SubTopic ( Description )
SELECT DISTINCT Tbl_Import.ClassDesc
FROM Tbl_Import
WHERE (((IsNumeric([classId]))=False))
ORDER BY Tbl_Import.ClassDesc;