Hi Paul,
Thanks for your inquiry.
I was trying to do the following:
insert into [database].table1( field1, field2 )
select fieldA, fieldB from [database].tableX
Sincerely,
Jean Holland
> ¤ I know how to select data from tables in my current data base and insert that
> ¤ data into another table. What is the correct syntax to select data from data
[quoted text clipped - 9 lines]
> ~~~~
> Microsoft MVP (Visual Basic)
Jan Hyde - 25 Oct 2006 16:41 GMT
JeanH <JeanH@discussions.microsoft.com>'s wild thoughts were
released on Wed, 25 Oct 2006 08:09:01 -0700 bearing the
following fruit:
>Hi Paul,
>Thanks for your inquiry.
[quoted text clipped - 5 lines]
>
>Sincerely,
You still didn't say what database your using and this is
probably the single most important piece of information we
need as Paul said SQL syntax varies from database to
database.
J
>>Jean Holland
>
[quoted text clipped - 11 lines]
>> ~~~~
>> Microsoft MVP (Visual Basic)
Jan Hyde (VB MVP)

Signature
Why don't boxers have sex before a fight?
Because they don't fancy each other.
JeanH - 25 Oct 2006 20:58 GMT
For this application I am using MSDE but sometimes I use SQL Server 2000 Full
Version.
Jean
> JeanH <JeanH@discussions.microsoft.com>'s wild thoughts were
> released on Wed, 25 Oct 2006 08:09:01 -0700 bearing the
[quoted text clipped - 34 lines]
>
> Jan Hyde (VB MVP)
Paul Clement - 26 Oct 2006 20:43 GMT
¤ Hi Paul,
¤ Thanks for your inquiry.
¤
¤ I was trying to do the following:
¤
¤ insert into [database].table1( field1, field2 )
¤ select fieldA, fieldB from [database].tableX
¤
See if the following helps:
http://www.databasejournal.com/features/mssql/article.php/3507171
Paul
~~~~
Microsoft MVP (Visual Basic)
JeanH - 26 Oct 2006 22:22 GMT
Hi Paul,
By looking at the syntax I see that I was not putting the table owner after
the database name. That's why I was getting the error. So [database].table
is not correct but when I changed it to [database].dbo.table it worked fine.
Thanks,
Jean
> ¤ Hi Paul,
> ¤ Thanks for your inquiry.
[quoted text clipped - 12 lines]
> ~~~~
> Microsoft MVP (Visual Basic)