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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:57:12+00:00 2026-05-30T09:57:12+00:00

I have a stored procedure called Evaluate(something1, something2); Evaluate will take a some parameters,

  • 0

I have a stored procedure called Evaluate(something1, something2);
Evaluate will take a some parameters, search for them in the database and insert findings into a result table.

Now I wish to create some type of stored procedure that will constantly call Evaluate to iterate over an entire comma-delimited file. Is this possible?

psuedo code

assessEntireFile()
{
  loop file
    Evaluate(single line from file)
   end loop
}



**The work flow of assessEntireFile() will be as followed:**
1. call assessEntireFile()
   --assessEntireFile will load and iterate over an input file (line-by-line)
2. each iteration will call Evaluate() on that line
   --evualte() will produce results in a table
3. complete
  • 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-05-30T09:57:13+00:00Added an answer on May 30, 2026 at 9:57 am
    DELIMITER $$
    
    CREATE PROCEDURE assessEntireTable()
      READS SQL DATA
    BEGIN
    
    -- Declare variables according to your table/file structure
      DECLARE field1 int DEFAULT 0;
      DECLARE field2 VARCHAR(250) CHARACTER SET utf8;
    -- /Declare variables according to your table/file structure
    
      DECLARE done int DEFAULT 0;
      DECLARE currentrow CURSOR FOR SELECT * FROM assessEntireFileTmp; 
      DECLARE CONTINUE HANDLER FOR NOT FOUND SET done=1;
    
      OPEN currentrow;
    -- Adapt next line according to your table/file structure
      FETCH currentrow INTO field1,field2, ... ;
      WHILE done=0 DO
    -- Adapt next 2 lines according to your table/file structure
         CALL Evaluate(field1, field2, ...);
         FETCH currentrow INTO field1,field2, ... ;
      END WHILE;
    END $$
    
    CREATE PROCEDURE assessEntireFile()
    BEGIN
      DROP TABLE IF EXISTS assessEntireFileTmp;
      CREATE TABLE assessEntireFileTmp (
    
    --  Your needed structure here
    
      );
      LOAD DATA INFILE '<file_name>'
         INTO TABLE assessEntireFileTmp
    --   More needed parameters here
      ;
    
      CALL assessEntireTable();
    
      DROP TABLE assessEntireFileTmp;
    END $$  
    
    DELIMITER ;
    
    • 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 called spGetOrders which accepts a few parameters: @startdate and
So I have a stored procedure called Spr_EventLogCreate defined in my database. I have
I have to improve some code where an Oracle stored procedure is called from
I need a some stored procedure that called like: search('foo bar') makes a search
I have a stored procedure in MySql to insert some rows. The stored procedure
I have a somewhat-long-running stored procedure being called from a PB application. I want
I am writing a stored procedure where I have an input parameter called my_size
I'd like to have NHibernate call a stored procedure when ISession.Get is called to
I have a SQL Server 2008 database. This database has a stored procedure that
I have a stored procedure called usp_getTotalOrder which looks like Select * from Order

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.