Click here to Skip to main content
15,896,118 members
Home / Discussions / Database
   

Database

 
AnswerRe: Trouble using DTSWizard.exe to Import data into SQL Database Pin
andyharman12-Feb-07 23:03
professionalandyharman12-Feb-07 23:03 
Questionrename the existed excel worksheet name Pin
JaneQuestion12-Feb-07 13:33
JaneQuestion12-Feb-07 13:33 
AnswerRe: rename the existed excel worksheet name Pin
Krish - KP12-Feb-07 16:55
Krish - KP12-Feb-07 16:55 
QuestionConnection to Internal Access DB from External Host Pin
Aaron S.12-Feb-07 11:03
Aaron S.12-Feb-07 11:03 
AnswerRe: Connection to Internal Access DB from External Host Pin
Rob Graham12-Feb-07 11:41
Rob Graham12-Feb-07 11:41 
Questionhow do select 10 special records Pin
mehran.asg12-Feb-07 10:09
mehran.asg12-Feb-07 10:09 
AnswerRe: how do select 10 special records Pin
Christian Graus12-Feb-07 10:19
protectorChristian Graus12-Feb-07 10:19 
QuestionThe multi-part identifier "..." could not be bound. Pin
Quecumber25612-Feb-07 8:27
Quecumber25612-Feb-07 8:27 
I’m writing the following stored procedure:

USE Employees;
GO
IF OBJECT_ID('mrmsp_RetrieveEmployeeForEditting','P') IS NOT NULL
DROP PROCEDURE mrmsp_RetrieveEmployeeForEditting;
GO
CREATE PROCEDURE mrmsp_RetrieveEmployeeForEditting
@varEmployeeID INT,
@varTitleID INT OUTPUT,
@varDeptID INT OUTPUT,
@varLName VARCHAR(25) OUTPUT,
@varFName VARCHAR(15) OUTPUT,
@varMI VARCHAR(1) OUTPUT,
@varAddrTypeID INT OUTPUT,
@varAddress1 VARCHAR(40) OUTPUT,
@varAddress2 VARCHAR(40) OUTPUT,
@varCity VARCHAR(40) OUTPUT,
@varStateID INT OUTPUT,
@varZip VARCHAR(10) OUTPUT
AS
SELECT tblEmployees.[EmployeeID], tblEmployees.[TitleID],
tblEmployees.[DeptID], tblEmployees.[LName],
tblEmployees.[FName], tblEmployees.[MI],
tblAddresses.[AddressTypeID], tblAddresses.[Address1],
tblAddresses.[Address2], tblAddresses.[City],
tblAddresses.[StateID], tblAddresses.[ZipCode]
FROM Employees.dbo.tblEmployees
INNER JOIN Employees.dbo.tblAddresses
ON Employees.dbo.tblEmployees.EmployeeID =
Employees.dbo.tblAddresses.EmployeeID
WHERE Employees.dbo.tblEmployees.EmployeeID = @varEmployeeID
AND Employees.dbo.tblEmployees.Deleted = 0
ORDER BY Employees.dbo.tblEmployees.EmployeeID
SET @varTitleID = tblEmployees.[TitleID]
SET @varDeptID = tblEmployees.[DeptID]
SET @varLName = tblEmployees.[LName]
SET @varFName = tblEmployees.[FName]
SET @varMI = tblEmployees.[MI]
SET @varAddrTypeID = tblAddresses.[AddressTypeID]
SET @varAddress1 = tblAddresses.[Address1]
SET @varAddress2 = tblAddresses.[Address2]
SET @varCity = tblAddresses.[City]
SET @varStateID = tblAddresses.[StateID]
SET @varZip = tblAddresses.[ZipCode];


When I run the check routine it says there are no errors in the T-SQL statement, but when I try to run the SQL to place the stored procedure into the database I get the following errors:


Msg 4104, Level 16, State 1, Procedure mrmsp_RetrieveEmployeeForEditting, Line 28

The multi-part identifier "tblEmployees.TitleID" could not be bound.

Msg 4104, Level 16, State 1, Procedure mrmsp_RetrieveEmployeeForEditting, Line 29

The multi-part identifier "tblEmployees.DeptID" could not be bound.

Msg 4104, Level 16, State 1, Procedure mrmsp_RetrieveEmployeeForEditting, Line 30

