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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:29:01+00:00 2026-06-10T03:29:01+00:00

I’m new to Oracle, so bear with me on this – I’ll do as

  • 0

I’m new to Oracle, so bear with me on this – I’ll do as best I can.

I’m writing a stored procedure. After the AS statement completes, I have the following code:

BEGIN
IF v_Node = NULL
    BEGIN
      SET v_Node = LEFT(v_Tag, INSTR('.', v_Tag)-1)
      SET v_Node = (SELECT v_NodeId FROM DBO.nodes WHERE Node = v_Node)
    END

which we I compile spits out the following error:

Error(23,5): PLS-00103: Encountered the symbol "BEGIN" when expecting one of the following: * & - + / at mod remainder rem then <an exponent (**)> and or || multiset

Can anyone help with this?
Cheers

  • 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-10T03:29:02+00:00Added an answer on June 10, 2026 at 3:29 am

    I suspect that you want something like

    CREATE OR REPLACE PROCEDURE <<procedure name>>( <<parameter list>> )
    AS
      <<variable declarations>>
    BEGIN
      IF v_Node IS NULL
      THEN
        v_Node := substr( v_tag, 1, instr( '.', v_tag ) - 1 );
        SELECT v_NodeId -- Is v_NodeID really a column in dbo.nodes?  The naming 
                        -- convention would imply that it is a local variable in 
                        -- which case the SELECT statement doesn't make a lot of 
                        -- sense.
          INTO v_node
          FROM dbo.nodes
         WHERE node = v_node;
      END IF;
    
      <<more code>>
    END;
    

    The explanation

    1. No value is ever equal to NULL, not even another NULL. You need to use the IS NULL operator.
    2. Oracle does not have a LEFT function. You probably want SUBSTR.
    3. SET is not a valid PL/SQL operator. You can use the := operator to assign the result of an expression to a variable. And you can use SELECT ... INTO to assign the result of a SQL query to a local variable.

    The remaining issues

    1. It seems odd that you appear to be using the same local variable v_Node both to assign the Node string you want to search for and to hold the presumably numeric v_NodeId that you select from the table. If that is really your intention, you would want separate variables.
    2. The SELECT statement that you wrote doesn’t make sense. If v_NodeId is a local variable, as the naming convention implies, it doesn’t make sense to select it from the dbo.nodes table. It would seem more likely that you want to select the NodeId (assuming that is a column in dbo.nodes).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a jquery bug and I've been looking for hours now, I can't
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
Does anyone know how can I replace this 2 symbol below from the string
I have a bunch of posts stored in text files formatted in yaml/textile (from

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.