Hey
I'm building this custom-script to be able to import products and groups from an external xml-file.
First of all I'm looping my XML-file for productgroups. For each group I check whether the group exists or not. If not, I create the group. Now this is the problem.
All the groups ind the ProductGroups table has a column called GroupID. This is NOT autoincrement - so how do I figure out, what GroupID to insert?
Normally I'd fetch the 'newest' row like GROUP13 and make my GROUP14 out of it - just ordering by GroupID. But in SQL GROUP10 is sorted before GROUP9.
Because of this, this doesn't work:
select top 1 GroupID from EcomGroups
Any suggestions?
/ Bo Dudek