Solved

How to set the same value for every record

Posted on 2002-07-08
2
124 Views
Last Modified: 2010-05-02
I use the following Query "INSERT INTO errrequired (drawing) SELECT drawing FROM border_att". Now i want to fill another field in the "errrequired" table at the same time with a text value. Something like "INSERT INTO errrequired (drawing, attribute) SELECT drawing FROM border_att VALUES 'Drawingnr'". I don't want to loop trough every record to set the value.
0
Comment
Question by:WNE
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 200 total points
ID: 7137671
Simply add the constant value in the select list:
INSERT INTO errrequired (drawing, attribute)
SELECT drawing , 'Drawingnr' FROM border_att

CHeers
0
 
LVL 1

Author Comment

by:WNE
ID: 7137700
That i didn't think of that.

Thanks for the quick response.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question