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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:33:46+00:00 2026-06-10T22:33:46+00:00

I create a stored procedure in which I call two functions . I’m getting

  • 0

I create a stored procedure in which I call two functions .

I’m getting an error:

Msg 4104, Level 16, State 1, Procedure Add_Translation, Line 25
The multi-part identifier “.word” could not be bound.

This is my stored procedure:

ALTER PROCEDURE [dbo].[Add_Translation]
   @english nvarchar(70), 
   @kurdish nvarchar(70),
   @english_category int,
   @kurdish_category int,
   @result int out
AS
BEGIN
    SET NOCOUNT ON;

    if @english is not null and @kurdish is not null and @english_category is not null and @kurdish_category is not null
    begin
        declare @intEnId int=-1;
        exec @intEnId = Check_English_word @text = @english;

        declare @identityEnglish int;
        declare @identityKurdish int;

        if @intEnId = -1
        begin
            insert into english_table values(@english, @english_category);
            set @identityEnglish = SCOPE_IDENTITY();
        end
        else
        begin
            set @identityEnglish = (select e.english_id from english_table e where UPPER(.word)=UPPER(@english)); 
        end

        declare @intKuId int=-1;
        exec @intKuId=Check_Kurdish_Word @word=@kurdish;

        if @intKuId =-1
        begin
            insert into kurdish_table values(@kurdish, @kurdish_category);

            set @identityKurdish = SCOPE_IDENTITY();
        end
        else
        begin
            set @identityKurdish = (select k.kurdish_id from kurdish_table k where upper(k.word)=upper(@kurdish));
        end

        declare @translated int =0;

        exec @translated = Check_Translation @english_id = @identityEnglish, @kurdish_id = @identityKurdish;

            if @translated=0
        begin
            insert into transactions values(@identityEnglish, @identityKurdish);
            set @result = 1;
        end
        else
        begin
            set @result = 2;
        end
    end
    else
    begin
        set @result = 0;
    end
END

Here is the first function:

ALTER FUNCTION [dbo].[Check_English_word] 
(
@text nvarchar(70) 
)
RETURNS int
AS
BEGIN

    DECLARE @Result int
    set @Result=-1;

    if @text is not null
    begin

        SELECT @Result = e.english_id 
            from english_table e 
            where UPPER(e.word) = UPPER(@text); 
    end

    RETURN @Result
END

Second function:

ALTER FUNCTION [dbo].[Check_Kurdish_Word] 
(
@word nvarchar(70) 
)
RETURNS int
AS
BEGIN
    DECLARE @Result int
    set @Result=-1;

if @word is not null
    begin
        SELECT @Result = k.kurdish_id 
            from kurdish_table k  
            where UPPER(k.word) = UPPER(@word); 
    end

    RETURN @Result
END
  • 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-10T22:33:48+00:00Added an answer on June 10, 2026 at 10:33 pm

    You are missing an e in this line

            set @identityEnglish=(select e.english_id from english_table e 
                  where UPPER(.word)=UPPER(@english));  
    

    Change it to

            set @identityEnglish=(select e.english_id from english_table e 
                  where UPPER(e.word)=UPPER(@english));  
    

    Also, it is good practice to specify columns when doing an insert –
    ie

    insert into english_table values(@english,@englsih_category); 
    

    should be

    insert into english_table (word, category) values(@english,@englsih_category); 
    
    • 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 which returns a ref cursor as follows: CREATE OR
I have a stored procedure in which i want to create a user defined
I would like to create a stored procedure with parameters that indicate which fields
I want to create stored procedure that call recursion function, each time it will
I have sql stored procedure which pass and return some values: CREATE PROCEDURE [dbo].[GetMoney]
I need to create a stored procedure which will get destination IP and then
I have a stored procedure which when i call from MSSQL Server GUI.It returns
I want to call the Stored Procedure which returns a table in the Table
How can I create an Oracle stored procedure which accepts a variable number of
I want to write a Stored procedure...which will create a table with xyz name

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.