Showing posts with label execute. Show all posts
Showing posts with label execute. Show all posts

Sunday, March 11, 2012

Alter Table

Hello I have another problem.
I write this line of code:
alter table film modify casting personaggi varchar2(500)
but when I execute the result is
Error: ORA-01735: invalid ALTER TABLE option
what's the problem??
Thank you ElisaHello,

can I see the table structure ?

Best regards
Manfred Peter
Alligator Company Software GmbH
http://www.alligatorsql.com|||the structure of the table is:

CREATE TABLE Film
(IdFilm number(10) PRIMARY KEY,
Titolo VARCHAR2(20) NOT NULL,
Regista VARCHAR2(20) NOT NULL,
Casting VARCHAR2(500) NOT NULL,
Nazione VARCHAR2(20) NOT NULL,
Durata NUMBER(3) NOT NULL,
Genere VARCHAR2(10) NOT NULL,
Trama VARCHAR2(500) NOT NULL,
Novit VARCHAR2(10) NOT NULL,
Locandina VARCHAR2(20) NOT NULL,
Note VARCHAR2(100) NOT NULL,
anno number(4))
Thank you, Elisa|||If you want to rename a column and you are on Oracle 9i use:

ALTER TABLE film RENAME COLUMN casting TO personaggi;

On previous versions of Oracle you have to drop old and create new column.

Hope it helps,
Jacek

Originally posted by trilly
the structure of the table is:

CREATE TABLE Film
(IdFilm number(10) PRIMARY KEY,
Titolo VARCHAR2(20) NOT NULL,
Regista VARCHAR2(20) NOT NULL,
Casting VARCHAR2(500) NOT NULL,
Nazione VARCHAR2(20) NOT NULL,
Durata NUMBER(3) NOT NULL,
Genere VARCHAR2(10) NOT NULL,
Trama VARCHAR2(500) NOT NULL,
Novit VARCHAR2(10) NOT NULL,
Locandina VARCHAR2(20) NOT NULL,
Note VARCHAR2(100) NOT NULL,
anno number(4))
Thank you, Elisa

Alter Stored Procedure and Trigger

Hi All,
I need to modify some Stored Procedures and Triggers in production database
(SQL 2000). Can I use Edit object which means execute "Alter procedure..."
or "Alter Trigger..." directly? or I have to drop the existing SP or TR and
recreate them? Any difference between these 2 methods?
Thank you, Julia
The net effect will be the same, the only difference will the the create
date will change for the drop/add whereas it will not change for the alter.
So dropping the sp/tr and recreating it will set the new create date for
tracking purposes, if you want to know when it was last changed. But about
the only difference.
"Julia" <Julia@.discussions.microsoft.com> wrote in message
news:F2D56079-CC8F-4F4A-A7ED-5417AF745EB7@.microsoft.com...
> Hi All,
> I need to modify some Stored Procedures and Triggers in production
database
> (SQL 2000). Can I use Edit object which means execute "Alter
procedure..."
> or "Alter Trigger..." directly? or I have to drop the existing SP or TR
and
> recreate them? Any difference between these 2 methods?
> Thank you, Julia
>
|||Sorry, forgot, along with the drop/add, object ownership could change,
depending on who you are logged in as when you recreate the sp.
"Julia" <Julia@.discussions.microsoft.com> wrote in message
news:F2D56079-CC8F-4F4A-A7ED-5417AF745EB7@.microsoft.com...
> Hi All,
> I need to modify some Stored Procedures and Triggers in production
database
> (SQL 2000). Can I use Edit object which means execute "Alter
procedure..."
> or "Alter Trigger..." directly? or I have to drop the existing SP or TR
and
> recreate them? Any difference between these 2 methods?
> Thank you, Julia
>
|||Julia wrote:
> Hi All,
> I need to modify some Stored Procedures and Triggers in production
> database (SQL 2000). Can I use Edit object which means execute
> "Alter procedure..." or "Alter Trigger..." directly? or I have to
> drop the existing SP or TR and recreate them? Any difference between
> these 2 methods?
> Thank you, Julia
Object IDs change on a drop/create. Use alter whenever possible.
David Gugick
Imceda Software
www.imceda.com

Alter Stored Procedure and Trigger

