Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2007
    Posts
    1

    Unanswered: Pls help me with this query...

    DECLARE @sql varchar(8000;
    v_counter INTEGER DEFAULT 0;
    v_given VARCHAR(12);
    v_surname CHAR(22);
    v_surname VARCHAR(60);
    v_city VARCHAR(13);
    v_state VARCHAR(2);
    v_zip VARCHAR(5);
    v_census_tract VARCHAR(12);
    v_matchcode VARCHAR(22);
    v_state VARCHAR(2);
    v_state_code VARCHAR(2);
    v_c1 CURSOR FOR
    EXEC SQL END DECLARE SECTION;
    SELECT given, surname, address, city, state, zip, census_tract, matchcode, state_code, state
    FROM ethnic_vendor_data;
    DECLARE CONTINUE HANDLER FOR NOT FOUND
    SET counter = -1;
    OPEN c1;
    fetch_loop:
    LOOP
    FETCH c1 INTO v_given; v_surname; v_lastname; v_surname; v_city; v_state; v_zip; v_census_tract; v_matchcode; v_state; v_state_code;
    IF v_state = ' ' THEN
    LEAVE fetch_loop;
    END IF;
    SET v_counter = v_counter + 1;
    END LOOP fetch_loop;
    SET counter = v_counter;
    CLOSE c1;
    BEGIN
    ...
    END;

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    consider yourself as being helped (& what exactly is your question?)
    P.S.
    Please use CODE tags in the future. (See #1 STICKY post for details).
    Last edited by anacedent; 02-06-07 at 11:49.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    What is the problem that you need help with.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  4. #4
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    If you ask me, this question (what question?) has been posted in WRONG forum. Because, if it really is Oracle code, I've never seen Oracle look like this.

    Sharaika, are you sure it is Oracle?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •