Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 129
  • Last Modified:

How to set the same value for every record

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
WNE
Asked:
WNE
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
Simply add the constant value in the select list:
INSERT INTO errrequired (drawing, attribute)
SELECT drawing , 'Drawingnr' FROM border_att

CHeers
0
 
WNEAuthor Commented:
That i didn't think of that.

Thanks for the quick response.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now