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 |
|
Sun Foster
Aged Yak Warrior
515 Posts |
Posted - 2010-05-18 : 09:13:30
|
| I need to declare a table variable from another existing table.If I use "Script table as" will create table variable with [], likeCREATE TABLE [dbo].[CLAIM]( [CLAIMNO] [varchar](20) NOT NULL, [ACCT] [varchar](4) NOT NULL,....Is there a function can return script without [ ]? |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2010-05-18 : 09:23:43
|
| Use replace() functionselect replace(replace('CREATE TABLE [dbo].[CLAIM]([CLAIMNO] [varchar](20) NOT NULL,[ACCT] [varchar](4) NOT NULL,','[',''),']','')Senthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceledhttp://senthilnagore.blogspot.com/ |
 |
|
|
Sun Foster
Aged Yak Warrior
515 Posts |
Posted - 2010-05-18 : 09:30:29
|
| Is there a function to pass the existing table will return all script without [ ]? |
 |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2010-05-18 : 09:31:42
|
| if you want, write your own function!Senthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceledhttp://senthilnagore.blogspot.com/ |
 |
|
|
|
|
|