What's on your Ctrl+V?

Code:
the Well Planning and Cost Est. reports are designed to display the Rig Name/No. (one or the other depending on whether a name or number has been assigned to the rig, pulled through from the Contractors tab as shown below)

There is no field in the Well Planning and Cost Est reports for Contractor Name, unlike the Daily Ops reports which are designed to display the Contractor Name but not the Rig Name/No.

exciting stuff!
 
Looks like my clipboard is empty :eek:

Rebooted yesterday (which is unusual in itself, I usually just lock my work machine and turn the monitor off. It's very rare I even log off yet alone restart it) so presumably I've not copy/pasted anything since which is quite surprising.
 
nstalling
1) If you haven't already, perform a Full Install of BG1. This could mean BG1, BG1 plus TotSC, or BG: The Original Saga, depending on what you've bought. If you have the 6 CD set of BG1 (or 5, without the expansion), this means you should choose "custom install" and select everything. Even movies.
2) Apply the BG1 patch from Bioware only if you do not have BG: The Original Saga.
3) If you haven't already, perform a Recommended or Full install of BG2. Throne of Bhaal is supported but not required.
4) Depending on what you have installed, apply the BG2 patch or ToB Patch from Bioware.
5) Extract bg1tutu_v(x).exe to your BGII directory. (Where x is the version number you’ve downloaded.)
6) Using a text editor like wordpad (don't use notepad, it's very confusing), PFE, ConTEXT, etc., go to your bg1tutu folder and open up the file named "configuration". You need to edit the two lines named ~source~ and ~target~. If you installation of BG1 was at C:gamesBG1 and your BG2 installation was in C:gamesBGII, your configuration file should wind up looking like this:

~source~ [ ~C:gamesBG1 ~]

~source.variant~ [ ~BG1~ ]

~target~ [ ~C:gamesBGII~ ]

~target.variant~ [ ~BG2~ ]

*Note that the path is case sensitive. Capital and lower-case letters matter.
7) If you haven’t installed TotSC, download the file http://home.arcor.de/varana/RNDEQUIP.2DA into your bg1tutubg1-override folder.
8) Install any BG1 mods/upgrades that you will want to use in your BG1 directory.
Note: Most minor BG1 mods should convert correctly. DSotSC does not.
9) Run both BG1 and BG2 once, if you've just installed them. This will populate their configuration (baldur.ini) files, which Tutu requires.
10) Double-click bg1tutu.exe (it will be in your BGII directory) and let it run.
11) Just follow along after this and make whichever choices you wish.
12) Once BG1Tutu has finished installing, you should download and run Tutufix. It is absolutely required that you install at least the Core Bugfixes component.
13) After Tutufix has been installed, you should install any mods specifically tailored for Tutu. See the BG1Tutu Enhancements page for a list.
14) If you want BG music, copy BG’s music folder into your BGII directory. (Make sure to rename BGII’s music folder to something else first so that you don’t overwrite BGII’s music.)
15) If you want to retain BG1's stone interface, check out LadeJarl's Tutu GUI mod on the Tutu Enhancements Page.
16) Play BG1Tutu by running “bgmain.exe” in your BG2 folder. It may prompt you for your BG2 CD.
17) Have fun, you made it!


Oops. Bit long, i'm currently undergoing the process of reinstalling Baldur's Gate :D
 
