Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

create cursor in NETEZZA

CREATE OR REPLACE PROCEDURE SP_NEW_PROCEDURE1( )
RETURNS REFTABLE(employees)
LANGUAGE NZPLSQL AS
BEGIN_PROC
  DECLARE

l_conditions  varchar(1000);
p_rec         RECORD;

BEGIN

FOR P_REC IN  select empid, mgrid, empname, salary  from employees where mgrid = 7 
LOOP


        l_conditions  :=  'insert into  '  || 
                          REFTABLENAME     || 
                          '  VALUES ('     || 
                          quote_literal(P_REC.EMPID)  || 
                          ','              || 
                          quote_literal(P_REC.MGRID)    || 
                          ','              || 
                          quote_literal(P_REC.EMPNAME)   || 
                          ','              || 
                          quote_literal(P_REC.SALARY )    || 
                          '  ) ; ' ;

 execute immediate l_conditions; 

  l_conditions  := ' ';

END LOOP;      
RETURN REFTABLE;
END;
END_PROC;
Comment

PREVIOUS NEXT
Code Example
Csharp :: return last row if all other condition fails in linq c# 
Csharp :: Make child unaffected by parents rotation Unity 
Csharp :: c# async rethrow exception 
Csharp :: unity int inputfield value 
Csharp :: c# custom comment tags 
Csharp :: C# Associativity of Operators 
Csharp :: asp.net web hooks 
Csharp :: como ordenar dados na gridview c# 
Csharp :: c# control datagridview null value 
Csharp :: unity slider decimal 0.01 
Csharp :: cassandra Keyspaces repository .net 
Csharp :: txtbox.fous in c# 
Csharp :: invalid length for a base-64 char array or string. frombase64string c# 
Csharp :: asp.net razor get list without refresh 
Csharp :: how to reset checkbox visual studio c# 
Csharp :: c# SQLite execute Command 
Csharp :: convert bool to uint in solidity 
Csharp :: windows forms webbrowser goback 
Csharp :: c# array does not contain a definition for cast 
Csharp :: .net SaveChanges vs update difference 
Csharp :: how to detected WindowCloseEvent in other window wpf 
Csharp :: wait for threadpool to complete with decrement 
Csharp :: c# random change seed 
Csharp :: net use error 67 
Csharp :: c# array accessor 
Csharp :: nunjuck if exist 
Csharp :: rest api in c# 
Csharp :: c# convert string to datetime 
Csharp :: unity destroy 
Csharp :: c# for loop last iteration 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =