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

  • Home
  • SEARCH
  • 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 8792019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:55:21+00:00 2026-06-13T22:55:21+00:00

I am trying to copy a view from one database to another and get

  • 0

I am trying to copy a view from one database to another and get the error :

Msg 4121, Level 16, State 1, Procedure vwPAProjects_Summary_New_2
Line 2
Cannot find either column “dbo” or the user-defined function or
aggregate “dbo.GetContractName”, or the name is ambiguous

The view I am copying over is:

USE [GRAUD]
GO
/****** Object:  View [dbo].[vwPAProjects_Summary_New_2]    Script Date: 11/07/2012 11:57:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[vwPAProjects_Summary_New_2] AS 
select
 dbo.GetContractName(PAPROJNUMBER) 'CONTRACT',
PACONTNUMBER,
isnull(dbo.GetEmployeeName(PABusMgrID),dbo.GetContractPartner(PACONTNUMBER)) 'Project Manager ID',
case PASTAT
when 1 then 'Open'
else 'Closed'
end 'Status',
case PAProjectType
when 3 then 'Fixed Price'
else 'Time and Materials'
end 'Project Type',
PAProject_Fee_Amount 'Project Fee Amount',
PAFTotalCost 'Forecast Total Cost',
(PAProject_Fee_Amount - PAFTotalCost) 'Forcast Profit',
case
    when PAProject_Fee_Amount = 0 then '0.00%'
    else cast(cast(((PAProject_Fee_Amount - PAFTotalCost)/PAProject_Fee_Amount)*100 as decimal(19,2)) as varchar(21)) + '%'
end 'Forcast %',
PAPostedBillingsN 'Actual Billings',
PAPostedTotalCostN 'Actual Total Cost',
(PAPostedBillingsN - PAPostedTotalCostN) 'Current Actual Profit',
case
    when PAPostedBillingsN = 0 then '0.00%'
    else cast(cast(((PAPostedBillingsN - PAPostedTotalCostN)/PAPostedBillingsN)*100 as decimal(19,2)) as varchar(21)) + '%'
end 'Current %'

from PA01201
where PASTAT = 1

Can anybody advise on how I can get this to copy over? It has worked on other databases after I have copied it over but I cannot see any differences that would stop it this time?

  • 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-13T22:55:22+00:00Added an answer on June 13, 2026 at 10:55 pm

    Copy over the function dbo.GetContractName first, then you should find the view copies too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to copy the <options> HTML Codes from one select list to another.
Im trying to copy over data from one table to another in the same
I'm currently trying to copy data from table into another by using a SELECT
I've been trying to pull a copy of my sqlite database from my android
I'm trying to copy the results from a view to a table using: insert
I'm trying to SELECT from the dba_tab_cols view from within a stored procedure. It's
I'm trying to call a view directly from another (if this is at all
I'm trying copy a single file from the Plugin directory inside of my Wordpress
Trying to copy the msdn refernce here doesn't work and gives an error I
I am trying to copy all format file (.txt,.pdf,.doc ...) file from source folder

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.