1 SP Splitted Into 12 Sub SPs
Dec 12, 2006I splitted 1 big SP into 12 Sub SPs. Is that something common?
the 1 big SP was too big and confussing.
I splitted 1 big SP into 12 Sub SPs. Is that something common?
the 1 big SP was too big and confussing.
Hi,
I have two same database with 15 tables, one in office and another is in home. Sometimes i work at office and at home so data is splitted into different places. If i work at office and i bring this database to home and copy all the tables records by using the following one:
INSERT INTO Test1.DBO.Employee
SELECT t2.*
FROM Test2.DBO.employee t2
LEFT OUTER JOIN Test1.DBO.employee t1
ON t2.eno = t1.eno
WHERE t1.eno IS NULL
Every time i change the tablename and execute the statement.
Could you suggest me what is the better option for me.
Is there any way just like count the number of tables in the database and transfer records automatically into the table one after the other. Is it possible to through stored procedure.
Recommend me what should i need to do.
Thanks.
Best Regards
Kashif Chotu
I am having staging table with separted by '¯'.I want to split the data with given number .i have given 31 means my main table have 31 column. it should handle the less or more column.
declare @TempTable as Table (Id int identity, sampleData nvarchar(500))
insert into @TempTable (sampleData)
select 'B¯080623719¯¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯Y¯ ¯ ¯ ¯ ¯Y¯Y¯ ¯' union all
select 'B¯106618392¯¯ ¯ ¯ ¯Y¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯'
[code]....
I should restore a SQL Server 2005 Database from backup. The backup contains three files, named user.bak0, user.bak1 and user.bak2.
How is the syntax of the restore filelistonly and the restore database ... ?
I usualy write
restore filelistonly from disk = 'path and filenam.bak'
restore database. zy
from disk = 'path and filename.bak'
with replace,
move.....
move....
This works but I cannot use it with a splitted backup file. The files are much too big to put together to one file.
Thanks in advance for any help.