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.
| 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 ACCOUNTINFOSET TYPEML=''set @v_ml= (SELECT MLTYPEFROM dbo.ProgramConf) DECLARE c1 CURSOR FOR SELECT rec2,typeFROM getType(@v_ml) aORDER BY a.rec2OPEN c1SET @v_old_accrec = 0SET @v_accrec = 0SET @v_type = ''SET @v_string = ''FETCH NEXT FROM c1 INTO @v_accrec, @v_typeWHILE @@FETCH_STATUS = 0BEGINIF (@v_old_accrec != @v_accrec)BEGINUPDATE AccountInfo SET typeml = case when @v_string is not null then substring(@v_string, 1, len(@v_string) - 1) else NULL endWHERE accrec = @v_old_accrecSET @v_string = '' SET @v_string = @v_string + @v_type + '|'SET @v_type = ''SET @v_old_accrec = @v_accrecSET @v_accrec = 0ENDELSEBEGINSET @v_string = @v_string + @v_type + '|'ENDFETCH NEXT FROM c1 INTO @v_accrec, @v_typeENDUPDATE AccountInfo SET typeml = case when @v_string is not null then substring(@v_string, 1, len(@v_string) - 1) else NULL endWHERE accrec = @v_old_accrecCLOSE c1DEALLOCATE 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(). |
 |
|
|
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?) |
 |
|
|
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 |
 |
|
|
|
|
|
|
|