PDA

View Full Version : TechTip: Access Packed Data in "Flat Files" with a Table Function

Guest.Visitor
12-31-1969, 06:33 PM
** This thread discusses the article: TechTip: Access Packed Data in "Flat Files" with a Table Function (http://www.mcpressonline.com/index.php?option=com_content&view=article&id=2226) **
Hi Britta Replace IF Dec = 0 Then Set Data = Char(Decimal(Data,30,0)*Sign); ELSEIF Dec = 1 Then Set Data = Char(Decimal(Decimal(Data)/10,30,1)*Sign); ELSEIF Dec = 2 Then Set Data = Char(Decimal(Decimal(Data)/100,30,2)*Sign); ELSEIF Dec = 3 Then Set Data = Char(Decimal(Decimal(Data)/1000,30,3)*Sign); ELSEIF Dec = 4 Then Set Data = Char(Decimal(Decimal(Data)/10000,30,4)*Sign); ELSEIF Dec = 5 Then Set Data = Char(Decimal(Decimal(Data)/100000,30,5)*Sign); ELSE Set Data = Char(Decimal(Decimal(Data)/1000000,30,6)*Sign); END IF; with Set Data = Char(Decimal(Decimal(Data)/10**Dec,30,6)*Sign); Sincerely Andreas

Guest.Visitor
12-31-1969, 06:33 PM
** This thread discusses the article: TechTip: Access Packed Data in "Flat Files" with a Table Function (http://www.mcpressonline.com/index.php?option=com_content&view=article&id=2226) **
Of course it should be: Set Data = Char(Decimal(Decimal(Data)/10**Dec,30,Dec)*Sign); Andreas

MCWebsite.Staff
12-31-1969, 06:33 PM
** This thread discusses the article: TechTip: Access Packed Data in "Flat Files" with a Table Function (http://www.mcpressonline.com/index.php?option=com_content&view=article&id=2226) **
** This thread discusses the Content article: TechTip: Access Packed Data in "Flat Files" with a Table Function (http://www.mcpressonline.com/index.php?option=com_content&view=article&id=2226) **
0