473,404 Members | 2,213 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,404 software developers and data experts.

Append Import Accept Null Values

What do I need to do to allow an append query to post null values to
records in a field of the destination table? Basically I want to allow
records with null values to post to the table. The append query will
not work unless there are values in the data i am attempting to send.
I want the fields in the destination table to accept null and
populated values. Any help here would be gladly accepted.

thanks
Nov 13 '05 #1
3 3988
You can't override the definition of the destination table. Perhaps you need
to create a temporary table into which you append the records, which does
not have those restrictions. If I have misunderstood your situation, please
post here to clarify.

Larry Linson
Microsoft Access MVP

"JOEP" <jp******@ibtco.com> wrote in message
news:d4************************@posting.google.com ...
What do I need to do to allow an append query to post null values to
records in a field of the destination table? Basically I want to allow
records with null values to post to the table. The append query will
not work unless there are values in the data i am attempting to send.
I want the fields in the destination table to accept null and
populated values. Any help here would be gladly accepted.

thanks

Nov 13 '05 #2
Did that and now want to insert a given value for the null values
while running the append query. Is it better to use the Nz function of
an IIf statement. Basically I want to insert "NA" for all null values.
Can I insert anything other than "0" when using the Nz function?

Would I write the function Nz([fieldname].[Queryname], valueifnull])?
Insert the function into the field row in the query design view, e.g.
strFundNumber:Nz([strFundNumber].[Queryname], NA])?

I am running into null values in the strfundnumber, strclientacct and
strfundgroup appended data which cause the records to not append to
the destination table. All the fields layouts are the same from the
query fields to the destination table fields. But if the records have
null values in the data coming from the fields above the append fails.

my SQL is below...if that helps

INSERT INTO tblTransactions ( strFundNumber, strclientacct,
strTransactionDescription, datTradeDate, dblBasePrincAmt,
dblShareAmount, dblBasePrice, strFundGroup, dblLocalNetAmt,
strBrokerName, blnExcludeTransaction, dblLocalCommissnAmt,
intClassActionID )
SELECT QryselectWellsPortData.strFundNumber,
QryselectWellsPortData.FundGroupNumber, QryselectWellsPortData.TYPE,
QryselectWellsPortData.TradeDate,
QryselectWellsPortData.BasePriceAmount,
QryselectWellsPortData.ShareAmount, QryselectWellsPortData.BasePrice,
QryselectWellsPortData.strFundGroup, QryselectWellsPortData.loclamt,
QryselectWellsPortData.brk, QryselectWellsPortData.exclud,
QryselectWellsPortData.locnetamt, [enter ClassActionID] AS CAID
FROM QryselectWellsPortData;

"Larry Linson" <bo*****@localhost.not> wrote in message news:<2KXfd.6437$8R.5304@trnddc02>...
You can't override the definition of the destination table. Perhaps you need
to create a temporary table into which you append the records, which does
not have those restrictions. If I have misunderstood your situation, please
post here to clarify.

Larry Linson
Microsoft Access MVP

"JOEP" <jp******@ibtco.com> wrote in message
news:d4************************@posting.google.com ...
What do I need to do to allow an append query to post null values to
records in a field of the destination table? Basically I want to allow
records with null values to post to the table. The append query will
not work unless there are values in the data i am attempting to send.
I want the fields in the destination table to accept null and
populated values. Any help here would be gladly accepted.

thanks

Nov 13 '05 #3
I wouldn't recommend doing that. You can FORMAT a null value any way
you want in your report. Or you can substitute a value if you use
IsNull(varSomeValue).

Null in Access does NOT mean "NA" to the database engine. But if you
wanna rape you data, use and update query or a series of them to
update each field or whatever.
Nov 13 '05 #4

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

Similar topics

3
by: waters | last post by:
I seem to have hit a snag. I am trying to add the list (l_local) as an item in the output list (l_output). "l_local" is a modified copy of the format-list "l_format", which will be updated by...
4
by: Larry Rekow | last post by:
In Access I have a macro that, each night, takes a table with a primary key defined in it, and deletes all the rows. Then it imports/appends records from a fixed width text file. In this way,...
1
by: David Barger | last post by:
Greetings, It appears that an Append Query I run in Access XP is randomly failing to append a field. I have payroll data being entered into a payroll database. This data is exported daily to...
26
by: John Salerno | last post by:
If I want to create a list of the form (where each item is repeated twice after the first one), how might I do that most efficiently? Right now I have this: series = for x in range(10): ...
4
by: MN | last post by:
I have to import a tab-delimited text file daily into Access through a macro. All of the data needs to be added to an existing table. Some of the data already exists but may be updated by the...
2
by: madeleine | last post by:
I'm hoping the answer to this is that I'm just doing something silly, but I'm really scratching my head over this one. I'm importing data from multiple workbooks, each workbook has a sheet called...
4
by: pmacdiddie | last post by:
I have an append query that needs to run every time a line item is added to a subform. The append writes to a table that is the source for a pull down box. Problem is that it takes 5 seconds to...
6
by: Romulo NF | last post by:
Greetings again to everyone, Im back to show this grid componenet i´ve developed. With this grid you can show the data like a normal table, remove the rows that you need, add rows, import data,...
4
by: Scott12345 | last post by:
Hi, here is my situation, I have a DB that tracks machine downtime (30 machines) per day. Several users will update this through the day. I created an append query that creates 30 dummy values and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
jinu1996
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.