Developing ETL in pl/sql instead of using tools

I've been developing for many years in pl/sql and c-shell scripting (Unix) for managing ETL processes in order to load and perform data into databases and data warehouses.
Even if I've rarely used tools like Pentaho and never used Oracle Warehouse Builder, according to you is it possible to claim that an analyst/programmer has developed ETL processes only by using classic developing (plsql, c-shell, external tables, ...)?
For a forthcoming new project I'd like to work for as a data warehouse analyst/programmer for ETL processes, I'd like to know whether I can claim to be able to write ETL procedures even if I don't use data integration tools.
Thank you very much!

odie_63 wrote:
BluShadow wrote:
In the end I wrote an XML Schema parser that created 'staging' tables based on that schema, and also generated template 'mapping' packages to be used for populating the staging tables from our various source system.Slightly off-topic but out of curiosity, do you handle all XML schema features such as substitution groups and import/include directives?Not quite ALL schema features (didn't quite have time to include them all) but yes, it does parse for substitution groups and import/include directives (which is another thing a lot of the ETL tools couldn't handle). The XML Schemas we were supplied with came in many parts but were inter-related, so I ended up writing a proper recursive parser using the DBMS_XMLDOM package and the XDB (where the Schema's were FTP'd to, stored, and queried from). Also had to deal with namespaces (which in this particular instance were pointless namespaces; there was no need for them in these particular Schemas, but obviously the 'designer' behind the schemas thought it was good to include them). The parser takes the schemas (starting at the main schema and including the others as required), processes them to create a metadata table containing all the information about the element names, datatypes, namespaces and parent elements etc. so essentially giving a set of hierarchical data, which is then post-processed to flatten the structure as much as required to obtain the actual datatypes of simple elements, and expand the extensions etc. whilst at the same time creating a set of metadata to assign 'table names' to each group of elements (as element names can exceed the 30 character limit of oracle table names), then creates scripts to generate the staging tables with appropriate primary/foreign keys so all the tables have the correct relationship, as well as the XML generating package that can generate pieces of XML from each table and combines them to the required output XML (once there's data in the tables of course).
Considering I had little experience of XML Schemas and namespaces at the time I wrote it, back in 2005/6 (I did have experience of DTD's), I used my knowledge of writing language/syntax parsers and knowledge of what ETL tools aimed to do (easily gained knowledge from all the demonstrations the companies trying to sell them gave us) to write the parser and the ETL process. Other organisations, related to our own, also had the same task to do, and some of those were struggling (as they too had no ETL tool) so were provided with what we'd achieved as their starting point, and to great success, as far as I'm aware. It certainly proved itself worthy, when the 3rd party supplied us with completely restructured Schemas (a whole overhaul of the final product), and we just ran those through the parser in another database schema, and did a staging table comparison to see what changes had been made overall (they hadn't supplied any details themselves of what had changed, it was up to us to find out); that whole process of parsing the schemas and analysing the differences to determine the impact on our current work, was all done in 2 days, something which surprised our management greatly (especially as other organisations having to do the same, were reporting it was going to take them several weeks). Sure, there are areas for improvement in it, but it more than meets our needs.
:)

