Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 828659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:45:30+00:00 2026-05-15T03:45:30+00:00

Edit Ok I solved all my problems but one. Is it possible to have

  • 0

Edit

Ok I solved all my problems but one. Is it possible to have a hardcoded value insert as well. Like I said I am trying to insert one row(some of its columns) into another table that has about 80% of the same columns however the remaining ones hard non null columns and need some value to be inserted into them.

I am wondering can I send a hardcoded value or should I just make them nullable?

Hi

I am trying to find rows that are not in one table and insert them into another. The table I am trying to insert into has less columns then the other one.

These columns are null but it would be cool if I could hardcode a value before I do the insert.

But I am having so much trouble with just trying to get it to insert.

I have something like this

SELECT p.ProductId, p.ProductName
INTO SomeTable
FROM Product as p
WHERE p.ProductName != 'iPad'

I will get a error like this though

Msg 4104, Level 16, State 1, Line 1
The multi-part identifier
“p.ProductId” could not be bound.

I am not sure what I am doing wrong. I copied and pasted the names in so I don’t think it is a spelling mistake.

I am using ms sql 2005 express.

Edit

I forgot to update my where clause with the alias name that why I was getting this error. Now I get a new error

There is already an object named
‘SomeTable’ in the database.

My where clause.

SELECT p.ProductId, p.ProductName
INTO SomeTable
FROM Product as p
WHERE NOT EXISTS (SELECT * FROM SomeTable WHERE p.ProductId = SomeTable.ProductId)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T03:45:31+00:00Added an answer on May 15, 2026 at 3:45 am

    The syntax should be something like:

    INSERT INTO table (f1, f2)
    SELECT a, b
    FROM table2
    WHERE somefield = 'some_value'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT: This problem has been solved. See below. Hey all. I'm building an iPhone
EDIT: solved, look below for my solution. first of all, this is my very
I have a low-level (like really low-level, it's basically all IOCTL calls and several
EDIT 4/16/2012: I fixed the problems and have the sortings working appropriately. I also
Edit: [Solved] : It seems that the getTableCellRendererComponent of the CustomTableCellRenderer is called every
Edit: Solved. Hi, I'm starting with Qt, I try to connect a slot to
edit: Solved - mod_rewrite was the problem I can't get CI to work as
EDIT: SOLVED Thanks Brooks. Your question led me to keep digging into if the
EDIT: solved it, turns out I should use %c not %s because foodSelect and
[EDIT: Problem solved. Please see my answer below.] In my app I call the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.