amillyard
asked on
updating sql db table, getting blanks in column data
running a test (via the executute option within vs 2008 pro) -- provides the following feedback:
Running [BackOffice].[CopyNewLeadt
(1 row(s) affected)
(0 row(s) returned)
@RETURN_VALUE = 0
Finished running [BackOffice].[CopyNewLeadt
where am I going wrong.
your time and efforts with this enquiry are much apprieated
ALTER PROCEDURE BackOffice.CopyNewLeadtoDIP
@Title_ID int,
@FirstNameApp1 nvarchar(50),
@LastNameApp1 nvarchar(50),
@TelHomeApp1 nvarchar(50),
@TelWorkApp1 nvarchar(50),
@TelMobileApp1 nvarchar(50),
@EmailApp1 nvarchar(50),
@Address1Current nvarchar(50),
@Address2Current nvarchar(50),
@Address3Current nvarchar(50),
@TownCurrent int,
@CountyCurrent int,
@PostCodeCurrent nvarchar(10),
@CountryCurrent int,
@AssignedStaffMember int,
@MasterAccount_ID int
AS
BEGIN
UPDATE DIPApplication SET TitleApp1 = s.Title_ID,
FirstNameApp1 = s.FirstName,
LastNameApp1 = s.LastName,
TelHomeApp1 = s.LandlineHome,
TelWorkApp1 = s.LandlineWork,
TelMobileApp1 = s.Mobile,
EmailApp1 = s.EmailAddress,
Address1Current = s.Address1,
Address2Current = s.Address2,
Address3Current = s.Address3,
TownCurrent = s.Town_ID,
CountyCurrent = s.County_ID,
PostCodeCurrent = s.PostCode,
CountryCurrent = s.Country_ID,
AssignedStaffMember = s.AssignedStaffMember
FROM DIPApplication t
INNER JOIN MasterAccounts s ON s.MasterAccount_ID = t.MasterAccount_ID
WHERE t.MasterAccount_ID = @MasterAccount_ID
END
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Novice_Novice:
my expectation is 1 of 2
1: using the 'execute' mode within vs -- I should at teh very least get the initial variables (manually entered in order to get the stored procedure to operate)
2: used in the live environment -- should be updating with other content from other db table
my expectation is 1 of 2
1: using the 'execute' mode within vs -- I should at teh very least get the initial variables (manually entered in order to get the stored procedure to operate)
2: used in the live environment -- should be updating with other content from other db table
ASKER
asvforce:
I thoguht I had to pass those variables across -- my objective is to 'copy' a few columns from table a to table b -- the record hook / identifier is the MasterAccount_ID which is consistent in both tables
should I have writtent the script differnetly?
I thoguht I had to pass those variables across -- my objective is to 'copy' a few columns from table a to table b -- the record hook / identifier is the MasterAccount_ID which is consistent in both tables
should I have writtent the script differnetly?
ASKER
Novice_Novice: confirming that all tables within db have a primary key set, normally use tablename_ID format for the primary key
ASKER
Further clarity:
MasterAccounts table has some basic infomation in it.
As DIPApplication table gets created -- this tables needs to copy a few columns from MasterAccounts table.
MasterAccounts table has some basic infomation in it.
As DIPApplication table gets created -- this tables needs to copy a few columns from MasterAccounts table.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Novice_Novice: apologies -- row (been up all night working)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER