Hi people,
I?m trying to alter a integer field to a decimal(12,4) field in MSACCESS 2K.
Example:
table : item_nota_fisca l_forn_setor_pu blico
field : qtd_mercadoria integer NOT NULL
ALTER TABLE item_nota_fisca l_forn_setor_pu blico
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 1 6320
Euler Almeida via SQLMonster.com (fo***@SQLMonst er.com) writes: I?m trying to alter a integer field to a decimal(12,4) field in MSACCESS 2K.
Example: table : item_nota_fisca l_forn_setor_pu blico field : qtd_mercadoria integer NOT NULL
ALTER TABLE item_nota_fisca l_forn_setor_pu blico 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****@sommarsk og.se
Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinf...2000/books.asp This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 error:
The object 'DF__AROpenIte__copn___4D94879B' is dependent on column
|
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 Identity(100, 1),
|
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 database, but found
it cumbersome. I know I can change database definition via Access GUI
interface itself, but if the database is at a remote site, and if I
don't want the users to mess around with the database by themselves,
then I have to...
|
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 about adding a
new field to the Access database. I want to change the name of an
*existing* field using a VB6 app.
What type of VB6 code would you use to do this? And please, if your
suggestion involves using Project References other than...
|
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 containing both xml and spatial data fields
I can't seem to find a way to alter the table
I have created a table containing an id, xmldata field and a ST_Point
If I try to drop the xml field with ALTER TABLE TEST DROP COLUMN
| |
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 f5 Text(250)
WHERE in the world can I find the a listing of the different things
that can be done with this?
|
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 this error:
DB2 SQL error: SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: ALTER TABLE xyz
ALTER COLUM;BEGIN-OF-STATEMENT;<values>
|
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. Therefore, the data in the column has a lot of numbers after the decimal.
I could go into the table's design view and change the decimals from Auto to 2, and the format to Percent, however I would like this to happen automatically after the...
|
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 decimal(15,4);
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |