Tech blog

Friday, September 30, 2005

SQL Function to convert Guids to Oracle format

--Function to convert SQL Server (Windows) guid to Oracle guids
create function dbo.ConvertGuids(@id as uniqueidentifier)
returns varchar(32)
as
begin
declare @str varchar(36),@res varchar(32)
set @str=replace(convert(varchar(36),@id),'-','')
set @res=substring(@str,7,2)+substring(@str,5,2)+substring(@str,3,2)+substring(@str,1,2)+
substring(@str,11,2)+substring(@str,9,2)+substring(@str,15,2)+substring(@str,13,2)+
substring(@str,17,100)
return (@res)
end

====================================
To generate a new GUID in SQL*Plus:
select SYS_GUID() from dual;

Friday, September 23, 2005

VS.NET 2003, VSS 6.0d and the "Refreshing the project failed. Unable to retrieve folder information from the server" error

To fix this annoying error, delete this folder:
C:\Documents and Settings\kharris.DEVSCHOOLNET\VSWebCache\