Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 t-sql

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-06-09 : 07:11:17
writes "Create OR Replace Procedure FirstLineConOS
(TableName In VarChar2,SelDate In VarChar2,SelSeq In Number,StrFile_Date In Varchar2)
AS
FDate VarChar2(20);
SqlStr VarChar2(200);
RCNum VarChar2(2000);
ColName VarChar(10);
Cursor RCNumber IS Select RCNumber From RCNumber where upper(trim(UName)) in (Select upper(Trim(Login_Name)) from hierarchy where upper(Trim(utype)) = 'WO') order by rcnumber ;
Cursor ConTable Is Select * from CarlConTable;
Begin
Select F_Start_Date InTO FDate From F_Sequence Where F_QDate = SelDate And F_S_Num = SelSeq ;
sqlstr := 'Insert into CarlConTable (GroupOf,FileDate) ';
SqlStr := SqlStr || 'Values ('||''''||'Q2'||''''||','||''''||'Outstanding as of '||FDate||''''|| ')';
execute immediate sqlstr;
RCNum := '';
For i in RCNumber
Loop
RCNum := RCNum || i.RCNumber || ',';
End Loop;
if substr(RCNum,Length(RCNum) -1) = ',' then
RCNum := SubStr(RCNum, (Length(RCNum) - 1));
End If;
For i in ConTable
Loop
If Length(Trim(i.Name)) = 2 Then
ColName := Trim(i.Name);
Else
ColName := Mid(Trim(i.Name), 3, (Length(Trim(i.Name))));
End If;
End Loop;
Execute Immediate 'Commit';
end;
/"

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2004-06-09 : 09:51:38
And your question/problem is?????????
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-06-09 : 10:36:41
this smells like oracle to me... :))

Go with the flow & have fun! Else fight the flow :)
Go to Top of Page
   

- Advertisement -