Modeling of a SQL result

Hello! I have a Sql that returns
col1 col2 col3 col4 col5
1 1 0 1
1 0 1 1
0 1 B 0 0
1 1 0 0
0 1 B 0 0

Assuming that the sentence: Select col1, col2, col3, col4 col5 table

How I model the sentence to get this result:

col1 col2 col3 col4 col5
4 1 1 2
B 0 0 1 0

The columns col3, col4 y col5 are obtained by adding the result of each line. col1 and col2 is the only value that is displayed.

Thanks in advance

Search SELECT, GROUPBY, SUM... in the documentation, you

http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/statements_10002.htm#i2065646
http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/statements_10002.htm#i2182483
http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/functions163.htm#i89126

and then tell us please what you don't understand

Tags: Database

Similar Questions

  • JSON to the sql result set

    Hi all

    I have this requirement to convert the JSON format in the result set (with the lines and columns).

    is their in any case I can achieve this?

    I was able to successfully convert the sql result set in JSON format but difficult time to do the reverse.

    Flexibility:

    At some point, I expect the lines to return no more than 2 & about 50 columns maximum.

    Therefore, the JSON itself can be stored in varchar2 (4000) and not need to use CLOB. (If necessary to be passed as an argument to the function).

    Oracle version: 11.2.0.3

    Kind regards

    AAG

    There are at least the son on this site below:

    https://community.Oracle.com/thread/2505918

    https://community.Oracle.com/thread/3634280

    https://community.Oracle.com/thread/3557925

    https://community.Oracle.com/thread/2510292

  • Export a sql result with the right button of the mouse

    We do not have the ability to export the sql result to in Developer SQL EA 3.0.4. I have very difficult ofr me, because all day in my service allows us to export to excel or export format insert,...

    We have 2 versions of the SQL (3 and 2.1) developer only because there is no such thing as this feature in 3.0.

    Do you have a solution for Developer SQL EA 3.0?

    In the EA, it's called Unload , but do not get 3.0 production, where he's back for the export .

    Have fun
    K.

  • dash line, show by sql result

    Hi, there are 2 choices to view the results for the guest (choices in the command prompt).

    "All values" and "SQL result."

    I found that for all values, the results are SEPARATE.
    for SQL result, if the sql code is "select... from...» ', the results may be unique (choice duplicated in the command prompt)
    If the sql code is "select DISTINCT... of...» ", the results are still not unqiue (double choice in the command prompt).

    is this a bug? or SEPARATE only is not supported?

    Hello

    I don't think that there is a need to SEPARATE in the select clause. Default BI Server will apply separate in the application and go to the database. This is true for all non-primary key columns only specific columns. Here is an example,

    There are some duplicate values in the column of the subregion. But even if I give the sql code following in guest of dashboard for the 'Results' option it again retrieves unique records.

    SELECT customers. Sub-region of countries "OF HS

    BI Server generated query:
    Select distinct T175. COUNTRY_SUBREGION C1
    Of
    SH COUNTRY T175

    Kind regards

  • Add the variable of presentation in a prompt SQL results

    Hello friends!

    I have a prompt with the time Dimension (year (p.v. v_year) and month (p.v. v_month)). Then I have another guest of departments in the same page and I want to compel departments depends on my year and selected months before.

    I know to do with variable presentation, if I go to SQL results in prompt Department and ADD the following: "WHERE"Sun Time"." Year=@{v_year}"it works but I want to add months also!

    How can I do?


    Thank you very much!!!

    Hello

    Use single quotes...
    "like... month = ' @{var_month}"

    hope this can work...

  • Pivot SQL results

    Hello

    Can someone help me with a request to one of our business units.

    We have pieces of equipment that have IDS and descriptions. A piece of equipment can have between 0 and n descriptions. Most have 1 desc, some don't any others maybe 5 or 6.

    Therefore, currently the .NET application presents the data as follows (I've simplified it a lot...)

    Select equipment_id, desc

    of equipment_desc;

    equipment_id / / desc

    -------------------               --------------

    12345 xxxxx

    yyyyy 12345

    zzzzz 12345

    NULL 98765

    KKKKK 78910

    .

    .

    That request to the end-user at the moment is for data must be rotated and presented like this;

    equipment_id desc_1 desc_2 desc_3

    -------------------             ----------          ----------               -----------

    12345 xxxxx yyyyy-zzzzz

    NULL NULL NULL 98765

    KKKKK 78910 NULL NULL

    So, as you can see I still want 98765 even if there is no description.

    I did something similar to this was a CASE statement, but I knew exactly how much passes description there were, as mentioned previously, it is configurable, so it might be 0 or n?

    Guidance or advice much appreciated.

    Thank you

    AnnPricks E wrote:

    I think that in your case it had to rotate dynamic... I did something below to rotate dynamic. It will work for your case only, and is not a generic. You can try the below and let me know in case of any problems

    FUNCTION to CREATE or REPLACE dyn_row_colum

    RETURN SYS_REFCURSOR

    AS

    v_sqlstr VARCHAR2 (32767): = 'SELECT equipment_id,';

    v_rfcur SYS_REFCURSOR;

    v_cnt NUMBER;

    BEGIN

    SELECT MAX (COUNT (*)) IN v_cnt

    OF test_desc

    GROUP BY equipment_id;

    FOR j_rec IN 1.v_cnt

    LOOP

    v_sqlstr: = v_sqlstr | » '||' MAX (DECODE (rn,'|)) '''|| j_rec | " ((' |', description))' | ' ': ' desc_' | j_rec | «, » ;

    END LOOP;

    v_sqlstr: = RTRIM (v_sqlstr, ','). » '||' FROM (SELECT equipment_id, description, ROW_NUMBER () OVER (PARTITION BY equipment_id ORDER BY description) rn test_desc) GROUP BY equipment_id';

    V_rfcur OPEN FOR v_sqlstr;

    RETURN v_rfcur;

    EXCEPTION

    WHILE OTHERS THEN

    LIFT;

    END dyn_row_colum;

    VAR v_cursor REFCURSOR;

    EXEC: v_cursor: = dyn_row_colum;

    PRINTING v_cursor;

    SELECT dyn_row_colum FROM dual;

    Grand... and now you have a query that is generated dynamically, providing an unknown number of columns through a slider REF... so you're going to need either a 3rd layer application of party which can cope with a projection of a ref cursor dynamic SQL or you will have to write code PL/SQL dynamic to manage dynamic results. or, if in 11g, use the DBMS_SQL package to convert the ref cursor in a DBMS_SQL cursor and uses the code to analyze and process the results of the query on a base of column position rather than on basis of name of column.  It's a lot of work and is likely to lead to problems of heavy maintenance.

    The real need to have a dynamic number of columns output is something that is often necessary to run reports on the data.

    As a result, most report writing tools are perfectly capable to query the data in the normal way and then rotate dynamically for the presentation of the report.

    SQL and PL/SQL are not the best tools for rotating dynamics.

  • Displaying a sql result differently.

    Hi, please read carefully and if you don't understand what I mean it please let me know.

    Here are the names of tables and columns in tables

    SYSTEM_USER_SKILL

    user_id

    skill_id

    user_abilities

    SYSTEM_ADMIN_SKILL

    skill_id

    skill_name

    SYSTEM_USER

    user_id

    user_full_name

    I want to write a sql dynmanic or a pl/sql that allows to display the user_full_name and the user_ability.

    but I want it to appear as (see link below)

    http://I61.Tinypic.com/fjhy5k.PNG

    PS where you see the "Y" and "N" are the results of user_abilities

    I don't know how to do all that I know is that it's possible with sql dynamic or pl/sql

    someone else has managed to help me using the same description that I posted here. He did it using only my description. I don't provide any code

    Violin SQL

  • How to fix SQL results in double

    Hi all

    I am Michel.

    I want to correct Oracle 11 g SQL statement
    on the view, the table is locked.

    The SQL class that can be created as follows.

    ----------------------------------------------------------------------
    SELECT
    "view the table is locked.
    V.INSTANCE_NAME,
    EU. NOM_SEGMENT
    OF SYS. V_$ SESSION SE, SYS. V_$ LOCK M, SYS. V_$ INSTANCE V, SYS. USER_EXTENTS EU
    WHERE EU. EXTENT_ID = 1
    AND ((SE. SID = M.SID
    AND M.REQUEST! = 0)
    OR (ES. SID = M.SID
    AND M.REQUEST = 0 AND LMODE! = 4
    AND (ID1, ID2) IN
    (SELECT S.ID1, S.ID2
    V $ LOCK S
    WHERE TO ASK! = 0
    AND S.ID1 = M.ID1
    AND S.ID2 = M.ID2)))
    ----------------------------------------------------------------------


    Deriving from the execution of SELECT, appear as shown below.

    ----------------------------------------------------------------------
    '' VIEWTHETABLEISLOCKED' ', ' INSTANCE_NAME', 'NOM_SEGMENT '.
    "view the table is locked ', 'hand',' employees_BK '.
    "view the table is locked ', 'hand', 'employees '.
    "view the table is locked ', 'hand',' employees_BK '.
    "view the table is locked ', 'hand', 'employees '.
    ----------------------------------------------------------------------


    Looking at the results of the foregoing and duplicate results are displayed.

    The feeling that without the high cost of SEPARATE,
    As described below, the SELECTION can be made that redundant.
    I want to change the SQL statement.

    ----------------------------------------------------------------------
    '' VIEWTHETABLEISLOCKED' ', ' INSTANCE_NAME', 'NOM_SEGMENT '.
    "view the table is locked ', 'hand',' employees_BK '.
    "view the table is locked ', 'hand', 'employees '.
    ----------------------------------------------------------------------

    How can I change the SQL for how I think that I enjoyed.

    Thank you and best regards.

    Michel Hi Please try this

    Select *from
    (
    SELECT
    'view the table is locked',V.INSTANCE_NAME,UE.SEGMENT_NAME,row_number() over(partition by V.INSTANCE_NAME,UE.SEGMENT_NAME order by null) rn
    FROM SYS.V_$SESSION SE, SYS.V_$LOCK M, SYS.V_$INSTANCE V,SYS.USER_EXTENTS UE
    WHERE UE.EXTENT_ID = 1
    AND ((SE.SID = M.SID
    AND M.REQUEST != 0)
    OR (SE.SID = M.SID
    AND M.REQUEST = 0 AND LMODE != 4
    AND (ID1, ID2) IN
    (SELECT S.ID1, S.ID2
    FROM V$LOCK S
    WHERE REQUEST != 0
    AND S.ID1 = M.ID1
    AND S.ID2 = M.ID2)))
    ) where rn=1
    
  • AWR time model statistics vs SQL Statistics

    Looking at an AWR report took on a unique snapshot interval, I note the following:

    In time model statistics, DB time is listed as 161,47 seconds, with sql execute represents the time of 127,83 seconds.

    When I DBA_HIST_SQLSTAT to queries on the same cliché and summarize all the elapsed_time_delta of each SQL stored in AWR, I find that it's 132,05 seconds, even after filtering of all PL/SQL (command_type 47) and each SQL with parsing_schema_name SYS.

    If anything, I expect this sum less than that contained in the statistics of the model time, thinking that only the top n sql is included in DBA_HISSQLSTAT.

    Does anyone know where my reasoning was an error?

    KDeWeerd wrote:
    Detailed analysis of an environment, trying to give meaning to all the numbers and to explain things to people doesn't make not easier if you can not all numbers that collects Oracle corresponding to some how.

    Yes, I understand. Here you can not because the statistical statement have no knowledge of what what call. This is probably why Oracle introduced the chronological model: it gives information that you can't derive from other sources.

    Any timed operation will be buffer at most 5 seconds of time data. This means that if a timed (such as the SQL execution) takes a long period of time to perform, the data published to this point of view lack maximum 5 seconds of the time accumulated for the operation.

    Can't really make sense of interpretation which

    means that the value may be missed for 5 seconds for each running of instruction.

  • coil only the SQL result to a text file

    Hello

    Here's my script for getmetadata.sql. The sql script retrieves the metadata of objects for a schema specific to start from a specific date.

    Set serveroutput off
    the feeding off value
    fixed lines 200
    set of 2000 pages
    set verify off
    Set term on
    object_name format a30 column
    coil result_ddl.lst
    Select dbms_metadata.get_ddl (object_type, object_name). ';' from dba_objects where owner_name = '& schema_name' and to_date (to_char (created, 'DDMMYYYY'), 'DDMMYYYY') > = to_date ('& DDMMYYYY ', ' DDMMYYYY');

    In the hold with the result file I get the below lines too.

    "
    Enter the value of schema_name:CUSTOM
    Enter the date value: 08032011
    "

    I wish that this text does not do print and only the metadata script is created.
    Please guide.

    A - K wrote:
    Hello

    Here's my script for getmetadata.sql. The sql script retrieves the metadata of objects for a schema specific to start from a specific date.

    Set serveroutput off
    the feeding off value
    fixed lines 200
    set of 2000 pages
    set verify off
    Set term on
    object_name format a30 column
    coil result_ddl.lst
    Select dbms_metadata.get_ddl (object_type, object_name). ';' from dba_objects where owner_name = '& schema_name' and to_date (to_char (created, 'DDMMYYYY'), 'DDMMYYYY') > = to_date ('& DDMMYYYY ', ' DDMMYYYY');

    In the hold with the result file I get the below lines too.

    "
    Enter the value of schema_name:CUSTOM
    Enter the date value: 08032011
    "

    Is it really what you see? "Do not enter value for DDMMYYYY '?
    Be sure to view the results you get in fact from the code you post.

    I wish that this text does not do print and only the metadata script is created.

    Probably the best way is to explicitly set substritution variables before you start curling, like this:

    set serveroutput off
    set feed off
    set lines 200
    set pages 2000
    set verify off
    set term on
    column object_name format a30
    
    ACCEPT  schema_name       PROMPT "Please enter the schema name (case-sensitive, e.g. CUSTOM): "
    ACCEPT     ddmmyyyy       PROMPT "Please enter the minimum created date (DDMMYYY, e.g. 28022011): "
    
    spool result_ddl.lst
    
    select     dbms_metadata.get_ddl(object_type,object_name)
         ||     ';'
    from    dba_objects
    where      owner_name     ='&schema_name'
    and     created          >= to_date ('&DDMMYYYY', 'DDMMYYYY')
    ;
    
    ...
    

    Beware of round-trip conversions, such as

    to_date(to_char ...
    

    They are almost never necessary in Oracle. If you have a reason why you can't use just created, then it is almost certainly to get the same results without changing the types of data more efficiently (and less confusing).

  • Display SQL results in flash

    Hi all

    Can someone tell me how I would go about setting up flash to display the results returned by a query SQL, one at a time.  I can work on the query and PHP, but want I want to know, how to do flash take each of them and animate it, including the suspension and the compensation of the full screen, and then continues on a screen of 'new '.  That's essentially a list of events in a database.

    So, while watching the movie in action, you'd see

    White screen

    Event 1 (break)

    Tournament 2 (pause)

    Event 3 (pause)

    (make one pause and fade out)

    New screen

    Event 4

    Event 5

    Event 6

    .. and so on until all the results have been posted.

    Any help much appreciated.  In fact, it is possible that what I need is help as to how to achieve this returning from xml.  It's really the actionscript code that I am lost.

    Thank you

    James

    If you do not have a handle on the management of dynamic content in Flash, and then to the time you should focus on solving just this aspect and save with php/sql/xml eventually.  To creat now just a stufff array you want to treat it the way you want and it works from there.  Eventually, that's what you get when you feed the file, the data anyway.

    As far as the break and the animation of the aspects go, your best bet will be to search Google for a tutorial on perhaps a slideshow or marquee that runs automatically.  Understand how it works, and then find a way to turn it into something that suits your needs.

    The basic tools that you will be after will be the Tween class to animate the Timer class to trigger a break/motion, as well as their respective event listeners.  If you can find some simple tutorials just for these two things separately, you might be able to reason about the merger for what you are after.

  • Odd SQL results

    I have a SQL statement which shows a strange behavior. When I run the present:

    SELECT vfn.cat
    IN v_mult_category
    OF vfn, valid_fishery vf vps_fishery_ner
    WHERE vfn.plan = vf.plan
    AND vfn.cat = vf.cat
    AND vf.permit_year = p_Fishing_Year
    AND vf.moratorium_fishery 't ='
    AND vfn.vp_num = p_permit_number
    AND vfn.ap_year = p_Fishing_Year
    AND vfn.plan = 'MUL '.
    AND date_issued = (SELECT MAX (date_issued)
    OF vps_fishery_ner vfn
    WHERE vfn.vp_num = p_Permit_Number
    AND vfn.ap_year = p_Fishing_Year);

    This is supposed to go back to the category "A" for the number of permits given and the fishing year.
    But it returns nothing. But when I add TRUNC at both sides of the line of date_issued, as seen below, it does not return the "a."

    SELECT vfn.cat
    OF vfn, valid_fishery vf vps_fishery_ner
    WHERE vfn.plan = vf.plan
    AND vfn.cat = vf.cat
    AND vf.permit_year = 2010
    AND vf.moratorium_fishery 't ='
    AND vfn.vp_num = 111111
    AND vfn.ap_year = 2010
    AND vfn.plan = 'MUL '.
    AND TRUNC (date_issued) = (SELECT MAX (TRUNC (date_issued))
    OF vps_fishery_ner vfn
    WHERE vfn.vp_num = 111111
    AND vfn.ap_year = 2010);

    I don't know why it would work. If truncating the two sides works, should not do not truncate each side return a value?

    Well your subquery to set the maximum date is not all clauses that are in the body of the request. It therefore generates a maximum based on a larger result set then the dates you compare it with that.
    Coincidentally, the maximum date is the same day as one of the files in the body of the request, in order to for the truncated dates. but it's at a different time, so direct comparison does not work.

    It should work

    SELECT vfn.cat
    INTO v_mult_category
    FROM vps_fishery_ner vfn, valid_fishery vf
    WHERE vfn.plan = vf.plan
    AND vfn.cat = vf.cat
    AND vf.permit_year = p_Fishing_Year
    AND vf.moratorium_fishery = 'T'
    AND vfn.vp_num = p_permit_number
    AND vfn.ap_year = p_Fishing_Year
    AND vfn.plan = 'MUL'
    AND date_issued = (SELECT MAX(date_issued)
    FROM vps_fishery_ner vfn, valid_fishery vf
    WHERE vfn.plan = vf.plan
    AND vfn.cat = vf.cat
    AND vf.permit_year = p_Fishing_Year
    AND vf.moratorium_fishery = 'T'
    AND vfn.vp_num = p_permit_number
    AND vfn.ap_year = p_Fishing_Year
    AND vfn.plan = 'MUL');
    
  • want to extract two values from rows in a single sql result

    Let me first of all explain the situation

    I have two tables
    1 Animal_details(animal_id,and other details)
    2 Animal_weight(animal_id,seq_no,weight,date_weighed)

    in fact situation here is that for each weight I am inserting a new line with seq_no say
    1 for the first weight
    2 for the second weight...
    with their weight and date
    for example. animal_id = 1 seq_no = 1, weight = 200, date_weighed = 12-may-2000;
    animal_id = 1, seq_no = 2, weight = 250, date_weighed = June 12, 2000;

    means seq_no = 1 represents 1 weight of animals
    seq_no = 2 represents 2 weight of animals

    how an animal can have any number. weighted times.

    now what I want, I want to show a result with

    animal_id, weight_1, weight_2 with other animals details in a single line

    How can I get first weight and the second or more weight in the same line for any animal?

    Please answer soon, its urgency.

    Thank you

    You cannot issue a SQL with dynamic column list of 100%. What you can do is something like the questions:

    with t as (
               select  animal_id,
                       max(case seq_no = 1 then weight end) first_weight,
                       max(case seq_no = 2 then weight end) second_weight,
                       max(case seq_no = 3 then weight end) third_weight
                 from  animal _weight
                 where seq_no <= 3
                 group by animal_id
              )
    select  t1.animal_id,
            first_weight,
            second_weight,
            third_weight,
            other_details
      from  t t1,
            animal_details t2
      where t2.animal_id = t1.animal_id
    /
    

    SY.

  • Ask the events of trace sql result 10046 level 8 and 12

    Hi all, I read the result of events to trace sql 10046 level 8 on

    http://www.Oracle-base.com/articles/10G/SQLTrace10046TrcsessAndTkprof10g.php#trace_example

    and I do the level of Event 10046 SQL trace 8 or 12. But the results were not even, plan of execution does not appear

    How to make the execution plan appears?

    How to make the execution plan appears?

    TKProf trace_results.txt .trc explain = name of user and password

  • Model for caching the results of database queries?

    I am interested in the caching of certain common and slow query results in a cache consistency and would like some suggestions on models of 'good '.

    In this case you would use a cache next to the model to the data stored in the cache/database where all updates are written to the cache and the database using a XA transaction (we need to do it this way because there are certain requirements of coherence that are difficult to check (at least with correct performance) by using only the cache). We intend to use a "near cache" with a rear limited size.

    We plan to invalidate the "saved query result cache" as part of each transaction update (we have a few simple rules which determine what query results that must be discarded for each change).

    The part that is a bit tricky is to make sure that no application is perhaps underway while an update of the data related to the query is also underway where the invalidation might be carried out until the result of the query is inserted in result cache... I am not concerned about order of exact time between queries and updates that are ongoing at the same time, but must be 100% sure that no "outdated" information remains (or can be inserted!) in the cache after the update was signed...

    It is not enough to rely on the expiration of the time based on the result cache (I would have to set the time so short that the cache would not give a lot of improvement)

    I think something like the following:

    When you perform a query (which can already caching):

    1. do a dirty read against the result cache to determine if a query with the specified result already exists here - if so use it!
    2. If it is not found lock, a key with the specified parameter, and when the lock is obtained to check once more that there is still no value, if there now to unlock and use it!
    3. If there is still no value run the database query, save the result in the cache, unlock and use the result


    When you make a change using a XA transaction:
    Remove records from query results in the cache corresponding to the changes - this can be done without first checking if there is really no result for the parameter or not.
    I guess the stage of preparation of the transaction will lock the deleted records in the cache of query result preventing the invalidations and simultaneous updates...

    Everyone sees a few windows of vulnerability here? For example, it is possible that the cache owned by the XA transaction lock is released before the update of the database has finished (thus a request could be carried out against the old data and be stored in the cache after the invalidation have been performed) or what exactly the kind of problems that the XA protocol designed to prevent?

    An alternative I've been thinking about how to run the database query / caching the result would be to leave a store class hides (for query result cache) execute queries when no entries exist in the cache, but I don't know how I would change the locking protocol to make it work - can I still lock a cache by this type or component entry , or which would result in a block?

    Suggestions, thoughts etc. are much appreciated!

    Best regards
    Magnus

    Hi Magnus,

    Everyone sees a few windows of vulnerability here? For example, it is possible that the cache owned by the XA transaction lock is released before the update of the database has finished (thus a request could be carried out against the old data and be stored in the cache after the invalidation have been performed) or what exactly the kind of problems that the XA protocol designed to prevent?

    If the query is executed as you described and your application can take the same lock of keys to query before you update the data and only released the lock, once the transaction is complete, you can be assured that a query based on outdated information will not be cached after the transaction. If you want to be sure that no stale query results will be returned, remove the result cached outside of the transaction just before the validation of the transaction.

    An alternative I've been thinking about how to run the database query / caching the result would be to leave a store class hides (for query result cache) execute queries when no entries exist in the cache, but I don't know how I would change the locking protocol to make it work - can I still lock a cache by this type or component entry , or which would result in a block?

    I think that you can implement a class of dumps for query result cache that can be used to provide the appropriate locking device. If implemented correctly, I don't think that there is a risk of blocking.

    Kind regards

    Harv

Maybe you are looking for

  • I like to keep an eye open when I go offline. Windows7

    [Firefox for Windows7]I "refreshed" Firefox settings by default and has not helped.

  • HP Deskjet 1112: HP Deskjet 1112 does not print

    Recently, I bought a HP Deskjet 1112. It prints very irregular and I can't seem to understand the problem.Here's what I've tried so far:(1) turning and turn on the printer(2) turn the system off and on again spooler (using Windows + R, typing in serv

  • Cannot start Windows OS - 10.11

    Since the installation of El Capitan I can't get my computer to boot into Windows/Bootcamp. When I installed the new Mac operating system, I just leave the one Windows partition, only laying on Snow Leopard. Windows always appear in the start menu wh

  • the data in table view

    I have an array of clusters.  Each element of the cluster contains a lot of data elements for a sample.  The index of the table indicates what number of the sample. The size of the array will not be determined until the time of execution because the

  • How to get rid of the ddl errors because I can't change my theams in windows xp

    I don't know what is happening that I can't have my XP theams. every time I'm doing it, it says "to help protect your computer, windows has closed this program." Run the DDL as an application