Ask a Question related to ASP Database, Design and Development.
-
dave #1
simple stored procedure
Hi there!!
I want to try stored proceudre that copies one field data
from table1 to table2..
Can any one suggest how to write? I searched on net but
no success yet...
Thanx
dave
dave Guest
-
stored procedure help
Hi all! I am in need of writing a few stored procedures. The first one is to create a stored procedure to recover a database from backup and the... -
Using a stored procedure
I am trying to pass a ProdID to a stored procedure, but I get an error: Error Executing Database Query. Procedure 'PriceBreak' expects... -
Simple Stored Procedure Error
CREATE PROCEDURE sp_magazine_sections @magazine_id INT, @magazine_section_id INT as IF @magazine_section_id is not null BEGIN SELECT ... -
Stored procedure?
Stored procedure ?? -- Message posted via http://www.dotnetmonster.com -
need help on a stored procedure
I have 2 tables. table1 and table2 I do a select on table1 and join table 2 on id. I want to check newprice in table1. if it is null, I want to... -
Jeff Cochran #2
Re: simple stored procedure
On Mon, 5 Apr 2004 22:46:43 -0700, "dave"
<anonymous@discussions.microsoft.com> wrote:
Books online has all this, assuming you used MS SQL Server.>I want to try stored proceudre that copies one field data
>from table1 to table2..
>
>Can any one suggest how to write? I searched on net but
>no success yet...
Jeff
Jeff Cochran Guest
-
Bob Barrows [MVP] #3
Re: simple stored procedure
dave wrote:
Is this what you want?> Hi there!!
> I want to try stored proceudre that copies one field data
> from table1 to table2..
CREATE TABLE table1 (col1 int)
go
INSERT INTO table1 VALUES(2)
INSERT INTO table1 VALUES(3)
go
CREATE TABLE table2 (col1 int)
go
CREATE PROCEDURE CopyRows AS
INSERT INTO table2 (col1)
SELECT col1 FROM table1
go
exec CopyRows
Select col1 from table2
go
drop procedure CopyRows
drop table table1
drop table table2
If not, perhaps you should provide some more details ...
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Bob Barrows [MVP] Guest



Reply With Quote

