Advertisement
| 10.06.2008 at 05:54AM PDT, ID: 23790211 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: |
IF OBJECT_ID('tempdb.dbo.#Temp') IS NOT NULL
DROP TABLE #Temp
DECLARE @start DATETIME
DECLARE @end DATETIME
SET @start = DATEADD(day, -67, CONVERT(DATETIME, CONVERT(VARCHAR(10), GETDATE(), 120), 120))
SET @end = DATEADD(day, 1, @start)
DECLARE @TxtPtr BINARY(16),
@applicantid INTEGER,
@Data VARCHAR(8000),
@Offset INTEGER
SET NOCOUNT ON
CREATE TABLE #Temp
(
applicantid INTEGER,
RTF TEXT
)
DECLARE YourCursor CURSOR
FOR SELECT c.applicantid
FROM applicant a
LEFT OUTER JOIN coverletter c ON a.applicantid = c.applicantid
LEFT OUTER JOIN PersonalInformation p ON a.ApplicantID = p.ApplicantID
WHERE c.date_dt >= @start and c.date_dt < @end
OPEN YourCursor
FETCH NEXT FROM YourCursor INTO @applicantid
WHILE @@FETCH_STATUS = 0
BEGIN
INSERT #Temp ( applicantid, RTF )
VALUES ( @applicantid, '' )
SELECT @TxtPtr = TEXTPTR(RTF),
@OffSet = 0
FROM #Temp
WHERE applicantid = @applicantid
WHILE @OffSet IS NOT NULL
BEGIN
SELECT @Data = CAST(CAST(SUBSTRING(document_im, @Offset + 1, 8000) AS VARBINARY(8000)) AS VARCHAR(8000))
FROM coverletter
WHERE applicantid = @applicantid
IF LEN(@Data) > 0
BEGIN
UPDATETEXT #Temp.RTF @TxtPtr @Offset NULL @Data
SET @OffSet = @OffSet + 8000
END
ELSE
BEGIN
SET @OffSet = NULL
END
END
FETCH NEXT FROM YourCursor INTO @applicantid
END
CLOSE YourCursor
DEALLOCATE YourCursor
SELECT applicantid,
RTF
FROM #Temp
DROP TABLE #Temp
|
Advertisement