Click here to Skip to main content
15,908,675 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a Ms Access 2010 Table with 30 fields...
But I want to insert into some selected fields... not all...
suppose I want to insert record into 20-35 column only..
what I have to do.... I tried some code.. but no success... please help
please help...
Posted
Updated 22-Jun-16 5:04am
v2
Comments
AnvilRanger 22-Jun-16 8:47am    
In your insert statement just specify the number of columns you want to insert. You don't have insert data into every column.

Below is pseudo code that will give you an idea. It is taken directly from MSDN

INSERT INTO target [(field1[, field2[, …]])] VALUES (value1[, value2[, …])
CHill60 22-Jun-16 9:02am    
Worth posting as the solution - it's what I would have done
Rajan Pandit 25-Jun-16 5:11am    
thanks.. it works

1 solution

Added as a solution as suggested.

In your insert statement just specify the number of columns you want to insert. You don't have insert data into every column.

Below is pseudo code that will give you an idea. It is taken directly from MSDN

SQL
INSERT INTO target [(field1[, field2[, …]])] VALUES (value1[, value2[, …])
 
Share this answer
 
v2
Comments
Rajan Pandit 25-Jun-16 5:09am    
Thanks dear... it works

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900