| Author |
Topic |
|
ricky_newbee
Posting Yak Master
126 Posts |
Posted - 2005-01-06 : 14:25:02
|
| All, I have small question. I am planning on moving a 6.5 database to 2000(Which is another box). I have column name as 'Function' in one of the talbes. Its a SQL Server Reserve Keyword and i am not sure if SQL 2000 whould accept it. Can any one has any ideas how i can Create table with 'Fuction' as column name. I cannot change Column name either, because there are numerous applications are accessing this table.Thanks,Rick |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-01-06 : 14:29:40
|
[code]create table blah ([function] int)insert into blahselect 1 union allselect 2 union allselect 3 union allselect 4select * from blahdrop table blah[/code]Go with the flow & have fun! Else fight the flow |
 |
|
|
ricky_newbee
Posting Yak Master
126 Posts |
Posted - 2005-01-06 : 14:58:31
|
| Thanks SpiritEvery time quering this table i need to say Select -,-,-,[function] from blah?. |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-01-06 : 15:00:43
|
unfortunatly yes...Go with the flow & have fun! Else fight the flow |
 |
|
|
ricky_newbee
Posting Yak Master
126 Posts |
Posted - 2005-01-06 : 15:09:07
|
| Spirit Thanks somuch!!!If we do not want to use [Function] in Query.The only option is to change Column name...Right? |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-01-06 : 15:11:11
|
yes.but changing Function to [Function] shouldn't be a problem. Find -> replace does wonders. Go with the flow & have fun! Else fight the flow |
 |
|
|
ricky_newbee
Posting Yak Master
126 Posts |
Posted - 2005-01-06 : 15:14:30
|
| But what my problem is, many apps are using these tables. I wonder how apps would handle this column? |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-01-06 : 15:20:04
|
you'd get "Incorrect syntax near the keyword 'function'." error message everytimeyou have select ..., function, ...from ...Go with the flow & have fun! Else fight the flow |
 |
|
|
ricky_newbee
Posting Yak Master
126 Posts |
Posted - 2005-01-06 : 15:22:22
|
| Thanks Spirit |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-01-06 : 15:26:03
|
no problem. hope you work it out...Go with the flow & have fun! Else fight the flow |
 |
|
|
|