Horje
create cursor in NETEZZA Code Example
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;




Csharp

Related
entityframework command to build model from database Code Example entityframework command to build model from database Code Example
c# make two checkbox uncheckable both Code Example c# make two checkbox uncheckable both Code Example
c# find the smallest string in an array of strings Code Example c# find the smallest string in an array of strings Code Example
GetNetworkTime Code Example GetNetworkTime Code Example
dapper c# insert range Code Example dapper c# insert range Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11