Viewing 11 posts - 16 through 26 (of 26 total)
triple '''?
how come? I dont use any inside the query. see above:
DECLARE cursor_join CURSOR FOR SELECT DISTINCT(@coluna) FROM Split2Table(@valor,@delimiter)
As i understand there's no need for a ''' here
I still don't...
October 26, 2005 at 8:11 am
aah now seems to call the proc. but it errors. i don't know why.
ALTER PROCEDURE procJoinColuna
@coluna varchar( 2000 ),
@valor varchar( 2000 ),
...
October 26, 2005 at 8:02 am
and those are the bad guys which doesnt work:
It will only work IF I remove the dynamic query and replace by a static declare cursor query.
-- SET @cr_sql = 'DECLARE...
October 26, 2005 at 7:33 am
now the join :
drop function JoinColuna;
CREATE FUNCTION JoinColuna( @coluna varchar( 2000 ), @valor varchar( 2000 ), @delimiter char( 1 ) )
RETURNS varchar( 2000 )
AS
BEGIN
October 26, 2005 at 7:30 am
boy i think we messed it all! i will start it over. let me show you the code!
drop function Split2Table
CREATE FUNCTION Split2Table( @input varchar( 8000 ), @delimiter char( 1...
October 26, 2005 at 7:24 am
the function can be used as a part of select, as it is working.
i have a field with N ids delimited by ;
these ids are from a single table,...
October 26, 2005 at 6:54 am
a procedure can receive params and return a value as the function can?
because after all i need to select the result of it from another query, like this:
(select dbo.JoinColuna( 'fieldname',...
October 25, 2005 at 2:18 pm
just to kill your curiosity a litle brief of what i do:
in a table i get a value like this: '14;-1;11;'
( yeah, they didn't normalize the table
October 25, 2005 at 2:13 pm
my boss just says 'solve it no matter how' hehehe
this is the solution more reasonable i found. I just want the column to be dynamic, because this is a...
October 25, 2005 at 2:08 pm
ah. sorry. I forgot to mention that this is a query from a cursor
i expected this to work but wont
SET @cr_sql = 'DECLARE...
October 25, 2005 at 1:59 pm
because I want to pass the column name to the function which varies so...well.. it leads me to a dynamic query
October 25, 2005 at 1:55 pm
Viewing 11 posts - 16 through 26 (of 26 total)