Stored DB Procedure - Need help
Hi. I have a stored database package containing 2 functions. I need help with the function named ret_columns.
If you look at the code below you will see this function has two different FOR loops. The Select statement in FOR loop that is commented out works just fine, but when I try to use the uncommented select statement in it's place the Function returns NULL (or no records). However, if I run the Select statement in plain old SQL Plus it returns the rows I need. I don't get it.
Can anyone help me? I'm really stuck on this one.
-- PACKAGE BODY
CREATE OR REPLACE package body audit_table_info
as
function ret_tables return table_type is
t_t table_type;
i integer;
begin
i := 1;
for rec in (select distinct table_name
from all_triggers
where substr(trigger_name,1,9) = upper('tr_audit#')) loop
t_t(i).tableA := rec.table_name;
i := i+1;
end loop;
return t_t;
end;
function ret_columns return column_type is
c_t column_type;
i integer;
begin
i := 1;
-- for rec in (select distinct table_name column_name
-- from all_triggers
-- where substr(trigger_name,1,9) = upper('tr_audit#')) loop
for rec in (select distinct b.column_name column_name
from all_triggers a, all_tab_columns b
where a.table_owner = b.owner
and a.table_name = b.table_name
and substr(a.trigger_name,1,9) = upper('tr_audit#') and rownum < 5) loop
c_t(i).tableB := rec.column_name;
i := i+1;
end loop;
return c_t;
end;
end audit_table_info;
-- PACKAGE DEFINITION
CREATE OR REPLACE package Audit_Table_Info as
type table_rec is record( tableA all_tab_columns.TABLE_NAME%type);
type table_type is table of table_rec index by binary_integer;
function ret_tables return table_type;
type column_rec is record( tableB all_tables.TABLE_NAME%type);
type column_type is table of column_rec index by binary_integer;
function ret_columns return column_type;
end Audit_Table_Info;
/
It works when I do this!!! I'm so confused.
Ok...so I did this:
1 create table test_columns as
2 (select b.column_name
3 from all_triggers a,
4 all_tab_columns b
5 where a.table_owner = b.owner
6 and a.table_name = b.table_name
7 and substr(a.trigger_name,1,9) = upper('tr_audit#')
8* and rownum < 5)
SQL> /
Table created.
Then altered the Function so the Select statement refers to this table:
function ret_columns return column_type is
c_t column_type;
i integer;
begin
i := 1;
for rec in (select distinct column_name
from test_columns) loop
c_t(i).tableB := rec.column_name;
i := i+1;
end loop;
return c_t;
end;
Again, any help would be greatly greatly appreciated!
Similar Messages
-
I need help proving the date tag on a photo stored in my iPhoto is from the date it was sent to my iphone/date it was imported into iphoto - and that it is NOT the date the photo was actually taken. I recieved a photo via text on my iphone and then I synced my iphone to my macbook and now it is in iphoto. I already know that the date on the photo per the tag that shows up on it in iphoto is NOT the date the photo was actually taken. I need article or literature or something confirming the tag is from when it was sent to the iphone and/or when it was imported. I greatly appreciate some assistance!
All I am trying to do is find something on a forum board or article etc stating that the the date showing in iphoto could be the date it was imported or synced or sent to me and not the actual date taken.
The date on the photo could be anything because you can edit the date with iPhoto or any of 100 apps, free and paid for. So, the date on the photo will prove nothing, I'm afraid.
Regards
TD -
All,
I have a function and a procedure in a package. The function is called by the procedure. The function returns multiple records with multiple fields in a table type. The procedure uses those values to update the database. My question is how can I get those values to update database. Need sample of code.
beloew is my package:
CREATE OR REPLACE PACKAGE "test_record2" as
type V_testre is record (
USER_ID NUMBER,
B_ID NUMBER,
A_ID NUMBER);
Type T_userInfo is table of user_Access %rowtype
index by binary_integer;
procedure get_info(userid in number);
function P_GetProfile(userid in number) return T_userInfo;
end;/
CREATE OR REPLACE PACKAGE BODY "test_record2" as
procedure get_info(userid in number) as
get_access T_userInfo;
v_userid number;
begin
get_access := P_GetProfile(v_userid);
--How to get the values from get_access to do the insert.
--Need help here!!!
--insert into test_access values get_access
end;
-- test table
function P_GetProfile(userid in number) return T_userInfo is
profile_info T_userInfo;
CURSOR c1 IS
select * from user_Access
where USER_ID = userid;
BEGIN
OPEN c1;
FETCH c1 BULK COLLECT INTO profile_info;
return profile_info;
END;
End;
--create the table
CREATE TABLE user_access (user_id NUMBER, m_id NUMBER, n_id NUMBER);
INSERT INTO user_access VALUES (1, 11, 111);
INSERT INTO user_access VALUES (1, 22, 222);
INSERT INTO user_access VALUES (1, 33, 333);
INSERT INTO user_access VALUES (2, 11, 111);
INSERT INTO user_access VALUES (2, 22, 222);
INSERT INTO user_access VALUES (2, 33, 333);CALL is not valid PL/SQL. (In fact, it's only valid in OLAP).
You want either...
BEGIN
test_record2.get_info(1);
END;
/...or (in SQL*Plus)....
EXEC test_record2.get_info(1)I commend the documentation to you.
Cheers, APC -
i need help. every time i turn on my laptop an error message pops up: the procedure entry point sqlite_wao -checkpoint could not be located in the dynamic link library SQLite3.dlll HOW DO I FIX THIS?
Hi whatsthe77,
Welcome to Apple Support Communities.
You may want to follow the steps in this article to reinstall iTunes:
Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
http://support.apple.com/kb/HT1923
Have a great day,
Jeremy -
Need help in storing data from JList into a vector
need help in doing the following.-
alright i click a skill on industryskills Jlist and press the add button and it'll be added to the applicantskills Jlist. how do i further store this data that i added onto the applicantskills JList into a vector.
here are the codes:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import java.text.*;
import java.util.*;
import java.util.Vector;
import javax.swing.JScrollPane.*;
//import javax.swing.event.ListSelectionListener;
public class Employment extends JFrame
//declare class variables
private JPanel jpApplicant, jpEverything,jpWEST, jpCENTRE, jpEAST, jpAddEditDelete,
jpCentreTOP, jpCentreBOT, jpEastTOP, jpEastCENTRE, jpEastBOT,
jpBlank1, panel1, panel2, panel3, panel4,jpBottomArea,
jpEmptyPanelForDisplayPurposes;
private JLabel jlblApplicantForm, jlblAppList, jlblName, jlblPhone,
jlblCurrentSalary, jlblPassword, jlblDesiredSalary,
jlblNotes, jlblApplicantSkills, jlblIndustrySkills,
jlblBlank1, jlblBlank2, ApplicantListLabel,
NotesListLabel, ApplicantSkillsLabel,
IndustrySkillsLabel,jlblEmptyLabelForDisplayPurposes;
private JButton jbtnAdd1, jbtnEdit, jbtnDelete, jbtnSave, jbtnCancel,
jbtnAdd2, jbtnRemove;
private JTextField jtfName, jtfPhone, jtfCurrentSalary, jtfPassword,
jtfDesiredSalary;
private JTabbedPane tabbedPane;
private DefaultListModel /*listModel,*/listModel2;
String name,password,phone,currentsalary,desiredsalary,textareastuff,NotesText;
String selectedname;
final JTextArea Noteslist= new JTextArea();;
DefaultListModel listModel = new DefaultListModel();
JList ApplicantSkillsList = new JList(listModel);
private ListSelectionModel listSelectionModel;
JList ApplicantList, /*ApplicantSkillsList,*/ IndustrySkillsList;
//protected JTextArea NotesList;
//Vector details = new Vector();
Vector<StoringData> details = new Vector<StoringData>();
public static void main(String []args)
Employment f = new Employment();
f.setVisible(true);
f.setDefaultCloseOperation(EXIT_ON_CLOSE);
f.setResizable(false);
}//end of main
public Employment()
setSize(800,470);
setTitle("E-commerce Placement Agency");
Font listfonts = new Font("TimesRoman", Font.BOLD, 12);
JPanel topPanel = new JPanel();
topPanel.setLayout( new BorderLayout() );
getContentPane().add( topPanel );
createPage1();
createPage2();
createPage3();
createPage4();
tabbedPane = new JTabbedPane();
tabbedPane.addTab( "Applicant", panel1 );
tabbedPane.addTab( "Job Order", panel2 );
tabbedPane.addTab( "Skill", panel3 );
tabbedPane.addTab( "Company", panel4 );
topPanel.add( tabbedPane, BorderLayout.CENTER );
public void createPage1()//PAGE 1
/*******************TOP PART********************/
panel1 = new JPanel();
panel1.setLayout( new BorderLayout());
jpBottomArea = new JPanel();
jpBottomArea.setLayout(new BorderLayout());
jpApplicant= new JPanel();
jpApplicant.setLayout(new BorderLayout());
Font bigFont = new Font("TimesRoman", Font.BOLD,24);
jpApplicant.setBackground(Color.lightGray);
jlblApplicantForm = new JLabel("\t\t\t\tAPPLICANT FORM ");
jlblApplicantForm.setFont(bigFont);
jpApplicant.add(jlblApplicantForm,BorderLayout.EAST);
panel1.add(jpApplicant,BorderLayout.NORTH);
panel1.add(jpBottomArea,BorderLayout.CENTER);
/********************************EMPTY PANEL FOR DISPLAY PURPOSES*************************/
jpEmptyPanelForDisplayPurposes = new JPanel();
jlblEmptyLabelForDisplayPurposes = new JLabel(" ");
jpEmptyPanelForDisplayPurposes.add(jlblEmptyLabelForDisplayPurposes);
jpBottomArea.add(jpEmptyPanelForDisplayPurposes,BorderLayout.NORTH);
/*****************************************WEST*********************************/
jpWEST = new JPanel();
jpWEST.setLayout( new BorderLayout());
//Applicant List
listModel2=new DefaultListModel();
ApplicantList = new JList(listModel2);
listSelectionModel = ApplicantList.getSelectionModel();
listSelectionModel.addListSelectionListener(new SharedListSelectionHandler());
JScrollPane scrollPane3 = new JScrollPane(ApplicantList);
ApplicantList.setPreferredSize(new Dimension(20,40));
scrollPane3.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
scrollPane3.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
ApplicantListLabel = new JLabel( "Applicant List:");
jpWEST.add(ApplicantListLabel,"North");
jpWEST.add(scrollPane3,"Center");
jpBottomArea.add(jpWEST,BorderLayout.WEST);
/*********CENTRE*********/
jpCENTRE = new JPanel();
jpCENTRE.setLayout(new GridLayout(2,1));
jpCentreTOP = new JPanel();
jpBottomArea.add(jpCENTRE,BorderLayout.CENTER);
jpCENTRE.add(jpCentreTOP);
jpCentreTOP.setLayout(new GridLayout(6,2));
//Creating labels and textfields
jlblName = new JLabel( "Name:");
jlblBlank1 = new JLabel ("");
jtfName = new JTextField(18);
jlblBlank2 = new JLabel("");
jlblPhone = new JLabel("Phone:");
jlblCurrentSalary = new JLabel("Current Salary:");
jtfPhone = new JTextField(13);
jtfCurrentSalary = new JTextField(7);
jlblPassword = new JLabel("Password:");
jlblDesiredSalary = new JLabel("Desired Salary:");
jtfPassword = new JTextField(13);
jtfDesiredSalary = new JTextField(6);
//Add labels and textfields to panel
jpCentreTOP.add(jlblName);
jpCentreTOP.add(jlblBlank1);
jpCentreTOP.add(jtfName);
jpCentreTOP.add(jlblBlank2);
jpCentreTOP.add(jlblPhone);
jpCentreTOP.add(jlblCurrentSalary);
jpCentreTOP.add(jtfPhone);
jpCentreTOP.add(jtfCurrentSalary);
jpCentreTOP.add(jlblPassword);
jpCentreTOP.add(jlblDesiredSalary);
jpCentreTOP.add(jtfPassword);
jpCentreTOP.add(jtfDesiredSalary);
//Noteslist
jpCentreBOT = new JPanel();
jpCentreBOT.setLayout( new BorderLayout());
jpCENTRE.add(jpCentreBOT);
jpBlank1 = new JPanel();
// Noteslist = new JTextArea(/*Document doc*/);
JScrollPane scroll3=new JScrollPane(Noteslist);
scroll3.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
scroll3.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
NotesListLabel = new JLabel( "Notes:");
jpCentreBOT.add(NotesListLabel,"North");
jpCentreBOT.add(scroll3,"Center");
jpCentreBOT.add(jpBlank1,"South");
jpBottomArea.add(jpCENTRE,BorderLayout.CENTER);
/**********EAST**********/
//Applicant Skills Panel
//EAST ==> TOP
jpEAST = new JPanel();
jpEAST.setLayout( new BorderLayout());
jpEastTOP = new JPanel();
jpEastTOP.setLayout( new BorderLayout());
ApplicantSkillsLabel = new JLabel( "Applicant Skills");
JScrollPane scrollPane1 = new JScrollPane(ApplicantSkillsList);
scrollPane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
scrollPane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
ApplicantSkillsList.setVisibleRowCount(6);
jpEastTOP.add(ApplicantSkillsLabel,"North");
jpEastTOP.add(scrollPane1,"Center");
jpEAST.add(jpEastTOP,BorderLayout.NORTH);
jpBottomArea.add(jpEAST,BorderLayout.EAST);
//Add & Remove Buttons
//EAST ==> CENTRE
jpEastCENTRE = new JPanel();
jpEAST.add(jpEastCENTRE,BorderLayout.CENTER);
jbtnAdd2 = new JButton("Add");
jbtnRemove = new JButton("Remove");
//add buttons to panel
jpEastCENTRE.add(jbtnAdd2);
jpEastCENTRE.add(jbtnRemove);
//add listener to button
jbtnAdd2.addActionListener(new Add2Listener());
jbtnRemove.addActionListener(new RemoveListener());
//Industry Skills Panel
//EAST ==> BOTTOM
jpEastBOT = new JPanel();
jpEastBOT.setLayout( new BorderLayout());
String[] data = {"Access97", "Basic Programming",
"C++ Programming", "COBOL Programming",
"DB Design", "Fortran programming"};
IndustrySkillsList = new JList(data);
JScrollPane scrollPane = new JScrollPane(IndustrySkillsList);
scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
IndustrySkillsLabel = new JLabel( "Industry Skills:");
jpEastBOT.add(IndustrySkillsLabel,"North");
jpEastBOT.add(scrollPane,"Center");
jpEAST.add(jpEastBOT,BorderLayout.SOUTH);
//BOTTOM
jpAddEditDelete= new JPanel();
jbtnAdd1= new JButton("Add");
jbtnEdit= new JButton("Edit");
jbtnDelete= new JButton("Delete");
jbtnSave= new JButton("Save");
jbtnCancel= new JButton("Cancel");
jpAddEditDelete.add(jbtnAdd1);
jpAddEditDelete.add(jbtnEdit);
jpAddEditDelete.add(jbtnDelete);
jpAddEditDelete.add(jbtnSave);
jpAddEditDelete.add(jbtnCancel);
jbtnEdit.addActionListener(new EditListener());
jbtnDelete.addActionListener(new DeleteListener());
jbtnEdit.addActionListener(new EditListener());
jbtnAdd1.addActionListener(new Add1Listener());
jbtnCancel.addActionListener(new CancelListener());
jpBottomArea.add(jpAddEditDelete,BorderLayout.SOUTH);
public void createPage2()//PAGE 2
panel2 = new JPanel();
panel2.setLayout( new GridLayout(1,1) );
panel2.add( new JLabel( "Sorry,under construction" ) );
public void createPage3()//PAGE 3
panel3 = new JPanel();
panel3.setLayout( new GridLayout( 1, 1 ) );
panel3.add( new JLabel( "Sorry,under construction" ) );
public void createPage4()//PAGE 4
panel4 = new JPanel();
panel4.setLayout( new GridLayout( 1, 1 ) );
panel4.add( new JLabel( "Sorry,under construction" ) );
public class Add1Listener implements ActionListener
public void actionPerformed(ActionEvent e)
name = jtfName.getText();
password = jtfPassword.getText();
phone = jtfPhone.getText();
currentsalary = jtfCurrentSalary.getText();
int i= Integer.parseInt(currentsalary);
desiredsalary = jtfDesiredSalary.getText();
int j= Integer.parseInt(desiredsalary);
StoringData person = new StoringData(name,password,phone,i,j);
// StoringData AppSkillsList = new StoringData(listModel);
details.add(person);
// details.add(AppSkillsList);
listModel2.addElement(name);
jtfName.setText("");
jtfPassword.setText("");
jtfPhone.setText("");
jtfCurrentSalary.setText("");
jtfDesiredSalary.setText("");
// NotesList.setText("");
public class Add2Listener implements ActionListener
public void actionPerformed(ActionEvent e)
String temp1;
temp1 = (String)IndustrySkillsList.getSelectedValue();
listModel.addElement(temp1);
public class RemoveListener implements ActionListener
public void actionPerformed(ActionEvent e)
int index = ApplicantSkillsList.getSelectedIndex();
listModel.remove(index);
public class EditListener implements ActionListener
public void actionPerformed(ActionEvent e)
jtfName.setEditable(true);
jtfPassword.setEditable(true);
jtfPhone.setEditable(true);
jtfCurrentSalary.setEditable(true);
jtfDesiredSalary.setEditable(true);
Noteslist.setEditable(true);
jbtnAdd2.setEnabled(true);
jbtnRemove.setEnabled(true);
jbtnSave.setEnabled(true);
jbtnCancel.setEnabled(true);
public class DeleteListener implements ActionListener
public void actionPerformed(ActionEvent e)
int index1 = ApplicantList.getSelectedIndex();
listModel2.remove(index1);
public class SaveListener implements ActionListener
public void actionPerformed(ActionEvent e)
public class CancelListener implements ActionListener
public void actionPerformed(ActionEvent e)
jtfName.setText("");
jtfPassword.setText("");
jtfPhone.setText("");
jtfCurrentSalary.setText("");
jtfDesiredSalary.setText("");
public class SharedListSelectionHandler implements ListSelectionListener
public void valueChanged(ListSelectionEvent e)
selectedname =ApplicantList.getSelectedValue().toString();
StoringData selectedPerson = null;
jtfName.setEditable(false);
jtfPassword.setEditable(false);
jtfPhone.setEditable(false);
jtfCurrentSalary.setEditable(false);
jtfDesiredSalary.setEditable(false);
Noteslist.setEditable(false);
jbtnAdd2.setEnabled(false);
jbtnRemove.setEnabled(false);
jbtnSave.setEnabled(false);
jbtnCancel.setEnabled(false);
for (StoringData person : details)
if (person.getName1().equals(selectedname))
selectedPerson = person;
jtfName.setText(person.getName1());
jtfPassword.setText(person.getPassword1());
jtfPhone.setText(person.getPhone1());
//String sal1 = Integer.parseString(currentsalary);
// String sal2 = Integer.parseString(desiredsalary);
// jtfCurrentSalary.setText(sal1);
// jtfDesiredSalary.setText(sal2);
break;
// if (selectedPerson != null)
}Quit posting 300 line programs to ask a question. We don't care about your entire application. We only care about code that demonstrates your current problem. We don't want to read through 300 lines to try and find the line of code that is causing the problem.
If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.
Here is a simple SSCCE. Now make your changes and if you still have problems you have something simple to post. If it works then you add it to your real application.
Learn to simplify your problem by simplifying the code.
import java.awt.*;
import javax.swing.*;
public class ListTest2 extends JFrame
JList list;
public ListTest2()
String[] numbers = { "one", "two", "three", "four", "five", "six", "seven" };
list = new JList( numbers );
JScrollPane scrollPane = new JScrollPane( list );
getContentPane().add( scrollPane );
public static void main(String[] args)
ListTest2 frame = new ListTest2();
frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
frame.setSize(200, 200);
frame.setLocationRelativeTo( null );
frame.setVisible( true );
} -
I need help to find my photo's please (2500) on my backup drive.Lost them after doing a clean install of Mountan Lion I have tried to find them but had no luck. I use Time Machine with a 1TB Western Digital usb drive. Thanking anyone in anticipation of a solution.
-Reece,
We only have 1 single domain, 1 domain forest, no subdomains, only alias. I had replied to the other post as well. But I am happy to paste it here in case anyone want to read it.
So, after a few months of testing, capture and sending logs back and forth to Apple Engineers, we found out there is a setting in AD, under User Account that prevent us to log into AD from Mountain Lion. If you would go to your AD server, open up a user account properties, then go to Account tab, the "Do not require Kerberos preauthentication" option is checked. As soon as I uncheck that option, immediately I was able to log into AD on the Mac client. Apple engineers copied all my AD settings and setup a test environment on their end and match exact mine AD environment. They was able to reproduce this issue.
The bad part about this is... our environment required the "Do not require Kerberos preauthentication" is checked in AD, in order for our users to login into some of our Unix and Linux services. Which mean that it is impossible for us to remove that check mark because most, if not all of them some way or another require to login into applications that run on Unix and Linux. Apple is working to see if they can come up with a fix. Apparently, no one has report this issue except us. I believe most of you out there don't have that check mark checked in your environment... Anyone out there have any suggestion to by pass or have a work around for this? -
Need help configuring Excel Services
I've configured both the Excel Serives and Secure Store Target applications and continually receive the following error message when trying to view the Simple Projects List sample report:
An error occurred while accessing application id ProjectServerApplication from Secure Store Service. The following connections failed to refresh:
Project Server - Simple Projects List
The Server Logs show the following errors:
Access Denied: Claims stored in the credentials did not match with the group claim for a group app.
The Microsoft Secure Store Services application Secure Store Service failed to retrieve credentials. The error returned was 'Access Denied.' ...
Access is denied. (Fault Detail is equal to Microsoft.Office.SecureStoreService.Server.SecureStoreServiceFault)
SSS has failed with the following exception: Access is denied.
Unable to esablish a connection using credentials retrieved from SSS. This could be because the Unattended Service Account is not configured or because the credentials retrieved from SSS are not valid.
I've repeated the steps to create these configurations a few times, and continue to get the same errors. Any help would be appreciated!
ThanksHello,
I need help setting up excel services.
Excel service is already running on sharepoint server.
I have one reporting file which is generated by DBA with database connection. i want to upload that file under document library and i want whenever user open it through document library, it gets updated through database connection
This is my first time, so pls guide me
Reporting file has authentication set to --> None
Do i require any specific settings for authentication? like unattended account ? which username should i use
Connection String -->
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=True;User ID=ExcelServices;Initial Catalog=SurveyData;Data Source=jdb1;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=RSTKW7W-06709;Use Encryption for Data=False;Tag
with column collation when possible=False
http://../training/sptestsite/Medication_Audit_Report
http://../training/sptestsite/Medication_Audit_Data_Connection_Library/
Trusted File Location - is this place do i need to upload that reporting file?
Trusted Data Connection Libraries - is this place do i need to save connection file .odc ?
If i am not wrong, should i put
Trusted File Location = http://../training/sptestsite/Medication_Audit_Report
Trusted Data Connection Libraries = http://../training/sptestsite/Medication_Audit_Data_Connection_Library/
http://../training/sptestsite/Medication_Audit_Report -- Here only reporting file will be uploaded right?
http://../training/sptestsite/Medication_Audit_Data_Connection_Library/ -- Here only database connection .odc file will be uploaded?
what other settings are required. please correct me
my email address - [email protected]
Harsh -
Need help in Creating External Tables
Hi All,
I have a flat file containing numberic data, CLOB data, and also date columns data. I have to load this flat file data into staging server table using External tables. I have to write a stored procedure in such way creating exteranl tables dynamically. My question or need help from you people is that how to define the external table to load the CLOB data from flat file.
Thanks,
SankarThe LOCATION clause of an external table specifies the file or files to be read when the table is queried. You can change it to refer to different files without dropping and recreating the table and invalidating all dependent code.
Regarding DBMS_SQL, yes you can do it the hard way if you prefer.
Good point about CLOB columns in external tables. Quite possibly they are not supported, but I would have to check the manuals and try some examples. -
Error when extracting data with extractor 2lis_04_matnr - NEED HELP ASAP !!
Hi experts!
Got an error when extracting data with extractor 2lis_04_matnr.
System says (short dump):
DUMP TEXT START----
Runtime error: CONNE_IMPORT_WRONG_COMP_TYPE
Exception: CX_SY_IMPORT_MISMATCH_ERROR
Error when attempting to import object "MC04P_0MAT_TAB".
The current ABAP program "SAPLMCEX" had to be terminated because one of the statements could not be executed. This is probably due to an error in the ABAP program. When attempting to import data, it was discovered that the data type of the stored data was not the same as that specified in the program.
An exception occurred. This exception is dealt with in more detail below. The exception, which is assigned to the class 'CX_SY_IMPORT_MISMATCH_ERROR', was neither caught nor passed along using a RAISING clause, in the procedure "MCEX_BW_LO_API" "(FUNCTION)".
Since the caller of the procedure could not have expected this exception
to occur, the running program was terminated.
The reason for the exception is: When importing the object "MC04P_0MAT_TAB", the component no. 5 in the dataset has a different type from the corresponding component of the target object in the program "SAPLMCEX". <b>The data type is "D" in the dataset, but "C" in the program.</b>
DUMP TEXT END----
Please, can someone explain me how to solve it?
Really need help ASAP!
Thanks in advance,
Jaume
Message was edited by:
Jaume Saumell
Message was edited by:
Jaume SaumellHi,
Check this note: 328181
So you need to delete entries in SM13/LBWQ for application and also detup table content.
And then refill teh set up table.
If you are in production clear the entries by running collective run no of times for this application 04.
With rgds,
Anil Kumar Sharma .P -
Hello everyone,
This is the requirement,
I have a table like this below :
Actual table: Item_Seller
item_id
seller_name
12310450
Pro Team
12310450
CSNStores.com
12310451
CSNStores.com
12310452
CSNStores.com
12310452
Pro Team
12310453
Pro Team
12310691
CSNStores.com
12310691
Pro Team
12310692
CSNStores.com
12310692
Pro Team
The requirement is to concatenate seller_name in the table like below output, this should not be performed using a stored procedure. I need help in writing a select query to display the below output.
Item_id
sellername_concat
12310450
Pro Team,CSNStores.com
12310451
CSNStores.com
12310452
CSNStores.com,Pro Team
12310453
Pro Team
12310691
CSNStores.com,Pro Team
12310692
CSNStores.com,Pro Team
Any help would be much appreciated!
Thanks
MadhumathiJust this would be enough
SELECT item_id,
STUFF((SELECT ',' + seller_name
FROM Item_Seller
WHERE item_id = t.Item_id
FOR XML PATH(''),TYPE).value('.','varchar(max)'),1,1,'') AS SellerName_Concat
FROM (SELECT DISTINCT item_id FROM Item_Seller)t
see
http://visakhm.blogspot.in/2014/01/rowset-concatenation-with-special.html
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Where is the forum for TFS, I have found an issue related to its database I need help
Hello,
Where is the forum for TFS, I have found an issue related to its database I need help
One of the encrypted Stored Procedure is throwing an error and I have no
idea how to fix the problem.
EXEC dbo.InstallWorkItemWordsContains
FOR XML could not serialize the data for node 'nt_user_name' because it contains a character (0x0000) which is not allowed in XML. To retrieve this data using FOR XML, convert it to binary, varbinary or image
data type and use the BINARY BASE64 directive.
Msg 3616, Level 16, State 2, Line 1
An error was raised during trigger execution. The batch has been aborted and the user transaction, if any, has been rolled back.Hello,
Here are the
Visual Studio Team Foundation Server forums.
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book:
Windows PowerShell 2.0 Bible
My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}}) -
Need help using dbms_scheduler to submit an immediate job on the database
Hi. I need help using dbms_scheduler to submit an immediate job on the database. Essentially I want to issue a one-time call to an Oracle Stored Procedure - this procedure will then send an email. I've never used dbms_scheduler before, but here's what I have so far.
So my Program is a stored database procedure named 'TTMS.dropperVacationConflict_Notify', but my problem is that I need to pass 3 parameter values to this job each time I run it. This is what I can't figure out. The procedure expects an 'Id' as number(5), begin_dt as a date, and end_dt as a date.
How do I pass these values when I run my job? Can anyone help?
begin
dbms_scheduler.create_program(program_name=> 'PROG_DROPVACCONFLICTS_NOTIFY',
program_type=> 'STORED_PROCEDURE',
program_action=> 'TTMS.dropperVacationConflict_Notify',
number_of_arguments => 3,
enabled=>true,
comments=> 'Procedure to notify PCM of a Dropper Vacation Conflict. Pass in Dropper Id, Begin_dt, and End_dt');
end;
begin
dbms_scheduler.create_schedule
(schedule_name=> 'INTERVAL_EVERY5_MINUTES',
start_date=> trunc(sysdate)+18/24,
repeat_interval => 'freq=MINUTELY;interval=5',
end_date => null
comments=> 'Runtime: Every day all 5 minutes, forever'
end;
begin
dbms_scheduler.create_job
(job_name => 'JOB_DROPVACCONFLICTS_NOTIFY',
program_name => 'PROG_DROPVACCONFLICTS_NOTIFY',
schedule_name => 'INTERVAL_EVERY5_MINUTES',
enabled => true,
auto_drop => true,
comments => 'Job to notify PCM of Dropper Vacation Conflicts'
end;
/And I use this to execute the job as needed...
begin
dbms_scheduler.run_job('JOB_DROPVACCONFLICTS_NOTIFY',true);
end;
/Duplicate Post
Need help using dbms_scheduler to submit an immediate job on the database -
Weird error message need help..
SO.. i havent updated my itunes in a while because i keep getting this weird message.. it comes up when im almost done installing the newest/newer versions of itunes. it says
"the feature you are trying to use is on a network resource that is unavailable" "click ok to try again or enter an alternate path to a folder containing the installation package 'iTunes.msi' in the box below"
now when ever i choose a file from the browse box it replies with this message "the file 'xxx' is not a valid installation package for the product iTunes. try to find the installation package iTunes.msi in a folder from which you can install iTunes."
no idea need help thanks
~~~lake
Message was edited by: DarkxFlamexCaster
Message was edited by: DarkxFlamexCaster+it comes up when im almost done installing the newest/newer versions of itunes. it says+ +"the feature you are trying to use is on a network resource that is unavailable" "click ok to try again or enter an alternate path to a folder containing the installation package 'iTunes.msi' in the box below"+
With that one, let's try the following procedure.
First, head into your Add/Remove programs and uninstall your QuickTime. If it goes, good. If it doesn't, we'll just attend to it when we attend to iTunes.
Next, download and install the Windows Installer CleanUp utility:
Description of the Windows Installer CleanUp Utility
Now launch Windows Installer CleanUp ("Start > All Programs > Windows Install Clean Up"), find any iTunes and/or QuickTime entries in the list of programs in CleanUp, select those entries, and click “remove”.
Next, we'll manually remove any leftover iTunes or QuickTime program files:
(1) Open Local Disk (C:) in Computer or whichever disk programs are installed on.
(2) Open the Program Files folder.
(3) Right-click the iTunes folder and select Delete and choose Yes when asked to confirm the deletion.
(4) Right-click the QuickTime folder and select Delete and choose Yes when asked to confirm the deletion. (Note: This folder may have already been deleted if QuickTime was successfully removed using Add/Remove Programs earlier.)
(5) Delete the QuickTime and QuicktimeVR files located in the C:\Windows\system32\ folder. Click Continue if Windows needs confirmation or permission to continue. (Note: These files may have already been deleted if QuickTime was successfully removed using Add/Remove Programs earlier.)
(6) Right-click on the Recycle Bin and on the shortcut menu, click Empty Recycle Bin.
(7) Restart your computer.
Now try another iTunes install. Does it go through properly now? -
Need Help to create new screen for RF Sapconsole
Hi Guru's
I'm new on RF (but some years in ABAP) since last week.
I need help to create new screens for RF (SAPLLMOB).
Can someone explain me the procedure to create screen (with ABAP code after) or perhaps someone have an exemple (simple or not) ?
I have to develop 2 new screens with really few time.
And, another subsidiary question :
how SAP can transfert information between the flash gun and the screen i have developped.
Is there some code to add to enable this functionality or it is include in SAPLLMOB on standard fields ????
It's a new strange world for me today...
Many thanks to everyone who can explain me
Alainhi,
I am facing this problem as well. Is there any reference to create the new screen?
Hope someone can help! Thanks!
Regards,
Darren -
Stored Proc's/Packages Help
Ok all, again, being new to Oracle and trying to do a humble favor for a friend, I've come up with a problem that I'll need help on. Running these steps individually gets me pretty much the result that I'm looking for, minus some basic retooling with TSQL. However, I've tried to format this in the form of either a package/procedure and I just don't believe I'm doing it right. I've been reading the PL-SQL for Dummies, in addition to the latest Oracle 10G PDFs, but as much as I try, I just can't format the package right, even using v_ types and declaring. Below is the code, and even though I've listed tables, this has to be done dynamically and/or processed in memory. I know this may seem simple at best to those of you who understand Oracle, but to me, it's like a square peg in a round hole.
Would appreciate any and all comments and assistance. Thank you kindly for your perusal of this post (code below):
--STEP 1:
create table tbl1 as
SELECT ps.id1
,ps.id2
,ps.tdate
,NVL(ps.udate, SYSDATE + 1 )
,ps.tcode
,decode (y.nmtext,
'name1', 'nm1',
'name2', 'nm2',
'name3','nm3',
'name4','nm4',
'name5','nm5',
'name6','nm6',
'name7','nm7',
'name8','nm8')
,(SELECT COUNT(ps2.id1)
FROM tblhere ps2
WHERE ps2.id1 = ps.id1
AND ps2.id2 = ps.id2
AND ps2.tdate <= TO_DATE('03/01/2007 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
AND NVL(ps2.udate, SYSDATE + 1) >= TO_DATE('02/01/2007 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
GROUP BY ps2.id2) AS o_cnt
,(SELECT COUNT(ps3.id1)
FROM tblhere ps3
WHERE ps3.id1 = ps.id1
AND ps3.tcode = ps.tcode
AND ps3.tdate <= TO_DATE('03/01/2007 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
AND NVL(ps3.udate, SYSDATE + 1) >= TO_DATE('02/01/2007 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
GROUP BY ps3.tcode) AS a_cnt
,y.ntype as ntype
FROM tblhere ps
INNER JOIN tblz y
ON ps.id2 = y.thisid
WHERE ps.tdate <= TO_DATE('03/01/2007 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
AND NVL(ps.udate, SYSDATE + 1 ) >= TO_DATE('02/01/2007 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
AND tcode = 'placedhere'
AND y.ntype='testing'
order by id1, tdate
--STEP 2:
create table overages (
Mynum number,
MyID number)
--STEP 3:
insert into overages
select count(*) as Mynum, id1
from tbl1
group by id1
having count(id1) > 1
order by id1 desc
--STEP 4:
create table tbl2 (
nums number,
cid number,
ogid number,
adate date,
rdate date,
timer number,
mymode varchar2(10 Byte),
place varchar2(50 Byte),
og_cnt number,
mymode_cnt number,
namer varchar2(1 Byte))
--STEP 5:
insert into tbl2
select b.mynum, a.id1, a.id2,
a.tdate, NVL(a.udate, SYSDATE + 1),
a.tcode, a.nmtext, a.o_cnt,
a.a_cnt, a.ntype
from tbl1 a
inner join overages b
on a.id1 = b.myid
order by cid, adate
--STEP 6:
merge into tbl2 a
using (select rwd,
cid,
ogid,
min(rwd) over (partition by cid, adate, rdate) rwd_min,
adate,
rdate,
mymode, place,
from (select cid, rowid rwd,
last_value(d1 ignore nulls) over (partition by cid order by rdate range between unbounded preceding and current row) as adate,
first_value(d2 ignore nulls) over (partition by cid order by rdate range between current row and unbounded following) as rdate
from (select cid,
adate,
rdate,
case when abs(adate-lag(rdate) over (partition by cid order by rdate))<=1
then null else adate end d1,
case when abs(rdate-lead(adate) over (partition by cid order by rdate))<=1
then null else rdate end d2
from tbl2))) b
on (a.rowid=b.rwd)
when matched then update set a.adate=b.adate, a.rdate=b.rdate
delete where b.rwd!=b.rwd_min;In general you should create the empty tables first as an installation step. Then in your PL/SQL code you would just do inserts, updates etc.
Also, a package is defined in two parts:
CREATE OR REPLACE PACKAGE whatever
AS
PROCEDURE p
( p_someparam INTEGER );
FUNCTION q
RETURN BOOLEAN;
END whatever;
CREATE OR REPLACE PACKAGE BODY whatever
AS
PROCEDURE p
( p_someparam INTEGER )
IS
BEGIN
dbms_output.put_line('Hello, World');
END p;
FUNCTION q
RETURN BOOLEAN
IS
BEGIN
RETURN dbms_random.value(0,10) < 5;
END q;
END whatever;
/
Maybe you are looking for
-
Can I use my iCloud 5GB to store Word, Excel and PDF files?
I have an iCloud account that shows 5GB of space available and I'd like to be able to upload a bunch of documents for storage and be able to access them from any of several PCs, Macs and iOS devices. I do this now with Dropbox, readdledocs and google
-
My computer crashed, so I had everything wiped out and I re-downloaded iTunes. Now I am trying to put my songs back by syncing everything I have on my iPad. It says I am already using or synced to a different iTunes library, so it won't let me sync
-
Dynamic structure handling in PI
Hi All, Here is the detailed description of the issue I am facing in PI for dynamically handling receiver structure change. Sender : GIS (Through Web Service) Receiver: SAP ( ABAP Proxy ) Interface : Synch Equipment and Functional Location will be se
-
Hi, Can anybody let me know how to add datafile using ASM DB- ORACLE 10.2 OS-RHEL
-
Unable to install robohelp plugin for framemaker
Hi, I have FM8 and RoboHelp HTML 9. When I open a new project and try to import a FrameMaker document or book I get the "unable to install robohelp plugin for framemaker" error. I tried with FrmaMaker open and closed - same thing. With RH7 it used to