Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Insert into another Database/Table

0 views
Skip to first unread message

Richard Sutterfield

unread,
Apr 10, 2001, 6:04:24 PM4/10/01
to
I need to insert a record into another SQL database and table. My database
is called images and the table is CD000002. If I issue the following
command it will insert a record if the database is the current database in
the QA window. If I select a different database with the dropdown in QA and
try this command, it doesn't work. Is there a way to specify the target
database with a single command?

insert into [Images].[dbo].[cd000002] (imagesize) values (0)


Andrew J. Kelly

unread,
Apr 10, 2001, 6:14:24 PM4/10/01
to
Richard,

That is the correct syntax. You are using the fully qualified object name so
it should find the other table regardless of which is the current one. What
error are you getting?


--
Andrew J. Kelly
Targitmail.com


"Richard Sutterfield" <ric...@kellpro.com> wrote in message
news:OlmeJlgwAHA.2112@tkmsftngp05...

Richard Sutterfield

unread,
Apr 10, 2001, 7:11:28 PM4/10/01
to
I'm not sure what was going on, I ended up having to reboot and after I
rebooted, this syntax worked fine. Thanks for the help. (I also tried it
without the brackets and that worked also.)


0 new messages