Viewing 15 posts - 1 through 15 (of 26 total)
yes, my misclick. u can remove this topic, please
November 3, 2005 at 5:29 am
these are the functions:
/*
Split()quebrar uma string com valores delimitados por 1 caractere
@param inputstring delimitada
@param delimiterdelimitador com 1 caractere qualquer
@return outputtable output{valor}
@usageSELECT valor FROM Split( 'aa;bb;ff;xx;', '|' )
*/
ALTER FUNCTION Split(...
October 31, 2005 at 5:45 am
O.o
it worked!!!!
SELECT dbo.testList( '14;0;-1;-2;', ';' ) as rolenames
rolenames
---------------------------------
Administrators - All Users - Host
\o/
i know it might be a stupid...
October 27, 2005 at 2:49 pm
hmm now I put all into a function. the split() works fine.
but something at the last rows are not right. It error:
"Server: Msg 2010, Level 16, State 1, Procedure...
October 27, 2005 at 2:39 pm
i look like the picture =^.^=
October 27, 2005 at 2:29 pm
it can run slowly if it at least run hehehe the problem is when i put all functions together ( are 3 ), and call the functions caller into...
October 27, 2005 at 2:16 pm
thats the point. these negative ids are not inside the roles tables ( who knows the guy who did that please kill him for me! (dotnetnuke's crazy people) )
my darling!...
October 27, 2005 at 2:07 pm
nicolas! hi!
I tried this function you said, and it worked!!! No need cursor and dynamic query anymore! yay! \o/
Now i'm trying to...
October 27, 2005 at 11:25 am
split function that generate the first table result:
create FUNCTION Split( @input VARCHAR(1000), @delimiter CHAR(1) = '|' )
RETURNS @output TABLE( valor VARCHAR(1000) )
AS
BEGIN
DECLARE @join VARCHAR(1000)
DECLARE...
October 27, 2005 at 11:08 am
sample data: '14;-3;11;' ( n id values comma delimited ) like:
main_table
----------
roles otherfields
14;-3;11; ...
roles_table
-----------
id description
14 Administrator
-3 Administrator
11 Customers
expected...
October 27, 2005 at 7:10 am
i dont know how to do this.
the main query will bring many rows, and for each row I will have to get the delimited ids converted to their descriptions, i...
October 26, 2005 at 12:16 pm
because i dont want to do many steps to convert some ids to their values. this way, I would have to code much more, and in the client application.
i do...
October 26, 2005 at 12:05 pm
oh boy thats sad ((
If I can make a proc work like a function but can't use it results anywhere it what's the point...
October 26, 2005 at 10:38 am
/cry
now i found another issue.
as a function I could call like this:
select myfunction(args),fields from table
now with the procedure call like this:
declare @x varchar(2000)
exec dbo.procJoinColuna 'rolename','14;0;-1;-2;',';', @x OUTPUT select @x
this code...
October 26, 2005 at 8:51 am
ah i did some tests and now it works
SET @cr_sql = 'DECLARE cursor_join CURSOR FOR SELECT DISTINCT( '+ @coluna +' ) FROM Split2Table( '''+ @valor +''', '''+...
October 26, 2005 at 8:28 am
Viewing 15 posts - 1 through 15 (of 26 total)