hi
this is my problem :
SELECT * INTO Sales FROM Sales1 WHERE 0=1 ON [MyFG1]
the problem is in filegroup MyFG1, rest works fine
So if anyone can help, i'd like it to work this way, to copy only first column names from Sales1 to Sales but in this filegroup.
thanx ;)
[select into] does not allow you to specify the filegroup for the new table. The new table will get created in the DEFAULT filegroup for the database. So, you have a few options:1. run alter database and reset the default fg.
2. create a clustered index on the table on the desired fg.
3. create the table first on the desired fg then do insert/select.|||
Can you please write me the code.. fot point 1. from your comment
The wole idea of me asking this is that i need to create a new table that has same column names as some table i have, on some firlegroup, but i cannot use specification of those names, i just need to copy them to this new EMPTY table.
thanx
|||i have some idea like this :
CREATE TABLE NewTable ( something here to copy just column names) ON [MyFG1]
usually when column names are sfpecfied this works normally, but as i said i have to copy them from some table not specify, so if anyone knows how to fill this part in barckets please tell me
thanx a lot
|||ok i made it
thanx
No comments:
Post a Comment