473,326 Members | 2,128 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Alter table alter column in MSACCESS. How can I do it for a decimal field?

Hi people,

I?m trying to alter a integer field to a decimal(12,4) field in MSACCESS 2K.

Example:
table : item_nota_fiscal_forn_setor_publico
field : qtd_mercadoria integer NOT NULL

ALTER TABLE item_nota_fiscal_forn_setor_publico
ALTER COLUMN qtd_mercadoria decimal(12,4) NOT NULL

But, It doesn't work. A sintax error rises.

I need to change that field in a Visual Basic aplication, dinamically.

How can I do it? How can I create a decimal(12,4) field via script in MSACCESS?

Thanks,

Euler Almeida

--
Message posted via http://www.sqlmonster.com
Jul 23 '05 #1
1 6261
Euler Almeida via SQLMonster.com (fo***@SQLMonster.com) writes:
I?m trying to alter a integer field to a decimal(12,4) field in MSACCESS
2K.

Example:
table : item_nota_fiscal_forn_setor_publico
field : qtd_mercadoria integer NOT NULL

ALTER TABLE item_nota_fiscal_forn_setor_publico
ALTER COLUMN qtd_mercadoria decimal(12,4) NOT NULL

But, It doesn't work. A sintax error rises.


I didn't not get any syntax error. Then again, I tried this on SQL Server,
since SQL Server is the focus for this newsgroup.

If you are working with an Access database, you are better of in an
Access newsgroup like comp.databases.ms-access.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Darin | last post by:
I have many columns in different tables set to money. I want to change those to be decimal(18,2). I do the following: ALTER TABLE AROpenItem ALTER COLUMN copn_taxamt decimal(19,2) I get an...
2
by: Prabhat | last post by:
Hi All, Suppose I have a Float Column with a Default Value with that Column. What is the Best way to Change the Column Type to Decimal (18,2) ? Ex:- Create Table EMP ( EmpID Int ...
5
by: minjie | last post by:
Is it possible to run a simple script to alter a table column in Access database from an interger to a double? I have been writing C++ programs every time we need to upgrade (modify) the Access...
2
by: Alan Mailer | last post by:
I'm sorry if this one has been asked and answered a million times: Is it possible to have a VB6 app alter the name of an *existing* field in Access 2002 database? To be clear, I'm not talking...
1
by: vasilip | last post by:
I'm testing out db2 for a project I'm starting that requires proper xml support and I can't seem to get both xml and spatial data to work well in the same table. Once having created a table...
3
by: sparks | last post by:
several months ago I was trying to set the field size of text fields in a table and Lyle Fairfield was nice enought to post a way using alter column. it was surprising since it was ALTER COLUMN...
2
by: goyosito | last post by:
I'm working with DB2 ver. 8.x and I'm trying to change the precision of decimal(10) to decimal(20). My script is: ALTER TABLE xyz ALTER COLUMN campo SET DATA TYPE DECIMAL(20, 0); but I got...
4
by: JenavaS | last post by:
I am trying to create a macro to change a data type in a column. The table was created using a "make-table" query, and the column(s) I want to modify were created using a calculation in my query. ...
1
by: Chris | last post by:
Hi, I am trying to run the following SQL through the DB2 command line for version 9.1.0: alter table SCHEMA.TABLE1 drop column A; alter table SCHEMA.TABLE2 alter column B set data type...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.