Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Error Message

Author  Topic 

vwilsonjr
Starting Member

45 Posts

Posted - 2003-05-09 : 20:32:28
I have 2 SQL 2000 server I can run a script on the development book with out errors. On the production server I get the following

Server: Msg 8626, Level 16, State 1, Line 16
Only text pointers are allowed in work tables, never text, ntext, or image columns. The query processor produced a query plan that required a text, ntext, or image column in a work table.

Here is the code.

/* Insert new record into appuser */

/* */

/*The following process must be followed */
/* Format(date).sql must be ran first */
/* Update(date).sql must be ran second */
/* Insert(date).sql must be ran third */

/*Authur Date Purpose File Name Comments */
/*V. Wilson 5/5/2003 Created & tested insert050503.sql Worked Fine */



/* Insert New Records to AppUser Table */
insert into appuser
(forename,
surname,
Job_Title,
Employment_Start,
Office_Phone,
Address,
Home_Phone,
Email_Address,
Emergency_Contact,
Employee_Site_ID,
User_Type,
DOB,
Sex,
Employee_Number,
Employment_End,
Category_ID,
Mobile_Phone,
Creation_Date,
Creation_User,
LastUpdate_Date,
LastUpdate_User,
Profile_ID
)
select
dbo.ProperCase(Forename)as Forename,
dbo.ProperCase(surname)as surname,
dbo.ProperCase(Job_Title)as job_title,
convert(datetime,Employment_start,1)AS EMPLOYMENT_START,
Office_AreaCode+ ' ' + Office_Phone as Office_Phone,
dbo.ProperCase(address1) + CHAR(13) + char(10)+
dbo.ProperCase(address2) + CHAR(13) + char(10)+
dbo.ProperCase(City) + ' ' + State + PostalCode
as Address ,
Home_AreaCode+ ' ' + Home_Phone as Home_Phone,
Email_Address,
dbo.ProperCase(Emergency_Contact1) + CHAR(13) + char(10)+
dbo.ProperCase(Emergency_Contact2) + CHAR(13) + char(10)+
dbo.ProperCase(Emergency_Contact3) + CHAR(13) + char(10)+
dbo.ProperCase(Emergency_Contact4) + CHAR(13) + char(10)+
dbo.ProperCase(Emergency_Contact5) + CHAR(13) + char(10)+
dbo.ProperCase(Emergency_Contact6) + CHAR(13) + char(10)+
dbo.ProperCase(Emergency_Contact7) + CHAR(13) + char(10)+
dbo.ProperCase(Emergency_Contact8) + CHAR(13) + char(10)
as Emergency_contact,
Employee_Site_ID,
'E' as User_Type,
convert(datetime,DOB,1)as DOB,
sex,
Employee_Number as Employee_Number,
convert(datetime,Employment_end,1) as employment_end,
Category_ID,
Mobile_AreaCode + ' ' + Mobile_Phone as Mobile_Phone,
getdate() as creation_date,
'JDE Upload' as Creation_User,
getdate() as LastUpdate_Date,
'JDE Upload' as LastUpdate_User,
'0' as Profile_ID


from Appuser_Temp

where ltrim(Employee_Number) not in
(select Employee_Number from appuser where Employee_Number is not null)

Any help would be great.

Thank God for Forums.

Andraax
Aged Yak Warrior

790 Posts

Posted - 2003-05-12 : 03:01:41
Seems like you have a BLOB column in one of your tables... It would be helpful if you could post the CREATE TABLE statement for appuser and appuser_temp, and the code for the ProperCase function.

Go to Top of Page
   

- Advertisement -