There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.

I have been looking at my code for hours now and cant figure out what is wrong. The error has kept popping up even when i thought i had fixed everything. maybe a second set of eyes could help me out here. If you could help me out it would be much appreciated.
USE [ConorsSetKits]
GO
CREATE TABLE Customers (
CustomerID Int NOT NULL IDENTITY(1000,1),
LastName NChar(30) NOT NULL,
FirstName NChar(30) NOT NULL,
Address NChar(50) NOT NULL,
City NChar(30) NOT NULL,
State NChar(2) NOT NULL,
Zip Numeric(5) NOT NULL,
Email NVarChar(50) NOT NULL,
DateOfBirth Numeric (4) NOT NULL,
CONSTRAINT CustomersPK PRIMARY KEY(CustomerID),
CONSTRAINT ValidZip
CHECK ( [Zip] LIKE '[0-9][0-9][0-9][0-9][0-9]' ),
CONSTRAINT ValidState
CHECK( LEN([State]) = 2),
CONSTRAINT DateOfBirth
CHECK ([DateOfBirth] BETWEEN '1920-01-01' AND getdate() - 5844));
CREATE TABLE Sets (
SetID Int NOT NULL IDENTITY(1000,1) Primary Key,
SetName NChar(20) NOT NULL,
SetType NChar (20) NOT NULL,
Price Numeric (20) NOT NULL,
Quantity Numeric (50) NOT NULL,
CONSTRAINT SetTypeCheck
CHECK (SetType IN ('Planes','Tanks','Robots','Cars','Helicopters','Boats','Trains','Motorcycles','Jets')),
CONSTRAINT ValidQuantity 
CHECK (Quantity >= 0)
CREATE TABLE Orders (
OrderID Int NOT NULL IDENTITY(1000,1),
CustomerID Int NOT NULL,
OrderDate Date NOT NULL,
CONSTRAINT CAIntPK PRIMARY KEY(OrderID, CustomerID),
SET IDENTITY_INSERT dbo.CUSTOMER OFF
SET IDENTITY_INSERT dbo.Sets OFF
SET IDENTITY_INSERT dbo.Orders OFF
SET IDENTITY_INSERT dbo.CUSTOMER ON
INSERT INTO Customers
(CustomerID, LastName, FirstName, Address, City, State, Zip,
Email, DateOfBirth)
VALUES (
1000, 'Janes', 'Jeffrey', '123 W. Elm St', 'Renton', 'WA', '98055',
'[email protected]',1985);
INSERT INTO Customers
(CustomerID, LastName, FirstName, Address, City, State, Zip,
Email, DateOfBirth)
VALUES (
1001, 'Smith', 'David', '813 Tumbleweed Lane', 'Loveland', 'CO', '81201', 
'[email protected]',1992);
INSERT INTO Customers
(CustomerID, LastName, FirstName, Address, City, State, Zip,
Email, DateOfBirth)
VALUES (
1015, 'Twilight', 'Tiffany', '88 1st Avenue', 'Langley', 'WA', '98260',
'[email protected]',1972);
INSERT INTO Customers
(CustomerID, LastName, FirstName, Address, City, State, Zip,
Email, DateOfBirth)
VALUES (
1033, 'Smathers', 'Fred', '10899 88th Ave', 'Bainbridge Island', 'WA', '98110',
'[email protected]',1980);
INSERT INTO Customers
(CustomerID, LastName, FirstName, Address, City, State, Zip,
Email, DateOfBirth)
VALUES (
1034, 'Frederickson', 'Mary Beth', '25 South Lafayette', 'Denver', 'CO', '80201',
'[email protected]',1970);
INSERT INTO Customers
(CustomerID, LastName, FirstName, Address, City, State, Zip,
Email, DateOfBirth)
VALUES (
1036, 'Warning', 'Selma', '205 Burnaby', 'Vancouver', 'BC', '80201',
'[email protected]',1981);
INSERT INTO Customers
(CustomerID, LastName, FirstName, Address, City, State, Zip,
Email, DateOfBirth)
VALUES (
1037, 'Wu', 'Susan', '105 Locust Ave', 'Atlanta', 'GA', '30322',
'404', '653-3465', '[email protected]',1971);
INSERT INTO Customers
(CustomerID, LastName, FirstName, Address, City, State, Zip,
Email, DateOfBirth)
VALUES (
1040, 'Gray', 'Donald','55 Bodega Ave', 'Bodega Bay', 'CA', '94923',
'[email protected]',1985);
INSERT INTO Customers
(CustomerID, LastName, FirstName, Address, City, State, Zip,
Email, DateOfBirth)
VALUES (
1041, 'Johnson', 'Lynda', '117 C Street', 'Washington', 'DC', '20003',
'[email protected]',1969);
INSERT INTO Customers
(CustomerID, LastName, FirstName, Address, City, State, Zip,
Email, DateOfBirth)
VALUES (
1051, 'Wilkens', 'Chris', '87 Highland Drive', 'Olympia', 'WA', '98508',
'[email protected]',1994); 
SET IDENTITY_INSERT dbo.CUSTOMER OFF
SET IDENTITY_INSERT dbo.Sets ON
INSERT INTO Sets
(SetID, SetName, SetType, Price, Quanity)
VALUES (
1000, 'MysterySet1','Planes',$29.99,10);
INSERT INTO Sets
(SetID, SetName, SetType, Price, Quanity)
VALUES (
1001, 'MysterySet2','Planes',$19.99,10);
INSERT INTO Sets
(SetID, SetName, SetType, Price, Quanity)
VALUES (
1002, 'MysterySet4','Tanks',$39.99,10);
INSERT INTO Sets
(SetID, SetName, SetType, Price, Quanity)
VALUES (
1003, 'MysterySet3','Robots',$19.99,10);
INSERT INTO Sets
(SetID, SetName, SetType, Price, Quanity)
VALUES (
1004, 'MysterySet5','Cars',$29.99,10);
INSERT INTO Sets
(SetID, SetName, SetType, Price, Quanity)
VALUES (
1005, 'MysterySet6','Boats',$29.99,10);
INSERT INTO Sets
(SetID, SetName, SetType, Price, Quanity)
VALUES (
1006, 'MysterySet7','Trains',$39.99,10);
INSERT INTO Sets
(SetID, SetName, SetType, Price, Quanity)
VALUES (
1007, 'MysterySet8','Motorcycles',$9.99,10);
INSERT INTO Sets
(SetID, SetName, SetType, Price, Quanity)
VALUES (
1008, 'MysterySet9','Helicopters',$29.99,10);
INSERT INTO Sets
(SetID, SetName, SetType, Price, Quanity)
VALUES (
1009, 'MysterySet10','Jets',$29.99,10);
SET IDENTITY_INSERT dbo.Sets OFF
SET IDENTITY_INSERT dbo.Orders ON
INSERT INTO Orders 
(OrderID, OrderDate)
VALUES 
(1000, '2012-12-12');
INSERT INTO Orders 
(OrderID, OrderDate)
VALUES 
(1000, '2013-12-30');
INSERT INTO Orders 
(OrderID, OrderDate)
VALUES 
(1005, '2013-08-30');
INSERT INTO Orders 
(OrderID, OrderDate)
VALUES 
(1004, '2013-12-30');
INSERT INTO Orders 
(OrderID, OrderDate)
VALUES 
(1004, '2013-08-31');
INSERT INTO Orders 
(OrderID, OrderDate)
VALUES 
(1004, '2014-03-25');
INSERT INTO Orders 
(OrderID, OrderDate)
VALUES 
(1002, '2012-11-14');
INSERT INTO Orders 
(OrderID, OrderDate)
VALUES 
(1001, '2012-11-14');
INSERT INTO Orders 
(OrderID, OrderDate)
VALUES 
(1001, '2013-01-05');
INSERT INTO Orders 
(OrderID, OrderDate)
VALUES 
(1006, '2012-06-22');
SET IDENTITY_INSERT dbo.Orders OFF

Price Numeric (20) NOT NULL,
I do not think you understand this datatype?  Go look at the values you are attempting to insert into this column.  For example, "$29.99".  After the insert, what value is actually stored in that column? 
DateOfBirth Numeric (4) NOT NULL,
No. Just No.  Either change the column name to faithfully represent what values you intend to store (and apply the appropriate constraints) or change the datatype and the values that you intend to store to match the column name.  And the constraint
that you do have:
 CONSTRAINT DateOfBirth
 CHECK ([DateOfBirth] BETWEEN '1920-01-01' AND getdate() - 5844));
is both logically suspect and syntactically wrong. First, the upper boundary will be computed as 1999-04-29 15:50:21.670.  But, of course, your column is a whole number of no more than 4 digits.  The same issue applies to your lower boundary. 
A simple select statement will show you those errors
select cast('1920-01-01' as numeric(4)), getdate() - 5844, cast(getdate() - 5844 as numeric(4));
An insert statement fails with the same error.  Because, of course, your boundary values must actually be converted to numeric(4) in order to compare them against the value contained in the column.   Generally, you can convert from
string to numeric - IF the content of the string actually contains a value that is numeric and can be converted into the specific type needed.  Not so in this case.  Is this 16 year period (5844 days) significant for some reason?  You should
document it here in your DDL with a comment, because it is unlikely to be documented (and kept current) anywhere else. 
And lastly, your script has:
SET IDENTITY_INSERT dbo.CUSTOMER OFF
That is not the name of your table, and therefore that statement also fails.  The table name you used is plural. 

Similar Messages

  • I have a A4 document (569 pages) and within that A4 there are few A3's. Is there a way to isolate the A3's or find out what page numbers are A3's instead of scrolling through all the 569 pages???

    I have a A4 document (569 pages) and within that A4 there are few A3's. Is there a way to isolate the A3's or find out what page numbers are A3's instead of scrolling through all the 569 pages???

    thank you for the info... however I'm done buying pdf readers.... I've got three now, that should suffice.
    I don't think there's a problem such as you mentioned because the pages are all similar : text and drawings. Some of the pages with drawings work, other similar pages don't.
    I converted with Calibre to epub format and this seems to work !!!
    So good so far...
    Now I need to find a conversion to pdf to allow me to use goodreader or iannotate.
    Basically... the text is ok, because a conversion allows reading. So a shortcoming by Apple in my opinion. Again, all pdf's should be readable on such an expensive tool !!!

  • Having issues with contacts... groups specifically... when I add contacts to a group and check back there are fewer in group than when i started.. they disappear??

    having issues with contacts... groups specifically... when I add contacts to a group and check back there are fewer in group than when i started.. they disappear??

    Hi
    in this scenarion control is not going inside the condition
    if (vo.getRowCount() == 0) and therefore VO is not getting initialized
    why u are counting the row of VO to initialize the VO ,if possible pls remove this condition check ,problem will be solved .pls let me know in case of any issues.
    thanx
    Pratap

  • On the connector block CB-68LP, there are few screw terminals. I am trying to find the maker and the part number of this screw terminal. Any help is much appreciate​d.

    I am designing a new product to use in our environment and I am trying to go from the I/O card to the PCB eliminating the connector block. For this purpose, I need to find out the screw terminal part number as well as the makers name. Please help.

    The screw terminals are made by Phoenix:
    The 14 screw terminal row is P/N 18-69-33-4
    The 12 screw terminal row is P/N 18-69-31-8

  • What does the Merge Data Stream processor do when there are multiple input streams to it from the same reader?

    Hi,
    I have a process with a reader of master data that outputs 5 records that feeds simultaneously into 3 different lookup and return processors.
    Each lookup and return processor brings some data back from a detail table. There can be multiple details so I follow each lookup processor with a split records from array processor. Hence I end up with 3 'streams' of data. Stream 1 has 8 records, stream 2 has 5 records and stream 3 has 6 records.
    I join all these streams to a Merge Data Streams processor.
    I end up with 9 records so although the help for the Merge Data Streams processor says 'Merge Data Streams does not perform any transformation, matching, or merging of records' there is clearly some merging going on.
    What is the behaviour of the merge data streams processor in this scenario?
    I have added attributes and flags into each of the streams. How many records should I see and what values should the added attributes/flags have (some records show attributes/flags from all 3 streams whereas others show just those attributes/flags from one stream).
    I have developed a test case simply to understand what the processor is doing but it's not obvious and furthermore it's probably unwise to develop EDQ processes where the processor behaviour is not documented and guaranteed to remain consistent. What I am trying to achieve is to bring all of a person's (the master data) various details (assignments, employers, etc.) together so we can check the data (some rules require data from multiple details).
    Thanks, Nik

    Cheers Mike - and for the explanation of the terms.
    I think I understand now how it's supposed to work.
    What I'm finding however is that when I set a flag to Y at the beginning of a path (that includes a lookup and return and then split records from array processor) that flag is showing no (i.e. an empty) value in SOME of the records shown in the subsequent MDS processor (it's fine the very last split processor before we get to the MDS but then again there are fewer records in that split processor than the MDS).
    In my case there are obviously more records in the MDS processor than there were in the original reader (because the lookup and returns are configured to have unlimited maximum matches). As mentioned, the different paths return different numbers of  records before being combined in the MDS. Say a reader has 5 records and path 1 returns 8 records in total including a path-specific flag (flag1, set to Y) but path 2 (that again adds its own path-specific flag (flag2, set to Y) returns just 5 records (since nothing was added from the lookups) are you saying that flag2 would show as 'Y' for all 8 records shown in the MDS?
    Hopefully you would be able to see what I mean if you try to create a process like the one I've described (or I can upload a package).
    Re. the purpose of the separate paths approach it is simply to allow the visualisation ('showing the working' as Neil puts it) of the different checks being carried out by the process.
    This is considered one of the benefits of the tool over writing SQL queries (with outer joins, query criteria, etc.).
    Also, as mentioned I was following an example that Neil put together for us to ensure that we are doing things in a 'proper' and supported way.
    If we put all the lookups, etc. for all the checks into one datastream then it no longer becomes so understandable and the value of joining processors in a process over simply writing SQL becomes questionable; arguably the EDQ process in fact becomes less easy to understand than simply writing SQL.
    Also, to go down this route I will need to revise the (what was previously substantially working until I revised it) processes that I have already developed.
    Thanks, Nik

  • HT5622 I downloaded the upgrades on my phone last night and apparently i did a 4-digit pin.  there are only 2 pins i ever use and i tried both of these but now my phone is locked, neither pin worked.  what do i need to do.

    I downloaded updates to my phone last night.  I guess I created a 4-digit pin.  there are only 2 pins that i ever use and neither one of these work.  now my phone is locked.  what do i need to do

    Hey carla1958,
    Thanks for the question. The following article provides some solutions if you are having issues with passcode lock:
    iOS: Forgotten passcode or device disabled after entering wrong passcode
    http://support.apple.com/kb/HT1212
    If you have never synced your device with iTunes, or you do not have access to a computer
    If you see one of following alerts, you need to erase the device:
    "iTunes could not connect to the [device] because it is locked with a passcode. You must enter your passcode on the [device] before it can be used with iTunes."
    "You haven't chosen to have [device] trust this computer"
    If you have Find My iPhone enabled, you can use Remote Wipe to erase the contents of your device. If you have been using iCloud to back up, you may be able to restore the most recent backup to reset the passcode after the device has been erased.
    Alternatively, place the device in recovery mode and restore it to erase the device:
    1. Disconnect the USB cable from the device, but leave the other end of the cable connected to your computer's USB port.
    2. Turn off the device: Press and hold the Sleep/Wake button for a few seconds until the red slider appears, then slide the slider. Wait for the device to shut down.
    3. While pressing and holding the Home button, reconnect the USB cable to the device. The device should turn on.
    4. Continue holding the Home button until you see the Connect to iTunes screen.
    5. iTunes will alert you that it has detected a device in recovery mode. Click OK, and then restore the device.
    Thanks,
    Matt M.

  • "The update could not be installed. Please make sure there are no other copies of Firefox running on your computer, and then restart Firefox to try again"

    I'm using Firefox 4 Beta and I tryed install update but I dont got success. Now every time that I go start the browser is displayed the mensage: "The update could not be installed. Please make sure there are no other copies of Firefox running on your computer, and then restart Firefox to try again"
    My release is installed not in default drive C:\. I installed in the other Partition on my PC.
    I don't have other release installed.

    Try a clean re-install.
    * Download the setup file from http://www.mozilla.com/en-US/firefox/RC (this is for the Firefox 4 release candidate)
    * Uninstall Firefox, do not select the option to "Remove my Firefox personal data"
    * Delete the Firefox installation directory - http://kb.mozillazine.org/Installation_directory
    * Re-install Firefox
    This process does not remove the Firefox user data such as bookmarks and passwords which are stored elsewhere in the profile folder.
    You may also need to manually reset the Software Update feature by deleting the software update files as shown in the "Software Update not working properly" section here - http://kb.mozillazine.org/Software_Update

  • New itouch user here, We had a wireless connection with a password all set up but we couldn't remember the password meanwhile there are other connections around us but locked. So i decided to make a new one yet it still will not allow to go on safari HELP

    new itouch user here, We had a wireless connection with a password all set up but we couldn't remember the password meanwhile there are other connections around us but locked. So i decided to make a new one yet it still will not allow to go on safari after i type in the password PLEASE HELP ive turned on and off etc

    My guess is that the security settings on your router and iPod do not match.
    For a test, change your router so there is no security.  See if you can connect and get to the Internet. If that works, set up the router with security and use the same settings for the iPod.

  • TS1702 There are two apps in my update section that I did not install and I want them gone.  1 says it has mature content, what the heck is this?

    there are two apps in my update section that I did not install and do not want.  How do I get rid of them without?

    Web browser apps display the same warning - and as Rkedge pointed out - any app that accesses web content may show that warning.
    Atomic, Mercury, Google Chrome, iCab Mobile ... All web browsers and I think that they all display that same warning.

  • Steps to Transfer mail from Older MBP 10.6.8 to Newer MBP 10.8.5 for NON-tech person  I really just need the simplest solution.  I have cleaned out old folders on the OMBP, but there are folders I need for work

    I really just need the simplest solution.  I have cleaned out old folders on the OMBP, but there are folders I need for work.
    I am not a technical person.  I have gone online and read a gazillion "All Ya Gotta Do...." to the point where my head swims.
    I backed up my older MBP onto WD Passport Studio via Time Machine.
    I transferred all my files there and put them all onto the newer MBP.
    I expected to see Mail but did not.
    Someone said just use Migration Assistant, but I dont find that anywhere.
    Please dont say iCloud because I dont even know what it is.  Sorry, but I just dont use my Mac other than for work, meaning online access for research, and then typing reports of various kinds... and for emailing.
    Can I just hook the firewire directly from OMBP to NMBP and copy them that way??
    Sorry I am such a dolt, but I really just want easy step by step instructions, thank you.
    Would the Genius Bar at my local store be able to help me???
    Thank you,

    Okey Dokey!
    I followed the steps for the Target Disk thing, and was able to transfer everything on my old desktop, in my old pictures file...  all the final transfers regarding my documents and photos.
    BUT 
    there were no folders for Mail, and when I went to the only folder I could find that said "Mail" -- which was under "applications" it then told me that I could not transfer old "mail" to new "mail" since they were different versions...
    Now THIS makes sense,,, and I was not looking to do that... 
    but how do I find all my mail folders???? 
    Is there someplace I should be saving them in order to get them???
    Do you mind helping me with instructions on how to do this?
    Thanks!

  • KO88:Not possible to post down payment clearing. There are no down payments

    Hi,
    We are doing Full Settlement of an order in TCode KO88. There are few Down payments against a PO. Initially, system gave an error as follows: -
    You cannot post comp.retirement for asset 120002 0 with this trans.type
        Message no. AA341
    Diagnosis
        A down payment was posted to asset 120002 0. In depreciation area 01, if
        not elsewhere, all down payments were not cleared.
    Procedure
        Before posting a complete retirement on this asset, you have to first
        clear the down payment in all depreciation areas.
    We cleared the down payments and ran KO88 again, but a new error popped as given below.
    Not possible to post down payment clearing. There are no down payments.
        Message no. AA571
    Any help will be acclaimed.
    Regards,
    CMC Team
    Edited by: CMC Team on Jan 18, 2012 2:59 PM
    Edited by: CMC Team on Jan 18, 2012 3:01 PM

    Friend,
    Probably you did not take the trouble to search the SAP Oss for notes on this error message.
    Please search for 'AA571' in the notes section of SAP oss and you will find several notes addressing the exact issue you are having.
    For your convenience.
    www.service.sap.com/notes
    Best regards,
    Vishal Thakur.

  • How to build a table with predifined? Like Huffman decoding, there are 34 predefined tables?

    I am trying to use Labview for mp3 huffman decoding. there are 34 predefined tables for lookup purpose. I tried build array control, but it is so hard to assign value with size of 16. What is the better way to create predefined array? And how to do lookup table with Labview?

    IMHO, the best way to have something "predefined" is to read this data from a "setup/configuration" file (if you don't want to use "default settings" LV feature). The choice of the format for all the data that you want to store in some kind of configuration file is up to you.
    Also, constructing a "lookup table" in LV doesn't seems different as for any other programming language.

  • TS1367 Is there are a way to use my imac as a display for my macbook pro? I have a thunderbolt cable but it doesnt seem to do anything

    Is there are a way to use my imac as a display for my macbook pro? I have a thunderbolt cable but it doesnt seem to do anything

    Hello eassic,
    Thanks for the question, and welcome to Apple Support Communities.
    It sounds like Target Display Mode may be what you are looking for:
    Target Display Mode lets you use a Mac as the external display for another “primary” Mac. In some cases, you can also play the sound from your primary Mac on the speakers of the external Mac. For example, a MacBook Pro could use a 27-inch iMac as the display and play its audio on the iMac as well.
    OS X Mountain Lion: Use another Mac as a display
    http://support.apple.com/kb/PH11302
    Use an iMac with Thunderbolt as a display
    If you have an iMac with Thunderbolt, any other Mac with Thunderbolt can use it as a display. The iMac will play both the video and audio from the other Mac.
    1. Connect the Thunderbolt cable to the Thunderbolt ports on each computer.
    2. Make sure both Mac computers are turned on and awake.
    3. Press Command (⌘)-F2 on the keyboard of the external display Mac.
    4. If you want the external display Mac to play audio as well as video from the primary Mac, choose Apple menu > System Preferences, click Sound, and then click Output. Select the external display Mac from the list of devices.
    Thanks,
    Matt M.

  • HT204266 There are two vertical lines on my ipod screeen for last 3/4 days..these lines have been increasing slowly..What does this indicate?Any remedies?

    There are two vertical lines on my ipod screeen for last 3/4 days..these lines have been increasing slowly..What does this indicate?Any remedies?

    Try the standard fixes to rule out a software problem:
    - Reset. Nothing is lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup
    - Restore to factory settings/new iPod
    if still problem that indicates a hardware problem and an appointment at the genius Bar of an Apple store is in order.

  • Threads to keep the CPU faster than the disk?

    Greetings,
    I hope this is the correct place to post a question like this - I did not see a forum specific to C/C++ programming on Solaris.
    I'm currently writing a data conversion program and would like to get better performance. The programming language is straight C, Solaris 10, E25K with 8 CPUs and 16G RAM allotted to my zone. I do not have admin on the box. I am compiling 64-bit with lots of compiler options for performance.
    The process is very linear and most of the optimization examples I find are for making loops run in parallel and such. Well, I don't have any loops. I'm moving a lot of data from a set of source files, doing some transformation and validation, then writing to the appropriate target file. No recursion or matrix math here...
    I wrote my initial test program which would basically spin through the source files and write empty target files. Doing this I was able to process about 70,000 source records per second - which was acceptable and on par with the speed of simply copying the disk files from one place to another.
    Once I started adding logic, the records per second started to drop drastically. I expected this to some degree, but adding just the basic initial logic cut the records per second in half, and after that the performance dropped in a pretty linear fashion as I added transformation logic. Mind you, most of the logic is moving source to target and space padding the target, validating a date range, etc.. Nothing complex by any stretch of the imagination, there are just a lot of fields.
    Before I spend a lot of time trying to multi-thread the application, I wanted to see if my expectations are realistic. My thinking is that 8 CPUs should be able to keep up with the disk subsystem and that my conversion should not take any longer than the amount of time it takes to simply copy the data from one point to another. Possible?
    Currently I'm processing like this:
    1. mmap open all sources (there are about 10 to 15 depending)
    2. collect counts of all source records in a given "set"
    3. wait for any previous targets to finish writing to disk
    4. process the current set of source records and write target records to memory buffers for each target
    5. when a given target buffer is full, aiowrite to the target file
    6. while there are source records, goto step 2
    Basically I used aiowrite to get a little free async operation in that any target buffers that are ready to be written could do so while the next set of source records is being grouped (being read from the mmap'd source files). I also try to keep things as fast as possible by not moving the data more than necessary. Usually my transformation logic can move the data directly from the mmap'd file to the target buffer, and in other cases only a single move of the data needs to be done.
    What I think I would like to do is create a thread that groups the source record sets into 8 independent memory locations. This thread's job is to simply keep those group locations full. Then 8 worker threads would pick the next source "set" from the pool and process it, and only have to sync on a mutex when writing to the target file.
    Any insight or feedback would be greatly appreciated.
    Thanks,
    Matthew

    If your application is not using threads, then the entire program is running in a serial state, waiting for i/o etc. To check how your little program works, use:
    truss -a -d -D -f -l -o your_truss_output_file.log your_application

Maybe you are looking for