By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,660 Members | 1,953 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,660 IT Pros & Developers. It's quick & easy.

rejected table name in add column quary

P: 47
when i use this quary to add new column, the engine reject the table name and focus on (-) in the table name


alter table AH10-A1*1*1-101006 add column sss

note: this schema of table name (AH10-A1*1*1-101006 ) is applied on 500 table so it is defficult to change the tables name
Dec 24 '07 #1
Share this Question
Share on Google+
4 Replies


missinglinq
Expert 2.5K+
P: 3,532
How exactly does it "reject the table name?" While having asterisks may cause problems in SQL (they have special meaning) I see what I think is another problem.

SQL is not my forte, but to add a column to an existing table, the ALTER TABLE syntax should be:

ALTER TABLE TableName
ADD ColumnName ColumnDefinition;

For example:
ALTER TABLE YourTableName
ADD YourNewFieldName text(150);

You have

alter table AH10-A1*1*1-101006 add column sss

I'm guessing that you're not trying to add a column named column, but rather one named sss, and that you don't have a ColumnDefinition (Datatype/field size) at all.
Linq ;0)>
Dec 25 '07 #2

P: 47




try to download this attachment
Dec 25 '07 #3

nico5038
Expert 2.5K+
P: 3,072
Please post the SQL text.

Nic;o)
Dec 25 '07 #4

missinglinq
Expert 2.5K+
P: 3,532
Two points, Ahmed:

You posted this problem yesterday and then posted a second thread on it today! Double-posting is strictly prohibited on this site; please refrain from doing so in the future. I've now merged the two threads.

There was no attachement with your last post. Itís a rather convoluted process here, I'm afraid, but BartonC posted a concise explanation:

"In order to attach large source files to your contributions, you need to create a post, submit it and then edit it. You'll have 5 minutes to scroll down to the bottom of the > Edit Post page and click "Manage Attachments". The file must already have an acceptable extension . The Manage Attachments page will open giving a "Browse" button to find the file on your computer with. Don't forget to hit the "Upload" button after selecting the file. "

Linq ;0)>
Dec 25 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.