Similar Messages

  • Crystal Report XI: Can you write your query in SQL instead of using the GUI

    Hello
      In crystal report version XI, can you write your query in sqlplus and then use the crystal report designer to build your report instead of using the GUI . I would like to be able to go database and show sql query and open that query and make changes directly there, is that possible on this version, if yes is there a setting somewhere? Please let me know.
    Thank you
    alpha

    Moved to Database forum.
    No you can no longer modify the SQL directly. Use a Command Object to enter the SQL directly.
    Thank you
    Don

  • Problem when connecting sql server 2005 using SQL developer

    Hi,
    I installed Sql developer and I am trying to connect sql server 2005 using windows authentication. I had previously the SSO folder problem saying the path is missing in java.library.path. I copied the SSO folder into Sqldeveloper directory. I changed the settings under computer management->services and applications->sql server configuration manager->sql server 2005 network configuration ->protocols for sqlexpress->I enabled TCP/IP.
    Now I am getting an error saying "Failure-can not open user default database.Login Failed. Login failed for user ...".
    I am able to connect thru ODBC driver using windows authentication.
    Any help on this is highly appreciated.
    Thanks in advance,
    Lakshmi

    Hi Martin,
    Your solution has solved my problem too. Thanks for posting these workaround fixes :-)
    However, there seem to be a problem with datetime fields. The query:
    select getdate()
    returns something like: oracle.datetimestamp.@1aed4
    Is there a way to get around with this? Otherwise, using SQL Developer as a client for SQL Server doesn't serve the right purpose when we cannot access simple date fields :-)

  • How do I make a connection to SQL Server Express using SQL Developer 1.5.3?

    How do I make a connection to SQL Server Express using SQL Developer 1.5.3, if it's possible at all?
    Also, I received a SQL Server dump file of some sort. Is there any way to read this file in SQL Developer and migrate the db to Oracle? Unfortunately I don't have raw DDL and DML for this database--just some sort of a binary dump file from SQL Server.
    Thanks.
    Dana

    Are you using SQL Developer 1.5.3 or 1.5.4?
    If using an older version (i.e. 1.5.3), then you'll have to add a DLL to your environment. This is [ntlauth.dll].
    If you don't find this DLL in your SQL Developer directory, then obtain the JDBC SQL SERVER Pluggin (jtds-1.2.2-dist.zip) from:
    http://sourceforge.net/project/showfiles.php?group_id=33291&package_id=25350
    Copy the ntlmauth.dll in the ...\\...\ide\lib directory (no need to register it).
    Note: this approach should work if using DQL Developer 1.5.3 and SQL Server Express 2008
    Regards,
    M. R.

  • Pure SQL and Border Use Cases?

    Hi Gurus
    I was developing a DB Adapter to select data from Shipping tables. I did it by polling as well as with Custom SQL. While using the custom SQL I got the following error in my domain.log
    (my query that I wrote) failes, Caused by java.sql.SQLException: Invalid column index.
    The Pure SQL option is for border use cases only and provides simple yet minimal functionality. Possibly try the "Perform an operation on a table" option instead.
    What is a border use case, how do I decide that. So BPEL support the custom sql option very loosely?
    Thx

    The thing is that XSLT often doesn't deliver the functionality required when it comes to times.
    You suggest appening "Z" to the time but this means that the time is now in UTC time. What if the system from where the date is being converted is running in NZ using local time? Other systems that recieve the date (and correctly handle the time zone) will now have a time that is out by a number of hours.
    You often can't ignore the time zone (drop the 'Z') as if you send the time to a system it has to either assume the time is local to it (which may not be the case... the other system coudl be in a different time zone) or assume the time is UTC (I think crossfire does this by default).
    Typically can't just append a time zone (e.g. +11:00) either as many places have daylight savings so the value to appended is variable (you then need some way of determining what the value is... either Java Embedding or a Service).
    As you mention it does depend on the use case but in many circumstances using Jaba Embedding, not as suggested above but with the appropriate Java.util.Calendar classes, is the best way to handle date and time in BPEL. Even still you need to ascertain the format of times external to the system and ensure you parse them correctly.
    ANd even if you do all this you can still run into problems. I've seen a real world example where two systems which both handled time zones correctly and had previously been working together for quite a while, satrted reporting different times. It turns out that only one of them had had the most recent Java Time Zone patches applied and there had been a change in the dates for daylight savings here (Australia). Be warned!

  • How to call PL/SQL stored procedure using ODBC?

    Could anyone tell me how can I call PL/SQL stored procedure using
    ODBC? Are there any sample codes?
    Thanx!
    null

    You are correct on all counts, they all should work.
    Oracle Product Development Team wrote:
    : Hi,
    : I don't know the exact syntax in ODBC, but reasoning by analogy
    : with other API's, I'd bet one of the following works
    : (for a call to: procedure my_proc(n1 number, n2 number);):
    : "{ my_proc(1,2); }"
    : "{ call my_proc(1,2); }"
    : "{ begin my_proc(1,2); end }"
    : "begin my_proc(1,2); end;"
    : "begin my_proc(1,2); end"
    : Hope this helps. - Pierre
    : jiangbuf (guest) wrote:
    : : Could anyone tell me how can I call PL/SQL stored procedure
    : using
    : : ODBC? Are there any sample codes?
    : : Thanx!
    : Oracle Technology Network
    : http://technet.oracle.com
    null

  • VS 2013 - SQL Server Projects - Can I Change defaults for SQL Servers to use and the paths to DB-files?

    Hi all,
    when a create a SQL Server Project using "File > New ...", I find the following settings defaulted:
    SQL Server is (local)\Version12.0 and
    DefaultDataPath, DefaultFileprefix and the DefaultFilename(s) for MDFs and LDFs point to the Project directory.
    Initial settings of file size and increments are also not settable but defaulted.
    Because my projects have to verify performance by testing with large volume of data, we have to use a different SQL Server with files stored on that Server. The Project settings have a button to changes DB properties, but these are not part of that
    dialog.
    So I spent some fruitless hours in vain to find a way to change the project's connection to my development SQL Servers.
    How to cope with that?
    Thanks in advance.
    Regards Uwe

    Hi Caillen,
    thanks for Your response. I have to apologize for being a little late with my answer. I'll try to clarify my case more precisely:
    This is surely a topic related to VS2013 handling new "SQL Server Database Projects". When one clicks "OK" the following steps are executed by VS2013 (surely controlled by standard templates or the like):
    VS2013 creates the new project in a selectable directory and uses the projectname as a subdirectory whre the directory elements (*.sqlproj, bin\, obj\) where  later all the *.sql are placed, too. This is normal and expected.
    VS2013 creates a new database with its DB-files
    and attaches it to "(localdb)\ProjectsV12". The name of the database is the name of the project. The path to the DB-files (*.mdf and ldf) and their sizes are also defaulted to small values. The DB-server and the
    path to the DB-files is taken from the registry (!) HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\SSDT\LocalDbDatabaseFilePaths. I don't know when and by what tools these values are set.
    The path to DB-Files is typically also the path to the projects. The (local)-server places all system database files in the User\<user-ID>\Appdata\.. tree. Which is OK for small databases. The templates extracts some data from the DB-file path and
    places it in the deployment SQLs to populate the SQLCMD variables DefaultDataPath, DefaultFileprefix and the DefaultFilename(s) which are generated when pressing "Executed" or "Debug" the project.
    My problem is that we have to test database performance with larger volumes of data (e.g. two million rows and more). These cannot be stored in the User-path but must be handled by some kind of professional DB-Manager on various storage devices. When everything
    is tested, the publishing function of VS2013 will extract the structure and you are done incl. all the performance taming things.
    The dialog from the project properties can change to a different Server, but that server does not know your project database. The server and the DB-Files should be specified by the developer before VS2013 creates the database.
    So  the right forum would be a forum, where people developing SQL Server solutions with VS2013 are reading the questions.
    Thanks again for your patience.
    Regards Uwe

  • How to write select statement directly in java file instead of using vo

    Hi,
    I have written the following code in my java file:
    if(empvo==null)
    empvo=worklistamimpl2.createViewObject("InvoiceVO", "xxetfc.oracle.apps.icx.icatalog.shopping.server.InvoiceVO");
    if(empvo!=null){
    OAViewObject oaviewobject2 = (OAViewObject)worklistamimpl2.findViewObject("InvoiceVO");
    OAViewObjectImpl oaviewobjectimpl = (OAViewObjectImpl)oapagecontext.getApplicationModule(oawebbean).findViewObject("InvoiceVO");
    oaviewobject2.setWhereClause("Invoice_num="+" ' " + s + " ' ");
    oaviewobjectimpl.executeQuery();
    String abc = (String)oaviewobjectimpl.first().getAttribute("Invoice_id");
    It is giving me error as
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (select invoice_id from ap_invoices_all) QRSLT WHERE (Invoice_num='ERS15022012_3')
    1. Why is this error coming.. how to solve this
    2. Instead of using vo how can i write select statement directly in the above code
    Thanks,
    Edited by: user10873676 on Apr 9, 2012 1:18 AM
    Edited by: user10873676 on Apr 9, 2012 1:21 AM

    it says java.sql.SQLSyntaxErrorException: ORA-00904: "INVOICE_NUM": invalid identifier
    where as invoice_num column is present in my table

  • Pass Pl/sql table into USING clause in EXECUTE IMMEDIATE statment

    Getting error when I try to pass the PL/SQL table into USING clause in EXECUTE IMMEDIATE statment:
    Declare
    result NUMBER;
    TYPE values_tab IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
    lv_tab values_tab;
    lv_exp varchar2(300);
    lv_exec varchar2(300);
    BEGIN
    lv_tab(1) := 5;
    lv_tab(2) := 48;
    lv_tab(3) := 7;
    lv_tab(4) := 6;
    lv_exp := ':b1+:b2+(:b3*:b4)';
    lv_exec := 'SELECT '||lv_exp ||' FROM DUAL';
    EXECUTE IMMEDIATE
    lv_exec
    INTO
    result
    USING
    lv_tab;
    DBMS_OUTPUT.PUT_LINE(result);
    END;
    Error at line 1
    ORA-06550: line 20, column 12:
    PLS-00457: expressions have to be of SQL types
    ORA-06550: line 15, column 8:
    PL/SQL: Statement ignored
    I am trying to evaluate the expression ":b1+:b2+(:b3*:b4)" which is stored in table. This table has different expressions (around 300 expressions). I want to use the bind variables in expression because each expression evaluated thousand of time may be more in some case. If I don't use bind variable then it fill shared pool.
    Is there any way I can pass the USING (IN) parameters dynamically instead of writing "USING lv_tab(1), lv_tab(2), lv_tab(3), lv_tab(4)"? As number of input parameters change depend on the expression in the table.
    If not possible please suggest any other ideas/approches
    Please help..
    Edited by: satnam on Jun 11, 2009 11:50 AM

    Well, you keep changing reqs faster I can keep up. Anyway, assuming N-th bind variable (left-to-right) corresponds to collection N-th element:
    Declare
        result NUMBER;
        lv_tab values_tab := values_tab();
        lv_exp varchar2(300);
        lv_exec varchar2(300);
        lv_i number := 0;
    BEGIN
        lv_tab.extend(4);
        lv_tab(1) := 5;
        lv_tab(2) := 48;
        lv_tab(3) := 7;
        lv_tab(4) := 6;
        lv_exp := ':5000135+:5403456+(:5900111*:5200456)';
        lv_exec := lv_exp;
        While regexp_like(lv_exec,':\d+') loop
          lv_i := lv_i + 1;
          lv_exec := REGEXP_REPLACE(lv_exec,':\d+',':b(' || lv_i || ')',1,1);
        end loop;
        lv_exec := 'BEGIN :a := ' || lv_exec || '; END;';
    DBMS_OUTPUT.PUT_LINE(lv_exec);
    EXECUTE IMMEDIATE lv_exec USING OUT result,IN lv_tab;
    DBMS_OUTPUT.PUT_LINE(result);
    END;
    BEGIN :a := :b(1)+:b(2)+(:b(3)*:b(4)); END;
    95
    PL/SQL procedure successfully completed.
    SQL> SY.

  • Oracle SQL Developer 3.0: PL/SQL debugging of anonymous blocks: ISSUES

    Hello,
    I just downloaded the Oracle SQL Developer 3.0. I have been using the EA releases as they came into existence and was happy to see the released version. So I immediately tried to debug an anonymous block (something I did not try to do in the EA releases), and nothing happened.
    The "Debug" was grayed out and the key-chord "ctrl-shift-F10" did nothing. I found this forum:
    Re: 30EA1: anonymous block debugging?
    and followed Vadim Tropashko's advice. This did nothing for my anon. block but worked fine for the simple example.
    So I started to whittle my anon. block down to find the culprit, here is a repeatable breaking point for me:
    declare
        stmt1 long;
        stmt2 long;
        stmt3 long;
        stmt4 long;
        p_data varchar2( 500 );
        i      varchar2( 10 );
    BEGIN
        STMT1 := 1;
        STMT2 := 1;
        STMT3 := 1;
        STMT4 := 1;
        --the moment this is in the block "Debug" is no longer an option
         select
            SendDocumentResult
           into
            p_data
           from
            XMLTABLE( '/data'
                    PASSING
                    xmltype.createxml( '<?xml version="1.0" encoding="utf-8"?><data><SendDocumentResult>test</SendDocumentResult></data>' )
                    COLUMNS SendDocumentResult varchar2( 1000 ) PATH 'SendDocumentResult' ) ;
    end;The moment I have the SELECT INTO ... XMLTABLE() it fails (a normal SELECT INTO works just fine).
    Is this a problem with my environment or is a problem with SQL Developer 3.0.04. Looking over K's comments, it seems the debug worked for 'simple' blocks, so I wonder if this is just out-of-scope...
    My environment:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production    
    PL/SQL Release 11.2.0.1.0 - Production                                          
    CORE     11.2.0.1.0     Production                                                        
    TNS for IBM/AIX RISC System/6000: Version 11.2.0.1.0 - Production               
    NLSRTL Version 11.2.0.1.0 - Production
    and Oracle SQL Developer
    3.0.04 (Buld Main 04.34 with bundled Java) on a Window's XP box.

    Thanks, I'll survive. Just my luck, the first item I try to anon. debug didn't work! :)
    thanks, hopefully this problem will be few and far between

  • Oracle SQL Developer Data Modeler Versus SQL Developer

    Friends,
    I'm trying to understand the differences between Oracle SQL Developer Data Modeler and the ability to use the Data Modeler in SQL Developer.
    I've looked at both products home pages on OTN, http://www.oracle.com/technology/products/database/datamodeler/index.html & http://www.oracle.com/technology/products/database/sql_developer/index.html and would appreciate your comments on my findings so far
    1) The Oracle SQL Developer Data Modeler is a stand-a-lone chargeable product whereas the use of the Data Modeler functionality of SQL Developer is free
    2) The Data Modeler functionality within SQL Developer is basically a "viewer" I can create ERD's of my existing tables by dragging them into the modeler from the object navigator but that's about it. I can't save the diagram for later use or use it to change the structure of the table(s)
    3) If I need to have "Oracle Designer" like ERD capabilities then I need to use Oracle SQL Developer Data Modeler (after purchase!)
    4) Are there any other differences I have missed?
    Thanks in advance

    You can open any diagram created in the stand-alone product in the SQL Developer Data Modeler Viewer and navigate through all property dialogs and the full navigator, just like you can in the stand-alone product, but with no update capabilities. This allows developers to fully review the model and all properties, without making changes.
    Sue

  • How can a type defined in a PL/SQL package be used by an object?

    How can a type defined in a PL/SQL package be used by an object?
    In the PL/SQL Reference manual it says that object attributes can be
    types defined inside a PL/SQL package: How do you make this work?
    Here is a sample that demonstrates what I am trying to do:
    CREATE OR REPLACE
    PACKAGE Phone IS
    TYPE Phone_rectype IS RECORD (
    Main VARCHAR2(12),
    Home VARCHAR2(12),
    Business VARCHAR2(12),
    Mobile VARCHAR2(12),
    Fax VARCHAR2(12),
    Pager VARCHAR2(12)
    END Phone;
    CREATE OR REPLACE
    TYPE customer_type
    AS OBJECT (
    CustNo NUMBER,
    CustName VARCHAR2(30),
    PhoneNumber Phone.Phone_rectype
    This is the error that i get:
    Warning: Type created with compilation errors.
    Errors for TYPE CUSTOMER_TYPE:
    LINE/COL ERROR
    0/0 PL/SQL: Compilation unit analysis terminated
    5/15 PLS-00201: identifier 'PHONE.PHONE_RECTYPE' must be declared
    null

    That's a good point, Justin - thanks for the advice. At the moment, our process of data validation isn't very well defined, so the table definitions aren't always the same beyond a core set. As we get more automated and able to develop table definitions flexible enough to accomodate all the quirks in client data, I may be able to consider moving to a single schema to take advantage of maintenance and performance improvements. My ultimate concern with doing that is that the datasets we're dealing with can be tens of millions of rows in size. Clearly, I'm no DBA, but I just assumed that we would be able to churn through these datasets faster if they were in a schema by themselves rather than lumped together into one huge half-a-billion row table?

  • BizTalk 2013R2 Developer Edition from Gallery - SQL Expired!!

    I an a MSDN ultimate subscription holder and I have created a virtual machines within Azure from the Gallery.  I have select the BizTalk 2013R2 Developer Edition from the gallery which has initially been great and save me a lot of time with
    the setup.  Unfortunately after only a couple of weeks my SQL license has expired. 
    As I did not select any form of evaluation edition I would not expect software licenses to expire when they are provisioned from the gallery whenever.  As I understand it as an MSDN ultimate customer I am covered to license BizTalk Developer Edition
    and indeed SQL which come as part of the gallery VM. 
    I've seen a number of posts online around this with no solution and I was wondering if you have a view on this. 
    Have I picked up the wrong understanding or is their a defect with the BizTalk 2013R2 Developer edition gallery image.  A colleague recently reported the same thing happened with BizTalk 2013R2 standard edition image.
    Any help and advice would be appreciate as I am stuck if SQL has expired.  I don't see the point in provisioning a new gallery image if the same problem will happen.
    It is very convenient provisioning from the gallery but if the licenses expire then they become less useful and very annoying.  I could understand if I provisioned an evaluation copy but this was not the case here.
    Cheers
    Stephen

    I have had no timely response from Microsoft on this yet, despite trying my best to seek assistance from them to help fix their defect. 
    Anyway I did a fresh search online and came accross this which has worked for me
    https://www.phidiax.com/blog/post/Azure-Gallery-Image-for-BizTalk-Server-SQL-Server-evaluation-period-has-expired
     If you have access to a valid copy of SQL Server 2014 Developer Edition then you can perform an Edition Upgrade and go from SQL 2014 Enterprise Evaluation Edition to SQL 2014 Developer Edition.  Once I did this and restarted SQL Services I was
    back up and running. 
    I suspect Microsoft will need to do this with the base gallery image and then re-load it whenever they can be bothered getting around to it OR whenever a customer with an Azure technical support contract raises it!  No pay, no technical support outside
    this forum.  
    I have not tried again to fire up a new 2013R2 Developer Edition image from the gallery to see if this is fixed yet. 
    Hopefully this helps anyone in the same boat as me.  If you do not have access to SQL Server 2014 Developer Edition (via say msdn subscription) to perform this upgrade then I'm afraid you will still have difficulty resolving this.

  • Can i develop a screen in sql?

    can i develop a screen in sql to enter a value for firstname and lastname ? if not, where(what is a software) can i develop a screen in oracle?
    Thanks.

    user13165795 wrote:
    can i develop a screen in sql to enter a value for firstname and lastname ? if not, where(what is a software) can i develop a screen in oracle?
    Thanks.Assuming you mean SQLPlus, sure...I do it all the time in scripts.
    -- example.sql
    PROMPT Learn how to use the ACCEPT statement...
    set feedback off verify off
    ACCEPT v_firstname CHAR PROMPT 'Enter your first name: ' DEFAULT 'Richard'
    ACCEPT v_lastname CHAR PROMPT 'Enter your last name: ' DEFAULT 'Head'
    SELECT 'Hello, my name is ' || &v_firstname || ' ' || &v_lastname || ', and I want to be your friend!' AS text_string
    FROM dual;
    -- end example.sql
    Executing the script would produce something like this:
    SQL> @example
    Enter your first name: Byron
    Enter your last name: Flathead
    TEXT_STRING
    Hello, my name is Byron Flathead, and I want to be your friend!
    Note that in the script I used a DEFAULT clause to ensure that there would be SOMETHING assigned to the variables if the user just hits Enter without typing in a name first. (And yes, I choose to be whimsical.)
    HTH

  • Dynamic SQL Command Queries Using Parameters

    Post Author: tdoman
    CA Forum: Data Connectivity and SQL
    I'm using Crystal Reports 11 and am trying to dynamically build part of the "Where" clause in the SQL command query to filter data on the server before the results are sent to the client. I'm doing this to decrease the load time of my reports by not having to send a large set of data to the client, then filter the results on the client side.
    I want to create a parameter list that is dynamically generated from a table in a database and allows you to select mutiple values from that list. For example: I have two tables. One employee table and one employee type table. The employee table lists all employees and their related employee types (full-time, part-time, and contractor). The employee type table lists the employee types that will dynamically be loaded into the parameters list.
    Employee Table
    ID    Name       TypeID
    1     Bob          2
    2     Steve        1
    3     John         3
    4     Bill            1
    Employee Type Table
    ID   Type
    1     Full-Time
    2     Part-Time
    3     Contractor
    Assuming the user selects u2018Full-Timeu2019 and u2018Contractoru2019 from the parameter list, the SQL command query I want to generate is as follows:
    SELECT *
    FROM emp, emp_type
    WHERE emp.ID = emp_type.ID and emp.TypeID in (u20181u2019, u20183u2019)
    I tried building the following SQL command query so it would dynamically replace {?EmpType} with the IDu2019s of the types the user selected but it doesnu2019t work. Any ideas how to fix this?
    SELECT *
    FROM emp, emp_type
    WHERE emp.ID = emp_type.ID and emp.TypeID in ({?EmpType})

    Post Author: tdoman
    CA Forum: Data Connectivity and SQL
    btw...I just realized I had a typo in my "where" clause of the previous example. It should have been like so:WHERE emp.TypeID = emp_type.ID and emp.TypeID in (u20181u2019, u20183u2019)  satish_nair31:
    Instead of passing the filter condition as parameter it would be fine if you pass it by ReportViewer.SelectionFormula Property.
    The selection formula property of report viewer control will dynamically append the where condition with the SQL value. You will pass the filter condition as per the syntax of language supported by crystal reports.I believe using the ReportViewer.SelectionFormula property you are referring to is only available if I'm loading the report through a VB application. If this is true, then this option will not work for me because I'm loading the report in a browser from the Crystal Report web server and currently don't have a VB application that can load the report. If I did, then I could dynamically build the SQL string using VB then pass it to the Crystal Report on the fly.But I'm trying to figure out if it's possible to do it without loading the report using VB. Please correct me if I'm wrong on these assumptions.

Maybe you are looking for