Created
October 30, 2014 16:07
-
-
Save swaters86/0da9b6efea7450a0ef48 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set nocount on | |
| declare @ASite varchar(2) | |
| select * | |
| from web.dbo.profile (nolock) | |
| where Avis='zz' and profile_id=1030377 | |
| declare sitecodes cursor scroll for | |
| select avis from web.dbo.siteinfo (nolock) | |
| open sitecodes | |
| fetch first from sitecodes into @ASite | |
| while @@fetch_status = 0 | |
| begin | |
| print 'Inserted Convenience Profile ID for site: ' + @ASite | |
| insert into | |
| webextras.dbo.Profile_ExtraFields (Avis,ProfileID,Varname,VarValue) | |
| values (@ASite,1030377,'ActualAPProfile','1030377') | |
| fetch next from sitecodes into @asite | |
| end | |
| close sitecodes | |
| deallocate sitecodes | |
| set nocount off |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment