• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 151
  • Last Modified:

Need to insert a record in a person file

I know the sql is wrong.  
There are 2 tables (Company and Persons)
I need to add a blank record to the person table for 1 company  in the "person" file.

INSERT INTO `pers`(`TID`, `PNID`, `LNAME`) VALUES ("00000619", "0000", "Unknown") where `TID` = "00000619"

TID relates back to the company table
0
breeze351
Asked:
breeze351
1 Solution
 
Chris StanyonCommented:
An INSERT query doesn't have a WHERE clause. Not entirely sure what you mean by inserting a blank record into the person table.

An INSERT query would look like this:

INSERT INTO Person (TID, PNID, LNAME) VALUES ("00000619", "0000", "Unknown") ;

Open in new window

0
 
breeze351Author Commented:
Sorry, I just was having a bad day.  Stared at this for 3 hours before I saw it.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

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