on 04-04-2016 1:31 PM
hi guys
Please tell me how to run the sql function to update the sql table through data services..
see the below sql statement which is running fine in sql management studio, but not through data services
UPDATE Article SET ArticleCategories = (SELECT dbo.[SplitAndRemoveDuplicates](';', ArticleCategories))
I have tried
Print(exec( sql( database_connection', 'UPDATE Article SET ArticleCategories = (SELECT dbo.[SplitAndRemoveDuplicates](';', ArticleCategories))'),'',8 ));
[Script:Script2680]
The script <Script2680> contains an invalid expression. Additional information: <Identifier <SplitAndRemoveDuplicates> is unrecognized. Check its spelling and usage. If it is a variable, it needs a preceding '$'; if a constant, it must be quoted; if a column, verify that such a column exists in a table.>. (BODI-1111242)
Tried creating function call in query transform as well.. but getting an error..
any help please
you can do it using the standard sql function.
Syntax is sql (<Datastore for the target database>, <SQL Statement>);
for your case if will be something like the below
sql('<>Enter Datastore for the target database' , 'UPDATE Article SET ArticleCategories = (SELECT dbo.SplitAndRemoveDuplicates(\';\', ArticleCategories))');
Raghu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you tell me what is the output of SplitAndRemoveDuplicates function which you have created.
Regards
Arun Sasi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.