User Profile

Collapse

Profile Sidebar

Collapse
ssrajpal2001
ssrajpal2001
Last Activity: Oct 26 '07, 06:33 PM
Joined: Oct 13 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • ssrajpal2001
    started a topic Schema in server

    Schema in server

    the procedure goes like this
    CREATE PROCEDURE createschema

    @schema_name varchar(30)

    AS

    declare @Schema_Tables nvarchar(300);

    BEGIN


    SET @Schema_Tables= N'Create schema '+ @Schema_Name

    EXEC sp_executesql @Schema_Tables

    SET @Schema_Tables= N'CREATE TABLE '+@Schema_Name+ '.UserGroup('



    SET @Schema_Tables= @Schema_Tables+ N'Group_id...
    See more | Go to post

  • ssrajpal2001
    replied to select query
    thanks for the reply but the thing is
    schema name is not fixed it may change i.e this procedures will be called n number of times with different schema names
    See more | Go to post

    Leave a comment:


  • ssrajpal2001
    started a topic select query

    select query

    [CODE=sql]create procedure [sp_LoginUser]
    --inputparameter------------------------------------------------------------------------------
    @User_id varchar(50) ,
    @SendPassword varchar(50) ,
    @Schema_name varchar(50) ,
    @dbpassword varchar(15) output,
    @Department varchar(20) output

    as
    declare @sql Nvarchar(300);
    declare @id int;

    begin transaction
    set @sql=N'select...
    See more | Go to post
    Last edited by debasisdas; Oct 14 '07, 02:35 PM. Reason: Formatted using code tags.

  • ssrajpal2001
    started a topic Creating schemas

    Creating schemas

    hello expert
    problem is
    i am using mssql 2005 and i have created a procedure that will create schema and tables under that schema
    procedure name is "createschema(< schema_name>) .
    code is
    SET @Schema_Tables= N'Create schema '+ @Schema_Name
    EXEC sp_executesql @Schema_Tables
    this creates schema but when create table is encountered
    code:
    SET @Schema_Tables= N'CREATE TABLE '+@Schema_Name+ '.UserGroup('...
    See more | Go to post
No activity results to display
Show More
Working...