473,385 Members | 1,647 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,385 software developers and data experts.

Insert string value in a field with where condition.

23
Sir,
I have some value in my main table:All_Table
A columh(Net_Login) with value:"xyz"
I have a string:strValue

I want to insert/update(which will work fine?)my table"All_table",strvalue where xyz found.

What i tried and saya error msg'Semicolon (;) missing '
Code is:
Expand|Select|Wrap|Line Numbers
  1. strUpdateTbl = "INSERT INTO All_Table
  2. (Net_Login) VALUES (" & strvalue & ") " & _
  3.                     " WHERE ([All_Table].[Net_login])='xyz'"
  4.         cnnProject.Execute (strUpdateTbl)
Please rectify my error.
Apr 12 '12 #1
1 1823
The SQL clause "insert into" is for an append query. Use the "update" clause instead. Why don't you create a simple update query in the query design view first, and then switch to SQL view to see how the "update" clause is written?
Apr 13 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Chris | last post by:
I have tableA, defined as: field1 varchar2(10), field2 varchar2(10), field3 varchar2(10) I have host variables defined as: v1 pic x(10) varying v2 pic x(10) varying
8
by: John Welch | last post by:
I have a command button with the following code: DoCmd.OpenForm "frmSearchAssignments", , , "SearchAssignmentID = 1" (SearchAssignmentID is the PK, auto number) When it runs, the form opens but...
2
by: Sreedhar Vankayala | last post by:
Hi, I have a table IV00108wc which contains several thousand records in whcih ITEMNMBR is the primary key. I have a com+ object returning recordset which has ITEMNMBR and another details...
1
by: ven | last post by:
hello i`m makin a asp.net service with database connection where i have an insert with decimal value, when i run my function i get this error : There are fewer columns in the INSERT statement...
0
by: diane | last post by:
Just trying to upsize using VFP 9 with SQL 2005 using VFP remote views. One in particular keeps coming up and saying Cannot insert the value NULL into column, when I really don't think I am...
7
by: lostdawg | last post by:
Hi, I have a question regarding placing the Where condition in this section of code Private Sub Command219_Click() DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70...
1
by: altesse33 | last post by:
I am trying to open the form "frmClients_Main" to the record that is specified by the end user. Here is the code: ---------------------------------------------------------- Public Function...
5
by: MARIEDB2 | last post by:
Hello, I am struggling to build a query on a DB2 db wich does an update for multiple fields which are the result of a select query with where clause (using multiple tables in the condition). ...
1
by: Octo Siburian | last post by:
I have been collecting data from ms.access database into a class object '_Get and put in data from database Fingerprint(RAS) into CPresensiFingerprint Public Function GetdbFingerprint() As...
19
by: jaad | last post by:
how do you reference a single value field to a multi-value field? I sometime use a macro in form1 to open form 2 containing the same ID example: Open form: WorkOrder where condition: ="="...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.