Showing posts with label weird. Show all posts
Showing posts with label weird. Show all posts

Thursday, March 29, 2012

Difference between SP and function

Hi All,

It may be sound weird. I want to find the difference between SQL Stored procedure and functions. I knew a couple one is for function, parameter is must where as in SP its not, second is function would return a value whereas procedure wont.

Is there anythign else?That was it! You are on the right track :)|||>> second is function would return a value whereas procedure wont.

not necessarily. even a stored proc can return values ( see OUTPUT PArameters).

Function can return only ONE value where as a stored proc can return multiple values.
performance wise there isnt any diff.

I remember having googled about this once and did come across a couple of articles that xtensively described the differences..so I would say google and you can find more definitive answers.

hth|||I guess "parameter is must where as in SP " he ment for OUTPUT param!|||one use of a function is to use it to return a table object that can be used in another sql statement|||Hi

Thanks you all for your answers. But in the recent inteview which i attended they asked for one more difference between these two apart from those i specified earlier.|||I'm sure you could Google and find all of the information you need.

The main thing about UDFs is that they need to be deterministic -- that is, the same input parameters will always return the same result. So therefore you cannot, for example, directly use GETDATE() in your UDF. Another biggie is that you cannot use either @.@.ERROR or RAISERROR. And another biggie is that dynamic SQL cannot be executed.

I've gotten burnt by all of the above, and others. Some have workarounds, some do not.

Terri

Friday, March 9, 2012

Diagram Editor

This is a rather weird one if anyone can help.
I create a new diagram on my machine through Enterprise Manager ver 8 then
go to another machine modify the diagram with EM ver 8 and save it. When I
re-open the diagram on my machine there are no tables in it.
Anyone know of any issues relating to this or anything.
Regards
Ian Frawley
Similar issues have been reported by people who have
applied Visual Studio Service Pack 6 - that's a known
issue.
I don't know if there is a knowledge base article or
supported fix for the issue. Others have reported working
around the issue by installing an older version of
mdt2df.dll
-Sue
On Wed, 4 Jan 2006 10:26:00 -0000, "Ian Frawley"
<yeah@.yeah.com> wrote:

>This is a rather weird one if anyone can help.
>I create a new diagram on my machine through Enterprise Manager ver 8 then
>go to another machine modify the diagram with EM ver 8 and save it. When I
>re-open the diagram on my machine there are no tables in it.
>Anyone know of any issues relating to this or anything.

Diagram Editor

This is a rather weird one if anyone can help.
I create a new diagram on my machine through Enterprise Manager ver 8 then
go to another machine modify the diagram with EM ver 8 and save it. When I
re-open the diagram on my machine there are no tables in it.
Anyone know of any issues relating to this or anything.
Regards
Ian Frawley
Hi
I can't say I use the diagramming feature in EM that much as (IMO) it has
always been a bit functionally challenged!
Have you checked that the version of EM is the same on each machine i.e. the
tools have been patched to the same level? You may also want to try and see
that it has not been re-arranged so the tables are still there but off
screen.
John
"Ian Frawley" <yeah@.yeah.com> wrote in message
news:eJMrOlREGHA.3820@.TK2MSFTNGP12.phx.gbl...
> This is a rather weird one if anyone can help.
> I create a new diagram on my machine through Enterprise Manager ver 8 then
> go to another machine modify the diagram with EM ver 8 and save it. When I
> re-open the diagram on my machine there are no tables in it.
> Anyone know of any issues relating to this or anything.
> --
> Regards
> Ian Frawley
>
|||"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
Thanks for your response, I mainly use the diagram editor as a lazy way of
setting up relationships it has always worked well for me.
I checked EM and they all apear to be the same version (8) but I am unaware
if they have been patched in any way. In addition I tried zooming out, which
makes no difference and I even tried to re add tables and it doesn't allow
me to do this. Its all a bit odd TBH.

> Hi
> I can't say I use the diagramming feature in EM that much as (IMO) it has
> always been a bit functionally challenged!
> Have you checked that the version of EM is the same on each machine i.e.
> the tools have been patched to the same level? You may also want to try
> and see that it has not been re-arranged so the tables are still there but
> off screen.
> John
> "Ian Frawley" <yeah@.yeah.com> wrote in message
> news:eJMrOlREGHA.3820@.TK2MSFTNGP12.phx.gbl...
>
|||Hi
As EM is a MMC there is no version number but you could check one of the exe
such as sqlmangr.exe, right click and check the version number. It does
sounds like the tables are still there if you can't re-add them.
With a bit of practice you may find it quicker to use Query Analyser and the
ALTER TABLE command than go through the process of adding tables and
creating FK constraints.
John
"Ian Frawley" <yeah@.yeah.com> wrote in message
news:%23lqLS6SEGHA.1736@.TK2MSFTNGP14.phx.gbl...
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> Thanks for your response, I mainly use the diagram editor as a lazy way of
> setting up relationships it has always worked well for me.
> I checked EM and they all apear to be the same version (8) but I am
> unaware if they have been patched in any way. In addition I tried zooming
> out, which makes no difference and I even tried to re add tables and it
> doesn't allow me to do this. Its all a bit odd TBH.
>
>