﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / SQL Server Newbies  / Barcodes Code128 generator function / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Wed, 19 Jun 2013 17:16:23 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Barcodes Code128 generator function</title><link>http://www.sqlservercentral.com/Forums/Topic1062489-1291-1.aspx</link><description>Thanks Lowell, but it doesn't seem to be the same standard I'm referring to.In standard Code128, if you code 'bananas', you'll get ÑbananasÈÓ (it always starts with capital Ñ and ends with Ó).Pass 'bananas' to this function and you'll get 'š' and a weird character in the end... they must be pretty similar standards, but not equal.</description><pubDate>Fri, 11 Feb 2011 07:29:41 GMT</pubDate><dc:creator>a_ud</dc:creator></item><item><title>RE: Barcodes Code128 generator function</title><link>http://www.sqlservercentral.com/Forums/Topic1062489-1291-1.aspx</link><description>a quick google lead me to this solution posted from Dalton from [b][url]http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=70901[/url][/b][code]declare @myString varchar(255)select @myString = 'BarCode 1'-- Define the string of characters that we'll need to pull the reference ofdeclare @asciiString varchar(255)select @asciiString = ' !"#$%&amp;''()*+,-./0123456789:;&amp;lt;=&amp;gt;?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~'select @asciiString = @asciiString + char(195) -- 0xC3select @asciiString = @asciiString + char(196) -- 0xC4select @asciiString = @asciiString + char(197) -- 0xC5select @asciiString = @asciiString + char(198) -- 0xC6select @asciiString = @asciiString + char(199) -- 0xC7select @asciiString = @asciiString + char(200) -- 0xC8select @asciiString = @asciiString + char(201) -- 0xC9select @asciiString = @asciiString + char(202) -- 0xCA-- Define the stop and start charactersdeclare @stopchar char(1)declare @startchar char(1)declare @spacechar char(1)select @stopchar = char(206) -- 0xCEselect @startchar = char(204) -- 0xCCselect @spacechar = char(194) -- 0xC2-- Define the final holding place of our output stringdeclare @finalArray varchar(255)-- Define the variables that we'll need to be usingdeclare @checksumTotal intdeclare @checksum intselect @checksumTotal = 104;select @checksum = 0;-- Start building our outputselect @finalArray = @startchar-- Loop through our input variable and start pulling out stuffdeclare @position intdeclare @thisChar char(1)select @position = 1while @position &amp;lt;= len(@myString)begin	select @thisChar = substring(@myString, @position, 1)	select @checksumTotal = @checksumTotal + (@position * (ascii(@thischar)-32))	select @finalArray = @finalArray + @thisChar	select @position = @position + 1end -- We've gone past the length now-- Now we need to figure out and add the checksum characterselect @checksum = @checksumTotal % 103if @checksum = 0	select @finalArray = @finalArray + @spacecharelse	-- Barcorde array assumes 0 as initial offset so we need to add 1 to checksum	select @finalArray = @finalArray + substring(@asciiString, @checksum+1, 1)-- Now we append the stop characterselect @finalArray = @finalArray + @stopchar-- The @final Array represents the barcode encoded stringselect @finalArray[/code]</description><pubDate>Fri, 11 Feb 2011 06:12:08 GMT</pubDate><dc:creator>Lowell</dc:creator></item><item><title>Barcodes Code128 generator function</title><link>http://www.sqlservercentral.com/Forums/Topic1062489-1291-1.aspx</link><description>I'm looking for a [b]barcode generating Function[/b] (in SQL 2005), that uses the standard [u]Code128[/u].  The result of calling the function will then be mailmerged in Word in a document with font Code128.TTF (this shows the barcode as such).Now, the problem is that I have the correct function in Access (code attached in TXT) but not in SQL Server.Does anyone have the equivalent SQL Server function (or knows how to translate this Access into SS) ?Thanks in advance,     a.</description><pubDate>Fri, 11 Feb 2011 05:32:29 GMT</pubDate><dc:creator>a_ud</dc:creator></item></channel></rss>