On the Microsoft Dynamics GP Community site a question from Lisa Sorenson in October last year asking if it was possible to use the Table Import ( ) feature in Microsoft Dynamics GP to update some Segment descriptions has risen to the top with Steve Cummings linking to a post where the suggestion is to use a CSV file and Word template to generate a mailmerge.
This solution will work, but can be accomplished in much less time and effort by using the SQL command BULK INSERT to load the CSV (formatted as Segment ID, Segment Number and Description), in the below SQL change the highlighted path to the location of your CSV file, into a temporary table and update Account Segment Master (GL40200) from the temp table (which is removed at the end of the script);
CREATE TABLE #SegmentDescriptions
(FIELDTERMINATOR = ','
,ROWTERMINATOR = '\n')
Segments.SGMTNUMB = NewSegments.SGMTNUMB
,Segments.SGMNTID = NewSegments.SGMNTID
,Segments.DSCRIPTN = Left(NewSegments.DSCRIPTN, 31)
GL40200 AS Segments
#SegmentDescriptions AS NewSegments ON NewSegments.SGMTNUMB = Segments.SGMTNUMB
AND NewSegments.SGMNTID = Segments.SGMNTID
DROP TABLE #SegmentDescriptions
The above script is supplied as is with no warranty; if you use the script please ensure you have a backup of your company database before starting.