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 9045261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:14:44+00:00 2026-06-16T11:14:44+00:00

I have a procedure call FILLTABLE in DB1, that procedure control the insert in

  • 0

I have a procedure call FILLTABLE in DB1, that procedure control the insert in DB1.table1, and I have all data in DB2.table1, so basicaly I need fill DB1.table1 by procededure FILLTABLE from BD2.table1 but filter data DB2.table1

Eg:

Execute BD1.dbo.FILLTABLE (
                select db2.dbo.table1.name as @name, 
                       db2.dbo.table1.phonea s @phone 
                from table1 
                where citycode = 'ca')
  • 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-06-16T11:14:45+00:00Added an answer on June 16, 2026 at 11:14 am

    If I’ve got it right you should use cursor

    DECLARE @Name varchar(1000); -- change to type of db2.dbo.table1.name
    DECLARE @Phone varchar(1000); -- change to type of db2.dbo.table1.phone
    
    DECLARE t_Cursor CURSOR FOR
    select db2.dbo.table1.name, 
           db2.dbo.table1.phone
        from table1 
        where citycode = 'ca';
    
    OPEN t_Cursor;
    FETCH NEXT FROM t_Cursor INTO @Name,@Phone;
    WHILE @@FETCH_STATUS = 0
       BEGIN
          Execute BD1.dbo.FILLTABLE @Name,@Phone;
          FETCH NEXT FROM t_Cursor INTO @Name,@Phone;
    
       END;
    CLOSE t_Cursor;
    DEALLOCATE t_Cursor;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a stored procedure that logs some data, how can I call this
I have a stored procedure that I want to call from within another, and
I have a stored procedure call that goes like this: using (OracleConnection con =
The issue I'm facing is that I have a stored procedure (lets call it
I have a procedure that works like this: mysql> call Ticket_FiscalTotals(100307); +---------+--------+----------+------------+------------+ | Service
I have a VB6 application that is giving an error 5, Invalid procedure call
I have a database stored procedure call that, among other columns, returns a column
I have problems filling a temporary table with the resultset from a procedure call
I have to call a stored procedure and get the results. I know there
I have to call a store procedure at the end of each month, i

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.