April 13, 2012 at 10:45 am
i have 1 udf which returns RETURNS TABLE
how can i add into it
April 13, 2012 at 10:48 am
Are you asking how you add more columns to the resultset table of the function or are you asking how you get the resultset to include more rows or some other interpretation?
April 13, 2012 at 10:48 am
ALTER FUNCTION udf... ??
can you post your UDF code and DDL (Create table scripts) and sample data (INSERT Statements) so we can see what gets passed to the udf what comes out currently and what you want to change?
right now we have a generic question and my MindReadAPI is still vapor ware.
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
April 13, 2012 at 10:53 am
function is already created, i need to add more rows ,if i do insert into ,it wont get insert.
do i need to have update ,if so how can i update udf
April 13, 2012 at 11:29 am
a udf is a user defined function. by deffinition to change or update a FUNCTION you have to update or change the code for the function. im starting to wonder why i keep responding.
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
April 13, 2012 at 11:33 am
i dont need to change field, i have filed
CREATE FUNCTION item1(@Data [varbinary](max))
RETURNS TABLE (
item2 varchar,
item3 int)
now i need to add more rows in item3, and i need to implement in another sp.
April 13, 2012 at 11:36 am
hbtkp (4/13/2012)
i dont need to change field, i have filedCREATE FUNCTION item1(@Data [varbinary](max))
RETURNS TABLE (
item2 varchar,
item3 int)
now i need to add more rows in item3, and i need to implement in another sp.
Duplicate post all replies here http://www.sqlservercentral.com/Forums/Topic1282601-392-1.aspx
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
April 13, 2012 at 11:36 am
Here is how all of the threads that you have started sound.
There were two crocodiles flying. One to the south but another one was blue.
Question: How many seats in our local theater?
The Right Answer: I don't need a fridge as I do not smoke.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
April 13, 2012 at 12:47 pm
Rows are inserted into a table.
If I substitute the word TABLE for the word FUNCTION, your questions begin to make some (not completely) sense.
April 13, 2012 at 2:34 pm
hbtkp (4/13/2012)
i dont need to change field, i have filedCREATE FUNCTION item1(@Data [varbinary](max))
RETURNS TABLE (
item2 varchar,
item3 int)
now i need to add more rows in item3, and i need to implement in another sp.
You can't add more rows into your function.
After your Returns table statement, you should have more code designating what is actually getting returned into that "inline" table.
read up on this
http://msdn.microsoft.com/en-us/library/ms191165.aspx
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
April 13, 2012 at 2:39 pm
thanks.
i will give you feedback when i will get back to this position
April 13, 2012 at 2:39 pm
Okay, i'll bite. Please post the code for your function.
April 13, 2012 at 2:40 pm
Lynn Pettis (4/13/2012)
Okay, i'll bite. Please post the code for your function.
All of the code plz:-D
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
April 13, 2012 at 2:42 pm
i havent reach this point,untill i get how to see what dates r missing
April 13, 2012 at 2:44 pm
capn.hector (4/13/2012)
Duplicate post all replies here http://www.sqlservercentral.com/Forums/Topic1282601-392-1.aspx
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 15 posts - 1 through 15 (of 85 total)
You must be logged in to reply to this topic. Login to reply