Wednesday, March 28, 2012
Invalid use of INSERT within a function.
Any help would be greatly appreciated.You cannot INSERT, UPDATE, or DELETE from tables in a FUNCTION. The examples you probably saw did so to locally defined variables of type TABLE.
You can return a value from a stored procedure to get the new ID. You can do this with an output parameter or with a RETURN in the stored procedure. To get the value of the RETURN, execute the stored procedure like this:
DECLARE @.ResultCode int
EXEC @.ResultCode = uspGetMyGroup
Originally posted by saderax
Is it possible to insert into a table from a function. I have a function that searches for a unique group id, and if the group does not exist, it inserts and returns the id. I created a procedure with the same code (except for the returns) and it operated properly, so it shouldn't be a logic issue. I cannot find any resources that say inserting from within a function is disallowed. Microsoft even does it on one of their sql server 2000 examples in msdn.
Any help would be greatly appreciated.
Friday, February 24, 2012
intersection of dimension?
i have a query that counts the number of stores that both exist in two dimension:
nonemptycrossjoin(descendants(dimlocation.currentmember,9,leaves),descendants(dimtargetset.currentmember,9,leaves)).count
dimlocation is a parent child dimension while dimtargetset is a star schema...
later i realized that im only counting the stores with data and excluding stores with no data in the count.. i tried crossjoin only but it doesnt return the correct count...
is there any way i could count them? im using as 2000... thanks...
any ideas?|||See this post: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2139906&SiteID=1
Best regards
- Jens
intersection of dimension?
i have a query that counts the number of stores that both exist in two dimension:
nonemptycrossjoin(descendants(dimlocation.currentmember,9,leaves),descendants(dimtargetset.currentmember,9,leaves)).count
dimlocation is a parent child dimension while dimtargetset is a star schema...
later i realized that im only counting the stores with data and excluding stores with no data in the count.. i tried crossjoin only but it doesnt return the correct count...
is there any way i could count them? im using as 2000... thanks...
any ideas?|||See this post: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2139906&SiteID=1
Best regards
- Jens
Sunday, February 19, 2012
Internet explorer script error
This is a forum for SQL Server Reporting Services, not virus scanners. I think you'll have more luck trying to post your problem at http://forums.mcafeehelp.com/.
|||I have also begun getting this error message and I do not use McAfee, I use Norton 2006. Since I installed it I get this error ?
|||Mcafee not able to sort this problem they suggested this forum but thankyou for your suggestion|||Try posting your issue to the ASP "Client Side Web Development" forum, which deals with "Client-side programming discussions, including CSS, DHTML, JScript/Javascript, etc".
http://forums.asp.net/130/ShowForum.aspx
They may be able to help you out. I'd try including alot more information, though:
what's the error number?|||I have the same problem with Norton and other items in task scheduler. Symantic responds that it is a Windows problem in Task Scheduler. Windows Article ID 246183 responds to this problem, but only applies to Windows 2000. It requires a change in the registry. Look at it and see if it helps.