Create user using stored-procedures
Would anyone know of a way to create a user and assign role(s) using stored-procedures from a DOS shell? With MS SQL, one could issue the following commands from the DOS shell to connect to the database engine (osql -ULoginID -PPassword) and then "sp_addlogin loginid password". Additionally, can it be used in a VB app?
Your help is much appreciated.
tk
yes, in the code editor.
Auto-completion suggestions as you type?
Similar Messages
-
Why Dynamic Parameter is not working, when i create report using stored procedure ?
Post Author: Shashi Kant
CA Forum: General
Hi all
Why Dynamic Parameter is not working, when i create report XI using stored procedure ?
Only i shaw those parameters which i used in my stored procedure, the parameter which i create dynamic using stored procedure
is not shown to me when i referesh the report for viewing the results.
I have used the same procedure which i mention below but can not seen the last screen which is shown in this .
============================================================================================
1. Select View > Field Explorer2. Right-click on Parameter Fields and select New from the right-click menu.3. Enter u201CCustomer Nameu201D as the name for your parameter4. Under u201CList of Valuesu201D select u201CDynamicu201D5. Under the Value column, click where is says u201Cclick here to add itemu201D and select Customer Name from the drop-down list. The dialog shown now look like the one shown below in Figure 1. Click OK to return to your report design.
Dynamic Parameter Setup6. Next, select Report > Select Expert, select the Customer Name field and click OK.7. Using the drop-down list beside select u201CIs Equal Tou201D and using the drop-down list, select your parameter field (it should be the first field). 8. Click OK to return to your report design and see the parameter dialog.The parameter dialog will appear and show you a dynamic list of values that is updated each time your run your report. It couldnu2019t be easier! In our next tutorial, we will be looking at how to use this feature to create cascading parameter fields, where the values are filtered by the preceding selection.
Dynamic Parameters in Action
My question is that whether dynamic parameter is working with storedprocedure or not.
When i added one table and try to fetch records using dyanmic prameters. after that i am not be able to find the dynamic parameter option when i referesh my report.
One more thing when i try the static parameter for my report, the option i see when i referesh the screen.
Please reply soon , it's urgent
Regards
shashi kantHi Kishore,
I have tested the issue step by step by following you description, while the first issue works well in my local environment. Based on my research, this can be caused by the lookup expression or it indeed return Male value based on the logic. If you use the
expression below, it will indeed only return the Male record. So please try to double-check the record in the two datasets and the expression in your environment:
=lookup(first(Fields!ProgramID.Value,"DataSet1"),Fields!ProgramID.Value,Fields!Gender.Value,"DataSet2")
As to the second issue, please try to use the following expression:
=Count(Lookup(fields!ProgramID.value,fields!ProgramID.value,fields!Gender.value,"DataSet2"))
Besides, if this issue still exist, in order to trouble shoot this issue more efficiently, could you please post both the .rdl file with all the size properties to us by the following E-mail address? It is benefit for us to do further analysis.
E-mail: [email protected]
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
How to create Jobs using stored procedure?
Hi All,
I am in somewhat stuck, I am doing migration of DB, i want to move the Jobs of my server to client server
i want to create one stored procedure through which ill write script for the creating job but to create job we need to change the database MSDB and "use database" option not allowed in stored procedure is there any way that i can create jobs by
using stored procedure
please help for this
Regards,
Niraj SevalkarDynamic SQL may be the answer:
http://www.sqlusa.com/bestpractices/dynamicsql/
Example for executing dynamic SQL in a different database:
USE AdventureWorks2008;
GO
exec AdventureWorks.dbo.sp_executesql N'select db_name() as DBname'
-- AdventureWorks
exec sp_executesql N'select db_name() as DBname'
-- AdventureWorks2008
Kalman Toth Database & OLAP Architect
SQL Server 2014 Design & Programming
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
Problem while creating table dynamically using stored procedure
Hi all
When i try to execute the following lines get insufficient privilege error.
FYI: i m able to create table statically.(i.e without using stored procedure)
CREATE OR REPLACE PROCEDURE pcalling IS
str varchar2(60);
BEGIN
str:='create table t15(tno number,tname varchar2(5))';
execute immediate str;
END;
Thanks in advance
Satyahi
SQL> CREATE OR REPLACE PROCEDURE runddl (ddl_in in VARCHAR2)
2 AUTHID CURRENT_USER
3 IS
4 BEGIN
5 EXECUTE IMMEDIATE ddl_in;
6 END;
7 .
SQL> /
Procedure created.AUTHID CURRENT_USER clause before the IS keyword which runddl executes, it should run under the authority of the invoker, or current user not the authority of the definer.
if you omit it then it will no longer will be run if the creator doesnt have privelege to run this ddl regardless invoker has or not.
i hope you got it
Khurram Siddiqui
[email protected] -
How to use dynamic parameter when a report is created using Stored Procedures
Hi all,
any one have the idea of how to use dynamic parameter in crystal report XI R2
when report is created using Stored Procedure.
Regards
shashi kant chauhanHi
You can create an SQL command in Database Expert > Expand your datasource > Add command
Then enter the SQL query that will create the list of values to supply to the user
eg select field1,field2 from table
Then edit the parameter of the report. These will be the SP parameters adn can be seen in field explorer.
Change the parameter type to Dynamic
Under the word Value click on Click here to add item
Scroll down to your Command and select one of the values that you want to appear in the list
e.g field1
Then click on the Parameters field - this is essential to create the param
You can edit other options as required
That should do it for you.
I must say that i use CR 2008 connected to Oracle 10g SP, but i reckon this will work for SQL DB and CR XI as well
Best of luck -
Hi All,
I need to create Report Models using stored procedures. But whenever I am going to create data sources for same, I am just getting tables and views to use. Please see the screenshot below:
Is there any way out to create data source based on stored procedure? Please help.
Thanks in Advance
Regards
KumudHi Kumud,
As per my understanding, it is not support to create a Datasource View (DSV) using stored procedures.
In a DataSource View, only views, tables or named queries can be used. We can use stored procedures in a query. No parameterized queries, parameterized stored procedures or parameterized UDFs can be used in a DSV named query. You can try to using below approach
to achieve what you are require:
To build views in our relational source and add the views to the datasource view to proceed with modelling.
There is a similar issue, you can refer to it.
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/22207c21-03c7-4e5a-bb67-0372f29220a3/sql-server-reporting-services-2008-creating-report-models-using-stored-procedures
Regards,
Alisa Tang
Alisa Tang
TechNet Community Support -
Using Stored Procedure Universe in Reports
Hi Friends,
I got some issues using SP's in Universe and WebI Report.
Case #1:
Can we execute dynamic SQL using stored procedure universe..?
I use SQL server as the DB for my reports.I created a SP which will execute on getting a input value from the user.This input value will frame the SQL dynamically in the SP.for executing the dynamic SQL i use sp_executesql inside the SP.The SP wexecutes successfuly in the DB but when i try executing it in the Universe i get a error message as follows: "Exception : DBD,[Microsoft][SQL SErver Native Client 10.0][SQL Server]Incorrect syntax nesr 'FROM'.State:42000"
The script i used for creating SP for your reference:
CREATE PROCEDURE P_S_GetCodeValueList
@s_table nvarchar(75)
as
begin
declare @s_sqlCommand nvarchar(1000)
declare @s_tablename nvarchar(75)
declare @s_code nvarchar(75)
set @s_tablename=@s_table
set @s_code = '*'
set @s_sqlCommand= 'SELECT ' + @s_code + ' FROM ' + @s_tablename
exec sp_executesql @s_sqlCommand
end
Case #2:
AIl also tried creating reports using the SP Universe which needs to get the parameter when the user refesh the report.
But every time the report is refreshed the report fetches the data which was produced when the SP is executed in the Universe for the first time.
I need to get the prompt in the report , to which the user could give a value and the SP gets executed for that value.
Is there any option in BO to do this?
It will be very helpful if you could give me some work arounds on this.
Regards,
SugumarHi Sugumar,
I can answer you for your 2nd question:
When you create the Stored procedure in the Universe and test it on retreiving data by inserting variable input you can check if the user could insert new value for the SP parameters.
Hope this helps!
Regards
Giuseppe -
Best approach for performing DMLs using stored procedures
Hi,
I have a really general question and would like to hear your say about this.
I want my application to manipulate or read data using stored procedures (or packages in that manner) and not directly using queries against the DB.
Let's say I have a table with many columns:
create table test (pkid number(10),col1 varchar2(30), col2 number(10), col3 date,...);For such a DML procedure, is it best to do something like
procedure do_update(i_pkid IN number,i_col1 IN varchar2, i_col2 IN number, i_col3 IN date,...) as
begin
update test
set col1=i_col1,
col2=i_col2,
col3=i_col3...
where pkid=i_pkid;
commit;
end;Or do a selective update, meaning update only a certain column every time, given only 1 column actually changes? (and how to do that - separate procedures for each column? [columns can be nulls])
Also, is it better to work with test.col1%type instead of specifying the data type in the procedure?
And one last question - If I have a table with 100 columns and I don't want to create a procedure with 100 parameters - the best approach would be to use a record?
I just need to be set on the way I start implementing things in order to do it well from the start.
Many thanks.
Edited by: Pyrocks on Nov 17, 2010 1:58 PMPyrocks wrote:
One last clarification (although it may be more related to c/c++ developers - maybe one of you will know):
We are working with C++ and VB against a SQLServer and my part is to translate all the existing procedures to Oracle in order to migrate the application to work with Oracle DB.
The existing procedures use an IN parameter for each column in the table and I would really like to use rowtype like you mentioned.
Since I'm not a c/c++/vb developer - is there an easy way of working with such types, or even User-Defined Types, from c/c++/vb (as in passing a rowtype record from c++ to a SP ?)
I'm not looking for the actual way - just want to know how hard it would be and how much code needs to be changed in order to be able to convince the developers that this is the RIGHT way to work.
PS. none of our developers have experience with ORACLE so they wouldn't know the answer...Not actually an Oracle server-side (SQL language or PL/SQL language) question - but a client one. And it has been a long time since I wrote a fat client using C/C++ or Delphi.
The OCI (<i>Oracle Call Interface</i>) supports advance (user defined) SQL data types. Has since Oracle 8i. So in that respect, yes the client can support custom SQL data types.
How well it does depends entirely on that client language's features wrt OCI integration. For example, Delphi 4 was release around Oracle 8i and supported custom SQL types. I would expect that most languages today (like Java and C#) will provide support for it.
As for usiong +%ROWTYPE+ - this is a PL/SQL clause as far as I know. Unsure whether it is supported by the OCI. What could support it is a pre-compiler like Pro*C. These enable you to mix pseudo SQL source code with client language source code. The pre-compilation step then replaces the pseudo SQL code with native client language calls to the OCI. The code is then compiled by that client language's compiler. Pre-compilers can pull all kinds of interesting "tricks" with their pseudo SQL code support.
The best would be to consult the applicable client language's manuals that describe the interface it supports (via OCI) to Oracle. -
How to build a report in webi XIr2 using stored procedure
Post Author: vijay123
CA Forum: WebIntelligence Reporting
hi,
Is anybody can help me out how to creat a report using stored procedure in webiXir2
thanks
vijayPost Author: amr_foci
CA Forum: WebIntelligence Reporting
this has been posted twice.. i think -
How to use stored procedure in crystal report for eclipse
Hi;
I am working on crystal report for eclipse 2.0 and trying to use stored procedure in report .It is created from Oracle but it is not showing any dependencies
CREATE OR REPLACE procedure ACT_DB.getCostTransferDetails
p_In_Contract_ID varchar2 DEFAULT '*',
p_In_Status_ID varchar2 DEFAULT '*',
p_In_COST_TRAN_DATE varchar2 DEFAULT '*',
p_In_DEPT_ID varchar2 DEFAULT '*',
p_In_PROJECT_ID varchar2 DEFAULT '*',
p_In_EMPLOYEE_ID varchar2 DEFAULT '*',
p_Out_CostTransfer_Cusor OUT COST_TRANSFER_PACKAGE.COST_TRANSFER_TYPE
AS
BEGIN
OPEN p_Out_CostTransfer_Cusor FOR
SELECT
header.cost_tran_id,
header.cost_tran_date,
header.total_credit_amount,
header.total_debit_amount,
header.transfer_status,
header.updated_by,
header.added_by,
header.trf_over_ninety_days,
header.business_unit_id,
header.equip_approval,
header.batch_desc,
details.opr_unit_id,
status.status_id,
details.fund_code_id,
details.prgm_code_id,
details.class_id,
details.activity_id,
details.product_id,
details.status_id,
details.transaction_amount,
details.jrnl_date,
details.adjust_prcnt,
details.adjust_amnt,
details.details_equip_approval,
details.detail_desc,
details.account_id,
details.project_id,
details.dept_id,
details.contract_id,
details.reason_code_id,
details.jrnl_id,
employee.f_name,
employee.l_name,
employee.employee_id,
project.project_id,
project.project_status,
--header.transfer_status,
contracts.contract_desc
FROM header, details, status, employee, department, project, contracts
WHERE (header.cost_tran_id = details.cost_tran_id)
AND (header.cost_tran_date = details.cost_tran_date)
AND (header.transfer_status = status.status_id)
AND (department.dept_id = details.dept_id)
AND (department.dept_id = employee.dept_id)
AND (project.project_id = details.project_id)
AND (contracts.contract_id = details.contract_id)
AND (details.Contract_ID = p_In_Contract_ID OR p_In_Contract_ID ='*' )
AND (header.TRANSFER_STATUS = p_In_Status_ID OR p_In_Status_ID ='*' )
AND (TO_CHAR(details.COST_TRAN_DATE, 'MM/DD/YYYY') = p_In_COST_TRAN_DATE OR p_In_COST_TRAN_DATE ='*' )
AND (details.DEPT_ID = p_In_DEPT_ID OR p_In_DEPT_ID ='*' )
AND (details.PROJECT_ID = p_In_PROJECT_ID OR p_In_PROJECT_ID ='*' )
AND (header.ADDED_BY = p_In_EMPLOYEE_ID OR '*'=p_In_EMPLOYEE_ID )
Can any another way to make procedure
Thanx
Regards ,
AmolHi Amol,
Are you able to execute your stored procedure from oracle?.
- If "Yes" then use the Crystal Report XIR2 Designer to create the report.
- Import this report in the Crystal Report For Eclipse Workbench.
- The latest version for Crystal Report For Eclipse is SP1.
Please let me know the results.
Thanks,
Neeraj -
Unable to run SSIS Package using Stored Procedure
Hi Guys,
I have create one simple SSIS Package(Move the first table record to second table).It will execute fine in locally.
But, If i'm going call/execute .dtsx file using stored procedure. I'm getting Error. so please let me know the valuable solution.
My Package Path : D:\Temp\SSIS_TESTING\TESTSSIS\TESTSSIS\Package.dtsx
Stored Procedure
================
CREATE PROCEDURE SPEXECUTESSISPACKAGE
@FILEPATH VARCHAR(8000)
,@STATUS VARCHAR(500) = NULL OUTPUT
AS
BEGIN
DECLARE @SQLQUERY VARCHAR(8000)
DECLARE @STATUSCODE INT
SET @SQLQUERY = 'DTEXEC /FILE "'+ @FILEPATH +'"'
SELECT @SQLQUERY AS 'SSIS FULL PATH'
EXEC @STATUSCODE = master..xp_cmdshell @SQLQUERY
SELECT @STATUSCODE AS 'STATUSCODE'
IF @STATUSCODE <> 0
BEGIN
SET @STATUS = 'PACAKGE EXECUTE FAILED'
PRINT @STATUS
END
ELSE
BEGIN
SET @STATUS = 'PACAKGE EXECUTE SUCCESS'
PRINT @STATUS
END
END
GO
RUN
============================================================================
EXEC SPEXECUTESSISPACKAGE 'D:\Temp\SSIS_TESTING\TESTSSIS\TESTSSIS\Package.dtsx', NULL
Error
=============================================================================
Microsoft (R) SQL Server Execute Package Utility
Version 9.00.4035.00 for 32-bit
Copyright (C) Microsoft Corp 1984-2005. All rights reserved.
NULL
Started: 5:06:26 AM
Error: 2014-11-14 05:06:26.07
Code: 0xC0011007
Source: {1244CD18-F96A-4DAD-8FC2-35F794015CA1}
Description: Unable to load the package as XML because of package does not have a valid XML format. A specific XML parser error will be posted.
End Error
Error: 2014-11-14 05:06:26.07
Code: 0xC0011002
Source: {1244CD18-F96A-4DAD-8FC2-35F794015CA1}
Description: Failed to open package file "D:\Temp\SSIS_TESTING\TESTSSIS\TESTSSIS\Package.dtsx" due to error 0x80070003 "The system cannot find the path specified.". This happens when loading a package and the file cannot
be opened or loaded correctly
into the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.
End Error
Could not load package "D:\Temp\SSIS_TESTING\TESTSSIS\TESTSSIS\Package.dtsx" because of error 0xC0011002.
Description: Failed to open package file "D:\Temp\SSIS_TESTING\TESTSSIS\TESTSSIS\Package.dtsx" due to error 0x80070003 "The system cannot find the path specified.". This happens when loading a package and the file cannot be opened
or loaded correctly int
o the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.
Source: {1244CD18-F96A-4DAD-8FC2-35F794015CA1}
Started: 5:06:26 AM
Finished: 5:06:26 AM
Elapsed: 0.047 seconds
NULL
I'm getting Execte SSIS Package Status : 4
===================================
4Two things to check
1. The account executing the package has access to the path. If package is stored in different server you need to pass the UNC path (ie like \\machinename\...)
2. Make sure the version of SSIS service is the same in both the servers ie where package is created/stored and where its getting executed. A lower version SSIS service will not be able to load and execute higher version package and it will throw you similar
error messages as you posted above.
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page -
How to Insert date in 'DD/MM/YYYY' format in oracle using stored procedure?
Hi
How to Insert date in 'DD/MM/YYYY' format in oracle using stored procedure?
This is my Input data.
11/25/2007.
By using below query, it is inserted into database.
sql>Insert into tblname values(to_date('11/25/2007','MM/DD/YYYY'));
But using stored procedure, the same query is not running.
It shows error like
ORA-01843: not a valid month ORA-06512: at line 1
Procedure:
create or replace procedure Date_Test(datejoin in DATE) is
begin
insert into datetest values(to_date(datejoin,'MM/DD/YYYY'));
end Date_Test;
I had used 'nls_date_language = american' also.
Prcodeure is created but not worked in jsp. The same error is thrown.
Pls provide a solutionThis might help you....
SQL> Create Table DateTest(col1 Date);
Table created.
Elapsed: 00:00:00.00
SQL> create or replace procedure Date_Test(datejoin in DATE) is
2 begin
3 insert into datetest values(to_date(datejoin,'MM/DD/YYYY'));
4 end ;
5 /
Procedure created.
Elapsed: 00:00:00.00
SQL> exec Date_Test('11/25/2007');
BEGIN Date_Test('11/25/2007'); END;
ERROR at line 1:
ORA-01843: not a valid month
ORA-06512: at line 1
Elapsed: 00:00:00.00
SQL> exec Date_Test(To_Date('11/25/2007','mm/dd/yyyy'));
BEGIN Date_Test(To_Date('11/25/2007','mm/dd/yyyy')); END;
ERROR at line 1:
ORA-01843: not a valid month
ORA-06512: at "CTBATCH.DATE_TEST", line 3
ORA-06512: at line 1
Elapsed: 00:00:00.00
SQL> create or replace procedure Date_Test(datejoin in DATE) is
2 begin
3 insert into datetest values(datejoin);
4 end ;
5 /
Procedure created.
Elapsed: 00:00:00.00
SQL> exec Date_Test(To_Date('11/25/2007','mm/dd/yyyy'));
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.00
SQL> Select * from DateTest;
COL1
25-NOV-07
Elapsed: 00:00:00.00
SQL> create or replace procedure Date_Test(datejoin in VarChar2) is
2 begin
3 insert into datetest values(to_date(datejoin,'mm/dd/yyyy'));
4 end ;
5 /
Procedure created.
Elapsed: 00:00:00.00
SQL> exec Date_Test('11/25/2007');
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.00
SQL> select * from DateTest;
COL1
25-NOV-07
25-NOV-07
Elapsed: 00:00:00.00
SQL> -
Hi Guys,
SSIS 2012 ETL is failing only at one server (No BIDS) but running successfully from BIDS on different sever . In this ETL, I have used Stored Procedure in OLEDB Source.
Note: I have couple of ETLs developed in 2005 using same logic and upgraded to 2012, working perfectly.
I am getting Error Message:
SSIS
Error Code
DTS_E_OLEDBERROR.
An OLE DB
error has occurred.
Error code: 0x80004005.
An
OLE DB
record is available.
Source: "Microsoft OLE DB Provider for SQL Server"
Hresult: 0x80004005
Description: "Error converting data type varchar to datetime.".
Unable
to retrieve
column information
from the data
source. Make
sure your target
table in
the database is
available.
"OLE DB Source"
failed validation
and returned
validation status
"VS_ISBROKEN".
I tried below word around and found It is working perfectly.
I loaded data into a table (dbo.TEMP) using Stored procedure and then I used this dbo.TEMP table in OLEDB source and then found no issue.
MY SP Details: (This SP I am calling in OLEDB source of ETL) and when I run it from one server IT is working fine and when I run from ETL dedicated Server getting error: Guys Help me out.
USE
[TEST_DB]
GO
SET
ANSI_NULLS ON
GO
SET
QUOTED_IDENTIFIER ON
GO
ALTER
PROCEDURE [DBO].[SP_TEST]
--EXEC [DBO].[SP_TEST] '2014-09-30','2014-10-01'
@FROMDATETIME
DATETIME,
@TODATETIME
DATETIME
AS
SET
NOCOUNT ON
BEGIN
DECLARE
@FROMDATEKEY INT,
@TODATEKEY INT,
SET
@FROMDATEKEY=
CONVERT(VARCHAR(10),@FROMDATETIME,112)
SET
@TODATEKEY=
CONVERT(VARCHAR(10),@TODATETIME,112)
IF 1 = 1
BEGIN
SELECT
CAST(NULL
AS DATETIME)
AS TXN_DATE
, CAST(NULL
AS DATETIME
) AS PROCESS_DATE
, CAST(NULL
AS money)
AS S1_AMT
, CAST(NULL
AS money)
AS S2_AMOUNT
, CAST(NULL
AS money)
AS S2_INVALID_AMOUNT
, CAST(NULL
AS money)
AS INVALID_MOVED_IN_VALID_S2_AMOUNT
, CAST(NULL
AS VARCHAR(20))
AS SYSTEM_ID
, CAST(NULL
AS money)
AS S3_AMT
END
SELECT
TXN_DATE
,PROCESS_DATE
,S1_AMT
,S2_AMOUNT
,S2_INVALID_AMOUNT
,INVALID_MOVED_IN_VALID_S2_AMOUNT
,SYSTEM_ID
S3_AMT
FROM
DBO.TABLE_1
WHERE TNX_DATE_KEY
BETWEEN @FROMDATEKEY
and @TODATEKEY
UNION
ALL
SELECT
TXN_DATE
,PROCESS_DATE
,S1_AMT
,S2_AMOUNT
,S2_INVALID_AMOUNT
,INVALID_MOVED_IN_VALID_S2_AMOUNT
,SYSTEM_ID
S3_AMT
FROM
DBO.TABLE_2
WHERE TNX_DATE_KEY
BETWEEN @FROMDATEKEY
and @TODATEKEY
UNION
ALL
SELECT
TXN_DATE
,PROCESS_DATE
,S1_AMT
,S2_AMOUNT
,S2_INVALID_AMOUNT
,INVALID_MOVED_IN_VALID_S2_AMOUNT
,SYSTEM_ID
S3_AMT
FROM
DBO.TABLE_3
WHERE TNX_DATE_KEY
BETWEEN @FROMDATEKEY
and @TODATEKEY
END
Data Source Mode: SQL Command for Variable
"EXEC [DBO].[SP_TEST] '"+ (DT_WSTR, 24) @[User::V_EXTRACT_FROM_DT] +"','"+ (DT_WSTR, 24) @[User::V_EXTRACT_TO_DT] +"'"
Where variable @[User::V_EXTRACT_FROM_DT] and @[User::V_EXTRACT_TO_DT] is defined as DATETIME
Thanks Shiven:) If Answer is Helpful, Please VoteHi,
Yes you are right. At one sever where I was getting error, DateTime was in USA format and Where It was running successfully was in AUS format.
I changed from USA to AUS and I did another changes:
Data Source Mode: SQL
Command
EXEC [DBO].[SP_TEST]
@FROMDATETIME = ?,
@TODATETIME = ?
and It is working fine.
Thanks Shiven:) If Answer is Helpful, Please Vote -
How to use Stored Procedures in form 6i Blocks
Dear Friends,
I would like to know how to use Stored Procedures while creating blocks in Data Block Wizard in forms 6i application.
Please send me sample code of stored procedure.
Regards,
Khader.The Data Block Wizard is not for creating stored procedures. It will allow you to use a stored procedure in your form. See the help documentation for how to use the wizard.
Here's an example of a simple procedure. If you search the database forum or the web, you will find many examples.
CREATE OR REPLACE PROCEDURE procedure_name (value OUT NUMBER ) AS
BEGIN
SELECT COUNT(*) INTO value
FROM your_table;
END;
Message was edited by:
Mark Roberts -
Using stored procedure with ExecuteXmlReader
Just looking to find out if it's possible to use stored procedures when createing an OracleCommand object that calls ExecuteXmlQuery. I'm having a problem and all the samples I've found for using this only use command text (inline SQL). TIA.
Edited by: user9529215 on Mar 27, 2009 7:48 AMHi,
I have similar problem. Have you already solved the issue?
Thanks
Maybe you are looking for
-
I have installed oracle 8.0.5 on Redhat 6.1 but i am not able to create a database . Can anyone guide me on that. When I try connecting through internal it says not enough privileges. This error is there when I log in with any user. My email is [emai
-
How can I reactivate the Export function in iPhoto '11?
So, I tried to download a program that would let me export photos directly to Tumblr, and that program didn't seem to do anything when I installed it, but now NOTHING HAPPENS when I click "export." The usual pop-up window is gone. Help, please!
-
Cheque Nos to be pick up automatically from Check Lot
Dear Friends, I would like to know. Our client requirement is As we are entering Cheque Nos from to in FCHI to create a check lot. A development would like as we select Bank Account for payment, system should give next no automatically in assignment
-
Retina Display MBPs have 20% lower brightness than non-retinas?
I've been waiting until going off to graduate school to make a new computer purchase, and when I saw the MBP with Retina I thought that this was the computer for me. I do a ton of photography work, and Aperture is my lifeline, so the retina display
-
JDeveloper 10.1.3 and portal extension
Hi, Was the Portal Extension for developing portlets using the wizard upgraded for use with Oracle JDeveloper 10.1.3 or is this JDeveloper extension only compatible with the previous version 10.1.2 ? If I upgrade to the latest version of JDeveloper 1