Hi All,
I need to modify some Stored Procedures and Triggers in production database
(SQL 2000). Can I use Edit object which means execute "Alter procedure..."
or "Alter Trigger..." directly? or I have to drop the existing SP or TR and
recreate them? Any difference between these 2 methods?
Thank you, JuliaThe net effect will be the same, the only difference will the the create
date will change for the drop/add whereas it will not change for the alter.
So dropping the sp/tr and recreating it will set the new create date for
tracking purposes, if you want to know when it was last changed. But about
the only difference.
"Julia" <Julia@.discussions.microsoft.com> wrote in message
news:F2D56079-CC8F-4F4A-A7ED-5417AF745EB7@.microsoft.com...
> Hi All,
> I need to modify some Stored Procedures and Triggers in production
database
> (SQL 2000). Can I use Edit object which means execute "Alter
procedure..."
> or "Alter Trigger..." directly? or I have to drop the existing SP or TR
and
> recreate them? Any difference between these 2 methods?
> Thank you, Julia
>|||Sorry, forgot, along with the drop/add, object ownership could change,
depending on who you are logged in as when you recreate the sp.
"Julia" <Julia@.discussions.microsoft.com> wrote in message
news:F2D56079-CC8F-4F4A-A7ED-5417AF745EB7@.microsoft.com...
> Hi All,
> I need to modify some Stored Procedures and Triggers in production
database
> (SQL 2000). Can I use Edit object which means execute "Alter
procedure..."
> or "Alter Trigger..." directly? or I have to drop the existing SP or TR
and
> recreate them? Any difference between these 2 methods?
> Thank you, Julia
>|||Julia wrote:
> Hi All,
> I need to modify some Stored Procedures and Triggers in production
> database (SQL 2000). Can I use Edit object which means execute
> "Alter procedure..." or "Alter Trigger..." directly? or I have to
> drop the existing SP or TR and recreate them? Any difference between
> these 2 methods?
> Thank you, Julia
Object IDs change on a drop/create. Use alter whenever possible.
David Gugick
Imceda Software
www.imceda.com

Alter Stored Procedure and Trigger

Hi All,
I need to modify some Stored Procedures and Triggers in production database
(SQL 2000). Can I use Edit object which means execute "Alter procedure..."
or "Alter Trigger..." directly? or I have to drop the existing SP or TR and
recreate them? Any difference between these 2 methods?
Thank you, JuliaThe net effect will be the same, the only difference will the the create
date will change for the drop/add whereas it will not change for the alter.
So dropping the sp/tr and recreating it will set the new create date for
tracking purposes, if you want to know when it was last changed. But about
the only difference.
"Julia" <Julia@.discussions.microsoft.com> wrote in message
news:F2D56079-CC8F-4F4A-A7ED-5417AF745EB7@.microsoft.com...
> Hi All,
> I need to modify some Stored Procedures and Triggers in production
database
> (SQL 2000). Can I use Edit object which means execute "Alter
procedure..."
> or "Alter Trigger..." directly? or I have to drop the existing SP or TR
and
> recreate them? Any difference between these 2 methods?
> Thank you, Julia
>|||Sorry, forgot, along with the drop/add, object ownership could change,
depending on who you are logged in as when you recreate the sp.
"Julia" <Julia@.discussions.microsoft.com> wrote in message
news:F2D56079-CC8F-4F4A-A7ED-5417AF745EB7@.microsoft.com...
> Hi All,
> I need to modify some Stored Procedures and Triggers in production
database
> (SQL 2000). Can I use Edit object which means execute "Alter
procedure..."
> or "Alter Trigger..." directly? or I have to drop the existing SP or TR
and
> recreate them? Any difference between these 2 methods?
> Thank you, Julia
>|||Julia wrote:
> Hi All,
> I need to modify some Stored Procedures and Triggers in production
> database (SQL 2000). Can I use Edit object which means execute
> "Alter procedure..." or "Alter Trigger..." directly? or I have to
> drop the existing SP or TR and recreate them? Any difference between
> these 2 methods?
> Thank you, Julia
Object IDs change on a drop/create. Use alter whenever possible.
--
David Gugick
Imceda Software
www.imceda.com

Thursday, March 8, 2012

alter login on Windows user groups

