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
 SQL Server Development (2000)
 getType problem

Author  Topic 

christer100
Starting Member

6 Posts

Posted - 2005-11-13 : 09:35:26
I am getting this error on MSDE SP4, but it is working on SQL 2000 Standard/Developer/Enterprise SP3A.

Invalid object name 'getType'.

What can I use instead of getType??

DECLARE
@v_accrec VARCHAR(10),
@v_type VARCHAR(10),
@v_old_accrec VARCHAR(10),
@v_string VARCHAR(400),
@v_ml VARCHAR(10)

UPDATE ACCOUNTINFO
SET TYPEML=''

set @v_ml= (SELECT MLTYPE
FROM dbo.ProgramConf)


DECLARE c1 CURSOR FOR SELECT rec2,
type
FROM getType(@v_ml) a
ORDER BY a.rec2

OPEN c1
SET @v_old_accrec = 0
SET @v_accrec = 0
SET @v_type = ''
SET @v_string = ''

FETCH NEXT FROM c1 INTO @v_accrec, @v_type

WHILE @@FETCH_STATUS = 0
BEGIN
IF (@v_old_accrec != @v_accrec)
BEGIN
UPDATE AccountInfo
SET typeml = case when @v_string is not null
then substring(@v_string, 1, len(@v_string) - 1) else NULL end
WHERE accrec = @v_old_accrec
SET @v_string = ''
SET @v_string = @v_string + @v_type + '|'
SET @v_type = ''
SET @v_old_accrec = @v_accrec
SET @v_accrec = 0
END
ELSE
BEGIN
SET @v_string = @v_string + @v_type + '|'
END

FETCH NEXT FROM c1 INTO @v_accrec, @v_type
END
UPDATE AccountInfo
SET typeml = case when @v_string is not null
then substring(@v_string, 1, len(@v_string) - 1) else NULL end
WHERE accrec = @v_old_accrec
CLOSE c1
DEALLOCATE c1

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2005-11-13 : 09:47:23
What is "getType"? Is it a function? You need to prefix all functions with the owner. i.e., dbo.GetType().

Go to Top of Page

christer100
Starting Member

6 Posts

Posted - 2005-11-13 : 15:58:28
I guess it must be a system function that exists in SQL 2000 but not in MSDE. It is not a user defined function. Where are all the system function stored (what table so I can copy to MSDE?)
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-11-13 : 17:33:03
Please do not cross post:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=57671
Go to Top of Page
   

- Advertisement -