Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Ektron Find Replace In UrlAliasManual

Posted on October 23, 2013October 26, 2015 By David Kittell

This script will rename manual aliases

set xact_abort on

declare @currval nvarchar(500)
declare @newval nvarchar(500)
declare @search nvarchar(500)
declare @replace varchar(500)

set @search = '/Index' --string to find
set @replace = '/Default' --replacement string

declare @pos int
declare @id bigint

begin tran

declare curs cursor local fast_forward
for
	select AliasId,AliasName
	from UrlAliasManual_Tbl
	where AliasName like '%' + @search +'%'
open curs
fetch next from curs into @id, @currval
while @@fetch_status = 0
begin
	--print 'Url before update=' + @currval
	Set @newval = replace(@currval,@search,@replace)

	Update UrlAliasManual_Tbl Set AliasName = @newval
	where AliasId = @id

	print 'Value after update=' + @newval

	fetch next from curs into @id, @currval
end

close curs
deallocate curs

--rollback tran
commit tran

Source: http://www.skonet.com/Articles_Archive/Helpful_Sql_Scripts_for_Ektron_CMS_400_Net.aspx

Originally Posted on October 23, 2013
Last Updated on October 26, 2015
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code Ektron MSSQL MSSQL - Ektron MSSQL - Ektron 8.0.2 SQL

Post navigation

Previous post
Next post

Related Posts

MySQL – Table/View Column Information

Posted on March 1, 2014October 26, 2015

Similar to MSSQL – Table/View Column Information, this post will help with MySQL tables and columns. This query is a quick query to give you the pertinent information about a specific table. DESCRIBE <Table Name>; select * from `information_schema`.`columns` WHERE table_name = ‘<Table Name>’; SELECT table_name, Replace(GROUP_CONCAT(CONCAT(column_name, ‘, ‘, table_name)),CONCAT(‘,…

Read More

UNIX – Extract RedHat/CentOS/Fedora RPM File

Posted on April 21, 2016April 21, 2016

I love to find RPM files that someone has compiled so that I don’t have to do the manual work but when I find one at a questionable location or one I’m simply not familiar with it’s nice to know what is in it. Recently I did a search on…

Read More

Get Character Count From Text Field

Posted on April 9, 2013October 26, 2015

SELECT DATALENGTH(yourtextfield) AS TEXTFieldSize SELECT MAX(DATALENGTH(yourtextfield)) AS TEXTFieldSize Originally Posted on April 9, 2013Last Updated on October 26, 2015 All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • PowerShell - IIS Remove Site
  • SQLite - Auto-Increment / Auto Generate GUID
  • PowerShell - FTP Upload Directory With Sub-Directories

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • PowerShell - IIS Remove Site
  • SQLite - Auto-Increment / Auto Generate GUID
  • PowerShell - FTP Upload Directory With Sub-Directories
  • Raspberry Pi - Remove Default Apps
  • PowerShell - Change Windows CD/DVD Drive Letter
©2025 David Kittell | WordPress Theme by SuperbThemes