The multi-part identifier "tblEmployees.LName" could not be bound.

Msg 4104, Level 16, State 1, Procedure mrmsp_RetrieveEmployeeForEditting, Line 31

The multi-part identifier "tblEmployees.FName" could not be bound.

Msg 4104, Level 16, State 1, Procedure mrmsp_RetrieveEmployeeForEditting, Line 32

The multi-part identifier "tblEmployees.MI" could not be bound.

Msg 4104, Level 16, State 1, Procedure mrmsp_RetrieveEmployeeForEditting, Line 33

The multi-part identifier "tblAddresses.AddressTypeID" could not be bound.

Msg 4104, Level 16, State 1, Procedure mrmsp_RetrieveEmployeeForEditting, Line 34

The multi-part identifier "tblAddresses.Address1" could not be bound.

Msg 4104, Level 16, State 1, Procedure mrmsp_RetrieveEmployeeForEditting, Line 35

The multi-part identifier "tblAddresses.Address2" could not be bound.

Msg 4104, Level 16, State 1, Procedure mrmsp_RetrieveEmployeeForEditting, Line 36

The multi-part identifier "tblAddresses.City" could not be bound.

Msg 4104, Level 16, State 1, Procedure mrmsp_RetrieveEmployeeForEditting, Line 37

The multi-part identifier "tblAddresses.StateID" could not be bound.

Msg 4104, Level 16, State 1, Procedure mrmsp_RetrieveEmployeeForEditting, Line 38

The multi-part identifier "tblAddresses.ZipCode" could not be bound.



I assume the SQL statement can’t bind the data from the indicated columns into the variables in the stored procedure.



What am I doing wrong?



Quecumber256
AnswerRe: The multi-part identifier "..." could not be bound. Pin
Rob Graham12-Feb-07 8:42
Rob Graham12-Feb-07 8:42 
AnswerRe: The multi-part identifier "..." could not be bound. Pin
Rob Graham12-Feb-07 8:59
Rob Graham12-Feb-07 8:59 
GeneralRe: The multi-part identifier "..." could not be bound. Pin
Quecumber25612-Feb-07 9:02
Quecumber25612-Feb-07 9:02 
Generalgridview filtering using dropdownlist and textbox Pin
bernie_01128-Feb-07 22:20
bernie_01128-Feb-07 22:20 
QuestionSql Server query needed Pin
Saira Tanwir12-Feb-07 4:43
Saira Tanwir12-Feb-07 4:43 
AnswerRe: Sql Server query needed Pin
Parwej Ahamad12-Feb-07 6:07
professionalParwej Ahamad12-Feb-07 6:07 
Question[Message Deleted] Pin
DeepaliVaibhav12-Feb-07 0:58
DeepaliVaibhav12-Feb-07 0:58 
AnswerRe: Multiple-step operation generated errors. Check each status value. Pin
Blue_Boy12-Feb-07 1:04
Blue_Boy12-Feb-07 1:04 
AnswerRe: Multiple-step operation generated errors. Check each status value. Pin
Pete O'Hanlon12-Feb-07 3:06
mvePete O'Hanlon12-Feb-07 3:06 
QuestionLast Accessed Date Pin
Logup12-Feb-07 0:45
Logup12-Feb-07 0:45 
AnswerRe: Last Accessed Date Pin
andyharman12-Feb-07 3:16
professionalandyharman12-Feb-07 3:16 
QuestionDisplaying a record per day Pin
Logup11-Feb-07 22:57
Logup11-Feb-07 22:57 
AnswerRe: Displaying a record per day Pin
andyharman12-Feb-07 1:09
professionalandyharman12-Feb-07 1:09 
Questionselect distinct On multiple fields Pin
hamidreza_buddy11-Feb-07 22:26
hamidreza_buddy11-Feb-07 22:26 
AnswerRe: select distinct On multiple fields Pin
Sushant Duggal11-Feb-07 22:39
Sushant Duggal11-Feb-07 22:39 
AnswerRe: select distinct On multiple fields Pin
M A A Mehedi Hasan11-Feb-07 23:13
M A A Mehedi Hasan11-Feb-07 23:13 
GeneralRe: select distinct On multiple fields Pin
Sushant Duggal12-Feb-07 0:06
Sushant Duggal12-Feb-07 0:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.