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 |
|
harshal_in
Aged Yak Warrior
633 Posts |
Posted - 2003-01-21 : 05:50:53
|
| hi,I am using the function csvtoint:http://www.sqlteam.com/item.asp?ItemID=11499 this is the query :select * from table where id in (dbo.csvtoint(@id))it gives me the following error:Invalid object name 'dbo.CsvToInt'.I know there is very simle error some where but i am not able to catch it.any help would be appreciated.regards,harshal.Expect the UnExpected |
|
|
rihardh
Constraint Violating Yak Guru
307 Posts |
Posted - 2003-01-21 : 06:23:04
|
| What kind of data does the function return? |
 |
|
|
rihardh
Constraint Violating Yak Guru
307 Posts |
Posted - 2003-01-21 : 06:24:09
|
| Read the link now...Use: (SELECT * FROM dbo.csvtoint(@id)) |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2003-01-21 : 06:25:31
|
| If it's recursive have you created it as csvtoint and it expects to be CsvToIntand you have a case sensitive server.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
harshal_in
Aged Yak Warrior
633 Posts |
Posted - 2003-01-21 : 06:30:45
|
quote: Read the link now...Use: (SELECT * FROM dbo.csvtoint(@id))
it works fine if the function is used in the from clause but if I try to use it in the where clause it gives me the error.id is int and the function returns int.Expect the UnExpected |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2003-01-21 : 06:42:23
|
| Looks like it returns a tableselect * from table where id in (select * from dbo.csvtoint(@id)) ==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
mr_mist
Grunnio
1870 Posts |
Posted - 2003-01-21 : 06:59:06
|
quote: id is int and the function returns int.
Shouldn't @id be your varchar CSV?-------Moo. |
 |
|
|
harshal_in
Aged Yak Warrior
633 Posts |
Posted - 2003-01-21 : 07:01:04
|
quote:
quote: id is int and the function returns int.
Shouldn't @id be your varchar CSV?-------Moo.
I said the datatype of the column id in the table is int while the variable @id is a string which will contain the csv value.Expect the UnExpected |
 |
|
|
|
|
|