Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All
below is my store procedure i want to create table and insert the value from lable in the table
so pls let me know is this right?
SQL
CREATE TABLE #tbl_tablenames(
    [tableID]        int IDENTITY(1,1) NOT NULL,	 
    [Scriptid]        [INTEGER]    NULL,
    [ClientTblname]             [varchar](30)       NOT NULL,       
    [IntellectTblname]             [varchar](30)             NOT NULL,       
)
go

CREATE PROCEDURE [dbo].[sp_importStats]
	-- Add the parameters for the stored procedure here
	@lblMySqlTableNameClient.text,
	@lblSqlTableName.text,
	
AS
BEGIN
	
SET NOCOUNT ON;
 INSERT INTO [#tbl_tablenames] ([ClientTblname])([IntellectTblname]) 
 VALUES (@lblMySqlTableNameClient.text,@lblSqlTableName.text,)
END
GO
Posted
Comments
ravikhoda 11-Feb-14 5:32am    
what is your issue ?
Arjunwalmiki 11-Feb-14 6:07am    
i want to save 2 lable.text value in the Atable and also want to save Btable id in the Atable.

1 solution

i have done this and problem was solved


SQL
use tempdb
go
drop table #TableNamesStore

go
CREATE TABLE #TableNamesStore(
    [tableID]        int IDENTITY(1,1) NOT NULL,	 
    [Scriptid]        [INTEGER]    NULL,
    [ClientTblname]             [varchar](30)       NOT NULL,       
    [IntellectTblname]             [varchar](30)             NOT NULL,       
)
go

CREATE PROCEDURE storetablename
(
	-- Add the parameters for the stored procedure here
	@ClientTblname varchar(30) ,
	@IntellectTblname varchar(30)
)	
AS
BEGIN
	
SET NOCOUNT ON;
 INSERT INTO [#tbl_TableNamesStore] (ClientTblname,IntellectTblname) 
 VALUES (@ClientTblname,@IntellectTblname)
END
GO
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900