Code:
ALTER PROCEDURE [dbo].[sp_dbutil_CopyWACompProcdure] @compid varchar(20), @facid varchar(20), @compTo varchar(20), @facTo varchar(20), @contcodes varchar(max), @attach int
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

	DECLARE @sepPos int
	DECLARE @val varchar(1000)
	
	BEGIN TRY
		BEGIN TRANSACTION

		WHILE PATINDEX('%¬%', @contcodes) <> 0
			BEGIN
				SET @sepPos = PATINDEX('%¬%', @contcodes)
				SET @val = LEFT(@contcodes, @sepPos - 1)

				--ADD IN NORMAL PROCESSING SQL HERE @val = the current contcode
				
				--Sub Area Variables
				DECLARE @SAsubcont varchar(20)
				DECLARE @subAreasCursor CURSOR
				DECLARE @sitename varChar(30)
				DECLARE @manager varChar(30)
				DECLARE @telephone varChar(15)
				DECLARE @fax varChar(15)
				DECLARE @email varchar(max)
				DECLARE @comment varchar(max)
				DECLARE @cdate smalldatetime
				DECLARE @l_update smalldatetime
				DECLARE @edate smalldatetime
				
				--Cursor for all of the sub areas
				SET @subAreasCursor = CURSOR FAST_FORWARD FOR
					SELECT SUBCONT, SITENAME, MANAGER, TELEPHONE, FAX, EMAIL, COMMENT, CDATE, L_UPDATE, EDATE FROM SUBCONTR WHERE [COMPID] = @compid AND [FACID] = @facid AND [CONTCODE] = @val

				OPEN @subAreasCursor

				FETCH NEXT FROM @subAreasCursor INTO @SAsubcont, @sitename, @manager, @telephone, @fax, @email, @comment, @cdate, @l_update, @edate
					
				--While there is a sub area
				WHILE (@@FETCH_STATUS = 0)
					BEGIN
						--Sub Assessment Variables
						DECLARE @subAssessmentsCursor CURSOR
						DECLARE @subcont varchar(20)
						DECLARE @mtrlcode int
						DECLARE @SubAssesseDate smalldatetime
						
						--Cursor for all the sub assessments
						SET @subAssessmentsCursor = CURSOR FAST_FORWARD FOR
							SELECT SUBCONT, MTRLCODE, EDATE FROM SUBSCHED WHERE COMPID = @compid AND FACID = @facid AND CONTCODE = @val AND SUBCONT = @SAsubcont

						OPEN @subAssessmentsCursor

						FETCH NEXT FROM @subAssessmentsCursor INTO @subcont, @mtrlcode, @SubAssesseDate

						--While there is a sub assessment
						WHILE (@@FETCH_STATUS = 0)
							BEGIN
								--Sub Activity Variables
								DECLARE @subActCursor CURSOR
								DECLARE @actNum int
								
								--Cursor for sub assessments activities
								SET @subActCursor = CURSOR FAST_FORWARD FOR
									SELECT ACTNO FROM SUBSELAC WHERE COMPID = @compid AND FACID = @facid AND CONTCODE = @val AND SUBCONT = @SAsubcont AND MTRLCODE = @mtrlcode

								OPEN @subActCursor

								FETCH NEXT FROM @subActCursor INTO @actNum

								WHILE (@@FETCH_STATUS = 0)
									BEGIN
										--Insert new sub activity
										INSERT INTO SUBSELAC
										VALUES (@compTo, @facTo, @val, @subcont, @mtrlcode, @actNum)		

										FETCH NEXT FROM @subActCursor INTO @actNum
									END

								--Insert new sub assessment
								INSERT INTO SUBSCHED
								VALUES (@compTo, @facTo, @val, @subcont, @mtrlcode, @SubAssesseDate)

								--Get next assessment
								FETCH NEXT FROM @subAssessmentsCursor INTO @subcont, @mtrlcode, @SubAssesseDate
							END
						
						CLOSE @subAssessmentsCursor
						DEALLOCATE @subAssessmentsCursor

						--Insert new sub area
						INSERT INTO SUBCONTR
						VALUES (@compTo, @facTo, @val, @SAsubcont, @sitename, @manager, @telephone ,@fax, @email, @comment, @cdate, @l_update, @edate) 

						--Get next sub area
						FETCH NEXT FROM @subAreasCursor INTO @SAsubcont, @sitename, @manager, @telephone, @fax, @email, @comment, @cdate, @l_update, @edate
					END

				CLOSE @subAreasCursor
				DEALLOCATE @subAreasCursor

				--Work Area Variables
				DECLARE @WAsitename varChar(30)
				DECLARE @WAmanager varChar(30)
				DECLARE @WAloaction varChar(30)
				DECLARE @WAaddress1 varchar(30)
				DECLARE @WAaddress2 varchar(30)
				DECLARE @WAaddress3 varchar(30)
				DECLARE @WApostcode varchar(10)
				DECLARE @WAtelephone varChar(15)
				DECLARE @WAfax varChar(15)
				DECLARE @WAemail varchar(max)
				DECLARE @WAcomment varchar(max)
				DECLARE @WAcdate smalldatetime
				DECLARE @WAl_update smalldatetime
				DECLARE @WAedate smalldatetime

				--Get work area data
				SELECT @WAsitename = SITENAME, @WAloaction = LOCATION, @WAaddress1 = ADDRESS1, @WAaddress2 = ADDRESS2, @WAaddress3 = ADDRESS3, @WApostcode = POSTCODE, @WAmanager = MANAGER, @WAtelephone = TELEPHONE, @WAfax = FAX, @WAcomment = COMMENT, @WAcdate = CDATE, @WAl_update = L_UPDATE, @WAedate = EDATE
				FROM CONTRACT
				WHERE COMPID = @compid AND FACID = @facid AND CONTCODE = @val
				
				--Insert new work area
				INSERT INTO CONTRACT
				VALUES (@compTo, @facTo, @val, @WAmanager, @WAsitename, @WAloaction, @WAaddress1, @WAaddress2, @WAaddress3, @WApostcode, @WAtelephone, @WAfax, @WAcdate, @WAcomment, @WAl_update, @WAedate)

				--Assessment Variables
				DECLARE @AssessmentsCursor CURSOR
				DECLARE @AssessMtrlcode int
				DECLARE	@AssessEdate smalldatetime

				--Cursor for all of the work area assessments
				SET @AssessmentsCursor = CURSOR FAST_FORWARD FOR
					SELECT MTRLCODE, EDATE FROM SCHEDULE WHERE COMPID = @compid AND FACID = @facid AND CONTCODE = @val

				OPEN @AssessmentsCursor
	
				FETCH NEXT FROM @AssessmentsCursor INTO @AssessMtrlcode, @AssessEdate

				--While there is an assessment
				WHILE (@@FETCH_STATUS = 0)
					BEGIN
						--Activity Variables
						DECLARE @ActCursor CURSOR
						DECLARE @Num int
						
						--Cursor for assessments activities
						SET @ActCursor = CURSOR FAST_FORWARD FOR
							SELECT ACTNO FROM SELACT WHERE COMPID = @compid AND FACID = @facid AND CONTCODE = @val AND MTRLCODE = @AssessMtrlcode

						OPEN @ActCursor

						FETCH NEXT FROM @ActCursor INTO @Num

						WHILE (@@FETCH_STATUS = 0)
							BEGIN
								--Insert new activity
								INSERT INTO SELACT
								VALUES (@compTo, @facTo, @val, @mtrlcode, @Num)		

								FETCH NEXT FROM @ActCursor INTO @Num
							END

						--Insert New Assessment
						INSERT INTO SCHEDULE
						VALUES (@compTo, @facTo, @val, @AssessMtrlcode, @AssessEdate)

						--Get next Assessment
						FETCH NEXT FROM @AssessmentsCursor INTO @AssessMtrlcode, @AssessEdate
					END
			
				CLOSE @AssessmentsCursor
				DEALLOCATE @AssessmentsCursor

				--Attachments
				IF @attach = 1
					BEGIN
						--Sub Area Attachment Variables
						DECLARE @attachSubAreaCursor CURSOR
						DECLARE @attachMtrlcode int
						DECLARE @attachFilename varchar(1000)
						DECLARE @attachAtype varchar(2)
						DECLARE @attachSubcont varchar(20)

						--Cursor for sub area attachments
						SET @attachSubAreaCursor = CURSOR FAST_FORWARD FOR
						SELECT MTRLCODE, FILENAME, ATYPE, SUBCONTCODE FROM ATTACH WHERE COMPID = @compid AND FACID = @facid AND CONTCODE = @val 

						OPEN @attachSubAreaCursor

						FETCH NEXT FROM @attachSubAreaCursor INTO @attachMtrlcode, @attachFilename, @attachAtype, @attachSubcont

						--while there is a sub area attachment
						WHILE (@@FETCH_STATUS = 0)
							BEGIN
								--Insert new attachment
								INSERT INTO ATTACH
								VALUES (@compTo, @facTo, @attachMtrlcode, @attachFilename, @attachAtype, @val, @attachSubcont)
										
								FETCH NEXT FROM @attachSubAreaCursor INTO @attachMtrlcode, @attachFilename, @attachAtype, @attachSubcont
							END

						CLOSE @attachSubAreaCursor
						DEALLOCATE @attachSubAreaCursor
					END

				---------------------------------------------------------------

				SET @contcodes = STUFF(@contcodes, 1, @sepPos, '')
			END
		
		--SELECT 1/0

		SELECT 0 AS Result

		COMMIT
	END TRY

	BEGIN CATCH
		SELECT 1 AS Result

		ROLLBACK
	END CATCH   
END

Yey for work \o/
 
Back
Top Bottom