Hi,
I have problem with respect to "alter login" on Windows user groups (created
via Active Directory).
If I execute the statement "alter login [domain\groupname] enable" I get
an
exception saying (the exception also occurs with "alter login
[domain\groupname] disable"):
Msg 15151, Level 16, State 1, Line 1
Cannot alter the login of 'domain\groupname', because it does not exist or
you do not have permissions.
If if try to enable the login via SQL Server Management GUI I get the same
exception.
Is this because it is not at all possible to alter the logins of windows
user groups? Or is it a bug in SQL Server?
I am running MS SQL Server 2005 SP1 (compatibility level 90).
The user I am executing the statement as is "sysadmin" on the server.
Thanks in advance.
Kind Regards,
Rune Jensen
ETIAFAIK you can only disable/enable logins that represent individual windows
accounts, not windows groups.
HTH,
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
"Server App" <aaa@.yes.dk> wrote in message
news:%23VF$pTC%23GHA.4376@.TK2MSFTNGP03.phx.gbl...
> Hi,
> I have problem with respect to "alter login" on Windows user groups
> (created
> via Active Directory).
> If I execute the statement "alter login [domain\groupname] enable" I g
et
> an
> exception saying (the exception also occurs with "alter login
> [domain\groupname] disable"):
> Msg 15151, Level 16, State 1, Line 1
> Cannot alter the login of 'domain\groupname', because it does not exist or
> you do not have permissions.
> If if try to enable the login via SQL Server Management GUI I get the same
> exception.
> Is this because it is not at all possible to alter the logins of windows
> user groups? Or is it a bug in SQL Server?
> I am running MS SQL Server 2005 SP1 (compatibility level 90).
> The user I am executing the statement as is "sysadmin" on the server.
> Thanks in advance.
> Kind Regards,
> Rune Jensen
> ETI
>
>

alter databse TestDB set TRUSTWORTHY on fails

Hi all,

When I try to execute the following command:

alter databse TestDB set TRUSTWORTHY on

I get this error:
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'databse'.
Msg 195, Level 15, State 5, Line 1
'TRUSTWORTHY' is not a recognized SET option.

Can someone tell me why?

Thanks in advance.

in which version u r executing this query, makesure that it is SQL Server 2005. I thing u r running it on SQL Server 2000. SQL 2000 does not support this Option.

Madhu

|||

Hi Madhu,

Thanks for the quick response, but there is no SQLServer 2000 on my PC or my laptop. My laptop has Win XP and SQL Server 2005, and my PC has Vista Ultimate, with SQL Server 2005. The command was executed in Management Studio, which SQL Server 2000 does no have.

Thanks.

|||

which edition of sql server u have. i suppose SQL 2005 express edition. in that case it has some limitation with regards to Service Broker. Check whether u can enable broker on database or not.

Ref the link also :

http://www.microsoft.com/sql/prodinfo/features/compare-features.mspx

See service broker, it says that it can only be a subscriber.

|||Standard edition. I see the "Trustworthy" option in database property, but it is disabled and set to False.|||

sobo1 wrote:

Hi all,

When I try to execute the following command:

alter databse TestDB set TRUSTWORTHY on

I get this error:
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'databse'.
Msg 195, Level 15, State 5, Line 1
'TRUSTWORTHY' is not a recognized SET option.

Can someone tell me why?

Thanks in advance.

oh... god it is typo error... it is Database not databse

alter databse TestDB set TRUSTWORTHY on

run this alter database TestDB set TRUSTWORTHY on

Madhu

|||

Hi Madhu,

Thank you so much for catching the typo. It is interesting that Management Studio faild to detect it, and instead, blamed it on something else.

Thank again, I really appreciate it.

|||

sobo1 wrote:

I get this error:
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'databse'.
Msg 195, Level 15, State 5, Line 1
'TRUSTWORTHY' is not a recognized SET option.

Can someone tell me why?

Thanks in advance.

SSMO has detected it and reported it correctly. but we did not notice that..

Madhu

|||

When I see the statement Incorrect syntax near 'databse'., I am thinking that the problem is near 'databse' and not 'databse' itself

ALTER DATABASE WITH ROLLBACK times out

If I execute the command ALTER DATASE SET MULTI_USER WITH ROLLBACK IMMEDIATE and there are any connections to the database, the command fails with a "Lock request time out period exceeded." message. If I use SET RESTRICTED_USER, the command succeeds with the following message: "Nonqualified transactions are being rolled back. Estimated rollback completion: 100%." This seems to be a bug.

What's even more annoying is that in SQL 2005 I could set MULTI_USER (using sp_dboption) even if there were active connections.I meant to say that in SQL 2000, the SET MULTI_USER option worked even if there were connections.|||I am experiencing the same issue and this causes major problems/delays with our batch cycle. Is thete any way to take a DB out of RESTRICTED mode without terminating connections like SQL 2000 did?|||

Dug around our bug database and found this is a known issue with SQL 2005. According to bug report the workaround is:


ALTER DATABASE pubs SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
ALTER DATABASE pubs SET MULTI_USER WITH ROLLBACK IMMEDIATE
GO

Have not tested this.

|||

Yes, the workaround works. It creates a slight window where people who should be able to connect to the database can't, but on the scale of incompatibilities introduced by SQL 2005, it's pretty minor.

A better question is why I can't go from restricted to multi_user without disconnecting people. OK, I know the answer - it was easier to code - but it really is a loss of functionality from earlier versions. Another quibble is that it really should be called WITH DISCONNECTION_IMMEDIATE, since that's what it really does.

ALTER DATABASE WITH ROLLBACK times out

If I execute the command ALTER DATASE SET MULTI_USER WITH ROLLBACK IMMEDIATE and there are any connections to the database, the command fails with a "Lock request time out period exceeded." message. If I use SET RESTRICTED_USER, the command succeeds with the following message: "Nonqualified transactions are being rolled back. Estimated rollback completion: 100%." This seems to be a bug.

What's even more annoying is that in SQL 2005 I could set MULTI_USER (using sp_dboption) even if there were active connections.I meant to say that in SQL 2000, the SET MULTI_USER option worked even if there were connections.|||I am experiencing the same issue and this causes major problems/delays with our batch cycle. Is thete any way to take a DB out of RESTRICTED mode without terminating connections like SQL 2000 did?|||

Dug around our bug database and found this is a known issue with SQL 2005. According to bug report the workaround is:


ALTER DATABASE pubs SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
ALTER DATABASE pubs SET MULTI_USER WITH ROLLBACK IMMEDIATE
GO

Have not tested this.

|||

Yes, the workaround works. It creates a slight window where people who should be able to connect to the database can't, but on the scale of incompatibilities introduced by SQL 2005, it's pretty minor.

A better question is why I can't go from restricted to multi_user without disconnecting people. OK, I know the answer - it was easier to code - but it really is a loss of functionality from earlier versions. Another quibble is that it really should be called WITH DISCONNECTION_IMMEDIATE, since that's what it really does.

ALTER DATABASE WITH ROLLBACK times out

If I execute the command ALTER DATASE SET MULTI_USER WITH ROLLBACK IMMEDIATE and there are any connections to the database, the command fails with a "Lock request time out period exceeded." message. If I use SET RESTRICTED_USER, the command succeeds with the following message: "Nonqualified transactions are being rolled back. Estimated rollback completion: 100%." This seems to be a bug.

What's even more annoying is that in SQL 2005 I could set MULTI_USER (using sp_dboption) even if there were active connections.I meant to say that in SQL 2000, the SET MULTI_USER option worked even if there were connections.|||I am experiencing the same issue and this causes major problems/delays with our batch cycle. Is thete any way to take a DB out of RESTRICTED mode without terminating connections like SQL 2000 did?|||

Dug around our bug database and found this is a known issue with SQL 2005. According to bug report the workaround is:


ALTER DATABASE pubs SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
ALTER DATABASE pubs SET MULTI_USER WITH ROLLBACK IMMEDIATE
GO

Have not tested this.

|||

Yes, the workaround works. It creates a slight window where people who should be able to connect to the database can't, but on the scale of incompatibilities introduced by SQL 2005, it's pretty minor.

A better question is why I can't go from restricted to multi_user without disconnecting people. OK, I know the answer - it was easier to code - but it really is a loss of functionality from earlier versions. Another quibble is that it really should be called WITH DISCONNECTION_IMMEDIATE, since that's what it really does.

Saturday, February 25, 2012

Alter a table all in C#

Is there a way to add a column to an existing table and do it all in C#

If my query string is as follows how do I execute the query?
ALTER TABLE interests ADD COLUMN Swim VARCHAR(1) NOT NULL DEFAULT('n')

Thanks
MoonWaYou could useExecuteNonQuery on a SqlCommand object.|||Thanks I got it working.

MoonWa

Sunday, February 19, 2012

Allowing a user to execute SProcs

Hi,
I have a database that I'm using which contains many stored procedures. The
only way I have been able to allow a particular user to execute the
procedure is to select that user, then open that users permissions, find the
table and go through the list of procedures one by one allowing the user the
execute permission.
Can someone let me know how I can just allow a user permission to execute
all stored procedures that exist, as well as any new ones that may be
created. Is their like a "Can Execute" permission and if so where can i find
it.
Thanks everyone
SimonHere's one idea:
http://vyaskn.tripod.com/generate_scripts_repetitive_sql_tasks.htm
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Simon Harvey" <simon.harvey@.the-web-works.co.uk> wrote in message
news:uYiTk9k8DHA.3012@.TK2MSFTNGP09.phx.gbl...
Hi,
I have a database that I'm using which contains many stored procedures. The
only way I have been able to allow a particular user to execute the
procedure is to select that user, then open that users permissions, find the
table and go through the list of procedures one by one allowing the user the
execute permission.
Can someone let me know how I can just allow a user permission to execute
all stored procedures that exist, as well as any new ones that may be
created. Is their like a "Can Execute" permission and if so where can i find
it.
Thanks everyone
Simon

Thursday, February 16, 2012

Allow users to run jobs

Is there a way to grant users (non SA's) to view and execute Jobs on
Sql Server 2000 and SQL Server 7 without granting SystemAdministrator
previleges?
Thanks
"shub" <shubtech@.gmail.com> wrote in message
news:1139255925.860677.80260@.g43g2000cwa.googlegro ups.com...
> Is there a way to grant users (non SA's) to view and execute Jobs on
> Sql Server 2000 and SQL Server 7 without granting SystemAdministrator
> previleges?
> Thanks
>
For multiple users, create a Role, add the users to the Role. Grant the
role all the permissions needed to execute all of the job steps. When you
create the job, set the job's owner = that role.
Rick Sawtell
MCT, MCSD, MCDBA
|||adding to ricks answer,
If a user who is not a member of the sysadmin role attempts to run a
job that includes jobs including CmdExec or ActiveScripting then job
steps will fail.
by default sysadmin role can execute CmdExec or Microsoft ActiveX=AE
scripting job steps
In this case you have to set up proxy account using
xp_sqlagent_proxy_account or
right click sql server agent--> properties-->job system-->
Regards
Amish Shah
|||And how exactly does one create a role? Is it a server wide role?
(Seems that those can't be changed), or a role in the MSDB database?
Also, it seems impossible to assign a role as an owner:
"[@.owner_login_name =] 'login'
Is the name of the login that owns the job. login is sysname, with a
default of NULL. Only members of the sysadmin fixed server role can
change job ownership."
Any more ideas? I like the solution, but it just doesn't seem to work!
-Sean
|||Also, when I try adding a MSDB role as an owner using TSql, I get:
Server: Msg 515, Level 16, State 2, Procedure sp_update_job, Line 217
Cannot insert the value NULL into column 'owner_sid', table
'msdb.dbo.sysjobs'; column does not allow nulls. UPDATE fails.
The statement has been terminated.
Any ideas?
Thanks!
-Sean

Allow users to run jobs

Is there a way to grant users (non SA's) to view and execute Jobs on
Sql Server 2000 and SQL Server 7 without granting SystemAdministrator
previleges?
Thanks"shub" <shubtech@.gmail.com> wrote in message
news:1139255925.860677.80260@.g43g2000cwa.googlegroups.com...
> Is there a way to grant users (non SA's) to view and execute Jobs on
> Sql Server 2000 and SQL Server 7 without granting SystemAdministrator
> previleges?
> Thanks
>
For multiple users, create a Role, add the users to the Role. Grant the
role all the permissions needed to execute all of the job steps. When you
create the job, set the job's owner = that role.
Rick Sawtell
MCT, MCSD, MCDBA|||adding to ricks answer,
If a user who is not a member of the sysadmin role attempts to run a
job that includes jobs including CmdExec or ActiveScripting then job
steps will fail.
by default sysadmin role can execute CmdExec or Microsoft ActiveX=AE
scripting job steps
In this case you have to set up proxy account using
xp_sqlagent_proxy_account or
right click sql server agent--> properties-->job system-->
Regards
Amish Shah|||And how exactly does one create a role? Is it a server wide role?
(Seems that those can't be changed), or a role in the MSDB database?
Also, it seems impossible to assign a role as an owner:
"[@.owner_login_name =] 'login'
Is the name of the login that owns the job. login is sysname, with a
default of NULL. Only members of the sysadmin fixed server role can
change job ownership."
Any more ideas? I like the solution, but it just doesn't seem to work!
-Sean|||Also, when I try adding a MSDB role as an owner using TSql, I get:
Server: Msg 515, Level 16, State 2, Procedure sp_update_job, Line 217
Cannot insert the value NULL into column 'owner_sid', table
'msdb.dbo.sysjobs'; column does not allow nulls. UPDATE fails.
The statement has been terminated.
Any ideas?
Thanks!
-Sean

Allow users to run jobs

Is there a way to grant users (non SA's) to view and execute Jobs on
Sql Server 2000 and SQL Server 7 without granting SystemAdministrator
previleges?
Thanks"shub" <shubtech@.gmail.com> wrote in message
news:1139255925.860677.80260@.g43g2000cwa.googlegroups.com...
> Is there a way to grant users (non SA's) to view and execute Jobs on
> Sql Server 2000 and SQL Server 7 without granting SystemAdministrator
> previleges?
> Thanks
>
For multiple users, create a Role, add the users to the Role. Grant the
role all the permissions needed to execute all of the job steps. When you
create the job, set the job's owner = that role.
Rick Sawtell
MCT, MCSD, MCDBA|||adding to ricks answer,
If a user who is not a member of the sysadmin role attempts to run a
job that includes jobs including CmdExec or ActiveScripting then job
steps will fail.
by default sysadmin role can execute CmdExec or Microsoft ActiveX=AE
scripting job steps
In this case you have to set up proxy account using
xp_sqlagent_proxy_account or
right click sql server agent--> properties-->job system-->
Regards
Amish Shah|||And how exactly does one create a role? Is it a server wide role?
(Seems that those can't be changed), or a role in the MSDB database?
Also, it seems impossible to assign a role as an owner:
"[@.owner_login_name =] 'login'
Is the name of the login that owns the job. login is sysname, with a
default of NULL. Only members of the sysadmin fixed server role can
change job ownership."
Any more ideas? I like the solution, but it just doesn't seem to work!
-Sean|||Also, when I try adding a MSDB role as an owner using TSql, I get:
Server: Msg 515, Level 16, State 2, Procedure sp_update_job, Line 217
Cannot insert the value NULL into column 'owner_sid', table
'msdb.dbo.sysjobs'; column does not allow nulls. UPDATE fails.
The statement has been terminated.
Any ideas?
Thanks!
-Sean

Sunday, February 12, 2012

All procedure in a stored procedure not being exec

I have a stored procedure that is called but it seems that not all the
Stored procedures are run. If I execute it the second time then they seem to
run after that.
Am I missing something, Like added a wait to finish clause?
Stephen K. Miyasato
MDsync
CREATE PROCEDURE FLG_UpdateFlags
/*Stored Procedure to update All the Flags*/
@.PatNo int
AS
--Put optional Flag procedures here
--
--Procedure to delete FOBT if Colonoscopy duedate is > todays or to be done
Exec FLG_FOBT @.PatNo
--procedure to delete old flags Set LastDate to Visit date in Vistal Signs
Exec FLG_OfficeVisit @.PatNo
-- Update Labs based on sort and ProtScr
Exec FLG_LabDateCholesterol @.PatNoStephen K. Miyasato (miyasat@.flex.com) writes:
> I have a stored procedure that is called but it seems that not all the
> Stored procedures are run. If I execute it the second time then they
> seem to run after that.
How do you conclude this? From where do you run the procedure? Have you
traced the procedure in Profiler to see what is going on?
The only thing I can guess on is that first time you run the procedure,
there is an error that causes the batch to be aborted, but this does
for some reason not happen when you re-run the procedure.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx