Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sarvan
Starting Member
4 Posts |
Posted - 2008-05-30 : 02:54:14
|
| Hi all, Our Application is made to work with different database. I have a few query 1. There is option of restoring for only table, the tables can be mention during runtime, how to acheive same in sql 2. During restoring if already same data exists, it throws an exception , based on the exception we display the message data already exist. In sql any option is available to check the data exist or not 3. Can sql create the column during runtime. Thanks |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2008-05-30 : 03:04:44
|
| 1. No - unless it has it's own filegroup.2. Do you mean the database already exists? Is there a question here?3. Yes you can create a column. See "alter table add" in bol.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
sarvan
Starting Member
4 Posts |
Posted - 2008-05-30 : 03:23:37
|
| Thnks for ur reply.1. Is any work around is available to achieve it.2. Database exists. 3. Column should be passed as parameter. Or the column can be extracting from existing table. |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-06-03 : 00:39:43
|
| For first one, there's no work around unless you restore whole db and copy the table over. |
 |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2008-06-03 : 03:28:14
|
| 1) Some 3rd party tools like SQLBackup from Red-Gate and LiteSpeed from Quest support this, but it's really not recomended to restore over the production table on-the-fly. What you should do is restore the table to a temporary table and copy the data manually. 2) Confused about this one...3) Columns can be added to a table on the fly like this "ALTER TABLE tablename ADD ColumnName VARCHAR(100) NULL" but I don't see what this has to do with restore...--Lumbago |
 |
|
|
|
|
|