TAble Insert

I have a person table that has id, firstname, lastname, address, city, state, 
zip. I have set all fields except id to have required = no and allow zero 
length = yes. But when I try the following query it will not insert the 
record because the firstname is not filled out. Any ideas?

INSERT INTO person ( id, lastname, firstname, address, city, state, zip )
VALUES (1783, 'Hacienda La Daniela', '', '5310 SW 192 Avenue', 'Sw Ranches', 
'Fl', '33331');
0
Utf
2/9/2008 7:08:01 PM
access.queries 6343 articles. 1 followers. Follow

1 Replies
671 Views

Similar Articles

[PageSpeed] 7

Try inserting Null instead of a zero-length string:

INSERT INTO ...
VALUES (1783, 'Hacienda La Daniela', Null, '5310 SW 192 Avenue', ...

More info about how to handle nulls:
    http://allenbrowne.com/casu-12.html

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Dale" <Dale@discussions.microsoft.com> wrote in message
news:83CAE87F-940D-4876-8333-0482969649D4@microsoft.com...
>I have a person table that has id, firstname, lastname, address, city, 
>state,
> zip. I have set all fields except id to have required = no and allow zero
> length = yes. But when I try the following query it will not insert the
> record because the firstname is not filled out. Any ideas?
>
> INSERT INTO person ( id, lastname, firstname, address, city, state, zip )
> VALUES (1783, 'Hacienda La Daniela', '', '5310 SW 192 Avenue', 'Sw 
> Ranches',
> 'Fl', '33331'); 

0
Allen
2/10/2008 3:52:22 AM
Reply:

Similar Artilces:

Combobox for Table, From Table
Hi, The online help function tells me I cant make a combobox which finds its entries from a table and stores its entries in the same table. I want users to be able to enter areas where clients live. The combobox needs to fill the Area column in the appropriate table. But I want the combobox to be filled with previous entries from the same column, with the provision that a new entry can be made. The project is expanding thats why I need this. Or do I need to make an extra table with areas that can be filled with a separate command, which is then used as a source for the com...

pivot table again
i have a range of fields in a pivot table some are qty others are value how can i split the table into two seperate sections one showing qty and the other showing values (if that makes sense) If your quantities and values are in the same column, you'd need to use a "helper column" that differetiates them (Qty vs Amt) Then you can include that field in the pivot table before tha field containing the quantities and amounts. Does that help? *********** Regards, Ron XL2002, WinXP "max power" wrote: > i have a range of fields in a pivot table some are qty other...

Data table in chart?
This is a multi-part message in MIME format. ------=_NextPart_000_01A9_01C69782.28506D60 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have some line chart portraying responses to 20 items. I would like to put a table under each chart the shows the value of not = only the responses that are charted but also the percentage difference = between the two. My problem and the question is that if I use the 'data table' option in = creating the chart the row with the difference is not there. Then if I = try to paste a table under ...

Copy data from on table to another ?
I have lost a lot of data in my backend, but it is only data from a few columns, in one tabel, that I have lost. My tabel is called taCustemor, and the columns in that table is called fakFirm, fakAdress. I have use a custemornumber as a primarykey. So now I want to copy only these columns from my backup of the backend to my backend in use. I'm sure that I can do this buy using SQL, but I'm not sure how to make this querie. Can some one out there help me ? You want to use an append query. See Help file for info. In the database where you want the data to be when you're done, ...

Landscape Table on Portrait Page
Is it possible to create a landscape table on a portrait page, i.e. a page with a normal portrait header and footer? I am aware that one can change the text direction of each cell in the table to simulate a landscape table, but I would like to know if there is not an easier way. See http://word.mvps.org/FAQs/Formatting/LandscapeSection.htm -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Johann Swart" <JohannSwart@discussions.microsoft.com> wrote in message news:1119FBC3-2001-48C7-B02E-07D85C7F444E@mic...

Inserting an event procedure into sheet code
I have the following code that adds a combo box to the ActiveCell in the ActiveSheet and creates the event procedure for it in the ActiveSheet as well. It all works fine, except that after it completes, you are dropped down into the VBE for no apparent reason. No errors have occcurred. Anyone seen this before? The code is below: Sub buildcombo() Dim combo As OLEObject Dim LineNum As Long Dim CodeMod As Object ' Create the combo box on the ActiveCell on the ActiveSheet Set combo = ActiveSheet.OLEObjects.Add(classtype:="Forms.ComboBox.1", Link:=False, Disp...

Where is tables in reports
Is there anyway to get tables into reports? If there is none then is there a work around. The forms I have to make use many block cells. In word tables makes things easy. ...

Inserting Pagebreaks every 40 lines...
Hello all, I'm looking to find a way to simply insert pagebreaks every 40th row. Is there a way to do this programatically? Any assistance would be much appreciated. Thanks. Hi Trevor: Not elegant but it works: Sub Macro1() ' Macro recorded 19/01/2004 by Bernard Liengme Range("A41").Select For j = 1 To 100 ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell ActiveCell.Offset(rowOffset:=40, columnOffset:=0).Activate Next j End Sub You really need to locate where the last used row is, bit this will get you going. -- Bernard Lieng...

Ensuring only one commission per product in Access Table
Good afternoon, Please can someone help me. In my Access Database I have a table called tblCommission, with the fields: Commission_ID;Client_account; Product_code; Commission; Exchange (£ or $) I need a method to ensure that each client can have a commission set for every product - but that a client cant have to commission's for one product: eg: I need a method to prevent this: Comm_ID Client_account Product_code Commission Exchange 1 000001 Coke 3 $ 2 000001 Coke ...

Table Expert
When a case is resolved, there is a dropdown to select the amount of "Billable Time" for the case. I have searched tables but cannot find where this data is stored. Is there anyone that know the schema where this data is kept? Bryon, When you resolve a case, the resolution screen fields are added into the activity table as a resolution type of activity. The Billable Time value appears in the TimeSpent field. (While building my auditing application, VAST, I've had to become much more of a CRM schema expert that I ever wanted to be - by the way, you can see these reso...

Recreating HR tables
I've been having some problems with HR. I've had to create some tables so the program would run. I simply copied the tables from another compagnie where is was saying I had missing tables. I'm wondering if there is a list of Tables for HR and Canadian Payroll or if it were possible to recreate these missing tables another way? I currently have this error as well: Could not find stored procedure 'Compagnie.dbo.hrCompDoesHrCompExist' ...

How do you create a table with a shaded header in Word 2007 or 201
Hi.. Can anybody tell me, how you create a table, and then shade the first row in it to something like gray, then set the grid lines to gray or something, and maybe set the alignment in it to centered... This is 2007 or 2010, not 2003 in which it was possible to do so. Thanks. Select the first row of the table and then right click with the mouse and select Borders and shading. For the alignment, select and right click and select Cell alignment -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting ba...

Pivot table subtotals 100% #2
This is what I am aiming for but how can I get 100% in subtotals for first year and the increase %age for the second and subsequent year please 2002 2003 Apples excellent 15 22.72% 16 24.23% good 21 31.82% 25 37.88% poor 30 46.46% 39 60.39% 66 100% 80 122.5% Greens excellent 12 17.65% 37 54.42% good 27 39.70% 51 74.98% poor 29 42.65% 47 69.12% ...

Table info
In Vendor Maintenance window , there are multiple Address ID's. In which table i can find this information. Great Plains 7.5 Thanks in advance Deepwater, PM00300 holds all the address information for each address ID. -- Victoria Yudin Dynamics GP MVP Flexible Solutions - home of GP Reports http://www.flex-solutions.com/gpreports.html "Deepwater" <Deepwater@discussions.microsoft.com> wrote in message news:F9296B22-2B44-4D64-9E3C-DC5FE4B07028@microsoft.com... > In Vendor Maintenance window , there are multiple Address ID's. In which > table i can find this...

Extender tables #2
Hello! We are implementing an integration from Microsoft CRM into Microsoft Great Plains and this would include writing CRM fields to Extender Fields. Are there any available SDK's for Extender or maybe any table lists? Thanks, Andi Saldana There are but I think only partners can get them. Please send me a message and I'll send you what I have. "Andi Saldana" wrote: > Hello! > > We are implementing an integration from Microsoft CRM into Microsoft Great > Plains and this would include writing CRM fields to Extender Fields. Are > there any avai...

how to insert numbers/letters in a chart
how to write or label point once chart has been created. Vijay, There are several ways . . . (1) When you build a chart using the Chart Wizard, the Wizard gives you several options to label a heading, X and Y axis, as well as a data labels option. (2) If the chart is already built, you can do the same as described in 1 above by clicking on the chart, going to the standard toolbar and clicking on Chart -> Chart Options. (3) You can apply labels via the text box option in the drawing toolbar. (4) You can insert numbers and/or letters by modifying the source range for the underlying...

Pivot Table Axis format
Hi. I have a macro that creates a pivot-table and pivot chart. The X-axis is a date. In the raw data, the date is formated as month/day. This is the way I want it on the chart. However, the X-axis formats with month/day/year. How can I force this to display correctly? Thanks, Mike. Do you see a grey little dropdown under the X axis (where you can choose your dates to show)? If yes, then rightclick on it. Select the top option: "Format pivotchart field" then click on the Number button on the next dialog. There are a bunch of date formats that you can choose from. Maybe...

VB code to insert/get data
Hi where can I find information and examples about inserting data to databse and getting from DB to excell ? As far I know I need to use VBA code ? regards Peter Hi Peter you can also query a database via data / get external data / new database query option ... and use MS Query to set criteria etc - unfortunately i'm not aware of any websites that have a write up on this. Cheers JulieD "Piotr" <hokah@wp.pl> wrote in message news:d11h2e$ohe$1@inews.gazeta.pl... > Hi where can I find information and examples about inserting data to > databse and getting from DB...

Inserting table to other table
I have a form which consists of a table. I want to insert some selected value into other table when i update and at the same time I want it to save into my own table too... May I know the way please..... -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200704/1 I'm having trouble visualizing your situation. Could you provide an example of data? -- Regards Jeff Boyce Microsoft Office/Access MVP http://mvp.support.microsoft.com/ Microsoft IT Academy Program Mentor http://microsoftitacademy.com/ Microsoft Registered Partner http...

Pivot Table not sorting correctly
In column A I have several of the same names listed more than once spelled exactly the same but when these line are pulled into a pivot table each is displayed seperately. I followed the same exact procedure for this table as I have for the others that I displayed correctly. What causes those lines to be displayed on separate lines? Perhaps some of the entries have space characters at the end, and others don't. Marian wrote: > In column A I have several of the same names listed more than once spelled > exactly the same but when these line are pulled into a pivot table each ...

table to new table
hi thanks for your time and help i have an access table which is an automatic update so its data is constantly changing but the fields stay the same. i need to be able to transfer the data at the click of a button from the linked table into an access table without deleting the data already stored in the main table. i have tried looking at the transfer spreadsheet but this does not work. thanks for the help hi, Rivers wrote: > i have an access table which is an automatic update so its data is > constantly changing but the fields stay the same. > i need to be able to transfer...

Pivote table adding Fileds
Dear All Happy new year I had creat pivote table on table that was exported from Access (it was exported from query that based on relation beteen tabled ) ,if i make refreshing data on the same filds the new data will be refrexhed withot any problem , but when i add new filds in the query and exported again (with the same name and the same orginal fields but with one or two more additional fileds ) if i make refresh he can get and match the old filds but not the new filds , so i can not add this filds to the pivote table unless i restart the pivote table from the start , MY Question is , is...

TAble Insert
I have a person table that has id, firstname, lastname, address, city, state, zip. I have set all fields except id to have required = no and allow zero length = yes. But when I try the following query it will not insert the record because the firstname is not filled out. Any ideas? INSERT INTO person ( id, lastname, firstname, address, city, state, zip ) VALUES (1783, 'Hacienda La Daniela', '', '5310 SW 192 Avenue', 'Sw Ranches', 'Fl', '33331'); Try inserting Null instead of a zero-length string: INSERT INTO ... VALUES (1783, 'Hacienda...

Loading Table with Associated Foreign Table
Hope I've expressed my question correctly in the title. I have two separate tables. Table1: fldIDRepairName << AutoNumber and Primary Key fldRepairName << Index, Unique fldIDGroupName << Link to Foreign Table Table 2 ( I call this Foreign): fldIDGroupName <<AutoNumber and Primary Key fldGroupName ================== If trying to load an alphabetical list of the "fldRepairName" in Table 1: and at the same time get the "fldGroupName" into a second list box?? =================== If I loop "Tabl...

Pivot Table
As with a previous question, I have a large set of data (20,000 rows and about 100 coulmns). I wish to select about 60 columns to place in pivot "data" (along with others into "Rows"). Is there a way to select multiple columns (say all 60?) and move into "Data" in one step? Are there add-ins that help with this? Doing all 60 is possible but slow and somewhat error prone. Thanks in advance. Hi Johnny The following code should get you started on what you want to do. In this example the first column of source data is added to Page area, the seco...