the column filtering to condition

Hi, I want to be able to select a few columns based on a key. for example, if my key is "FA" then I want my columns of FA to those returned and PG not even if PG columns are also reported. Here's the idea:
table1
id  key  val
FA  1  5th Ave
FA  2  NY
FA  25  UserFA
PG  7  9th road
PG  11 MIA
PG  12 I don't need this column display
PG  25 UserPG
... and the following query:
select max(decode(key,'25',val)) as name
, CASE when id = 'FA' THEN max(decode(key,'1',val)) END as  address 
, CASE when id = 'FA' THEN max(decode(key,'2',val)) END as  city 
, CASE when id = 'PG' THEN max(decode(key,'7',val)) END as  address 
, CASE when id = 'PG' THEN max(decode(key,'11',val)) END as  city 
from table1
where id = <x> 
group by id;
So I expect an output as follows if I put id = "f":
name   address   city
UserFa  5th Ave  NY
as you can guess this survey one
ORA-00918: column ambiguously defined
because I 'as address' and 'the city' twice, renaming each one differently probably not an option because the output of this past somewhere else who is looking for these keys. So my question is... How can I re - write this to be able to select only the columns for FA if id = FA and columns for PG if id is PG? instead of select all and causing all this conflict? I have about 20 to 30 ID, I display only 2... so keep that in mind when you change this, because even in remaming the selct identifier selects all columns, including those that are different from the selected Id.

Please let me know if it needs to be clarified,

Thank you

A select statement must give one set of columns for all rows, so you can not dynamically choose columns based on the key, but you can leave some null based on the key.
I think your questioning of the base is narrow--just combine all expressions address into a single statement, all the expressions of the city into a single statement etc. :

select max(decode(key,'25',val)) as name
, CASE when id = 'FA' THEN max(decode(key,'1',val))
       when id = 'PG' THEN max(decode(key,'7',val)) END as  address
, CASE when id = 'FA' THEN max(decode(key,'2',val))
       when id = 'PG' THEN max(decode(key,'11',val)) END as  city
from table1
where id = 
group by id;

Kind regards
David

Tags: Database

Similar Questions

  • Using the same value of the column with two conditions as different results

    Hi all

    Maybe it's easy to answer what I'm trying to do now, but my brain really stop and I need your opinion. I have a table of account which has values like below

    Account Fairy OBJ type of Unit year
    11500196AA130

    20

    12000196AA1302012000-196AA1302011000-196AA1302023000196AA1302024500-196AA13020

    If I can get flow and receiveable with two different query sql like underneath, but I can't get the flow and the reciveable with the sum in a row and sql. Please give me some opinions to go.

    Thank you

    SELECT

    To_char (Trim (Account)) Account_no,

    (select accountname in AddressBook where accountname addid = TO_CHAR (TRIM (account))),

    Sum(Fee/100) flow

    Of

    account tb1

    where

    obj in ('196') and tb1.type = 'AA' and TO_CHAR (TRIM (unit)) = "130".

    and year = '20'

    and tax > 0

    Group

    account

    order by

    account;

    SELECT

    To_char (Trim (Account)) Account_no,

    (select accountname in AddressBook where accountname addid = TO_CHAR (TRIM (account))),

    Sum(Fee/100) reciveable

    Of

    account tb1

    where

    obj in ('196') and tb1.type = 'AA' and TO_CHAR (TRIM (unit)) = "130".

    and year = '20'

    and tax < 0

    Group

    account

    order by

    account;

    SELECT

    Trim (Account) Account_no,

    (select accountname in AddressBook where accountname addid = TRIM (account)),

    Sum (case when fairy< 0="" then="" fee/100="" else="" 0="" end)="">

    sum (case where fees > 0 then charge/100 0 otherwise end) flow

    Of

    account tb1

    where

    obj in ('196') and tb1.type = 'AA' and TO_CHAR (TRIM (unit)) = "130".

    and year = '20'

    Group

    account

    order by

    account;

  • Increase the width of the column interactive report filter

    Hello

    When you click on a column on an IR header, a filter in the form of a widow of pop - up appears, which has the list of values. I have an IR column where the values are long, such that they do not fit in the filter area. As there is no horizontal scroll bar, so the value is truncated.

    Is it possible to increase the width of the column filters say 3 inches for one or all columns, or even display a horizontal scroll bar so that the values do not get truncated?

    I use Apex v4.2.1.

    Hello

    Go wrote:

    POOJA,

    check out the blog of jari list drop down interactive column resizing report that can help you...

    Here you can find simple solutions for APEX 4.2

    APEX 4.2 resizable interactive column topic report menu

    Kind regards

    Jari

  • How to hide the column in the layer model

    Hello

    My version of Jdeveloper is 11.1.1.3.0.


    We can make a visible attribute / guidance invisble by setting the value of display boards in the tab control.


    I want to display the column under certain conditions.
    Is it possible to dynamically model level itself by displaying indicators property?


    Reg,
    Vini

    Hello!
    Try using instead of
    rendered = "#{Bindings [def." [Name]. Hints [def. "{[Name] .displayHint! = 'Hide'} '.
    This one
    rendered = "#{def.hints.displayHint! = 'Hide'} '"

  • Interactive report conditional forwarding using the link in the column?

    Hi all

    I use APEX 4.2. We have an interactive report as an overview, we are the column standard link (with the pencil symbol) to go to a form of details.

    Currently, we introduce the user permissions to our application. In accordance with these permissions, not all objects contained in the report can be changed by a user. I made a copy of the form that is set to read-only and eliminated all the buttons.

    My question is: is it possible to redirect conditionally to the form (page 301) or reading one page (10301) according to the permissions of the user? And if I can change the symbol in the column link depending on the permissions this way? Any help would be appreciated. Thank you!

    Birgitt

    I got it! With 2 hidden columns and a column containing the link and icon. First, I created a table where I store my frm pages - and unalterable (afp and arp) according to the dev_class. PERM is the colum where I get 1 (authorized) or null. This column contains the link and the icon later in my report. Then I built columns hidden in my opinion like this:

      CASES WHERE the afp IS NOT NULL THEN
         -CASE perm WHEN = 1 THEN ' f? p ='|| v ('APP_ID') | ': 301 :'|| v ('SESSION'): ':YES:301:P301_DT_ID, P301_DT_ID_4_HIST, P301_DEV_CLASS, P301_DEV_SUBCLASS :'|| v.dt_id | ',' | v.dt_id | ',' | v.DC_ID | ',' | v.DSC_ID
         -ELSE ' f? p ='|| v ('APP_ID') | ': 10301 :'|| v ('SESSION'): ':YES:10301:P10301_DT_ID, P10301_DT_ID_4_HIST, P10301_DEV_CLASS, P10301_DEV_SUBCLASS :'|| v.dt_id | ',' | v.dt_id | ',' | v.DC_ID | ',' | v.DSC_ID
         CASE perm WHEN = 1 THEN ' f? p ='|| v ('APP_ID') |': ' | AFP: ': ' | v ('SESSION') |': YES :'|| AFP |': P' | AFP | "_DT_ID, P' | AFP | "_DT_ID_4_HIST, P' | AFP | "_DEV_CLASS, P' | AFP | ' _DEV_SUBCLASS :'|| v.dt_id | ',' | v.dt_id | ',' | v.DC_ID | ',' | v.DSC_ID
           ELSE ' f? p ='|| v ('APP_ID') |': ' | ARP: ': ' | v ('SESSION') |': YES :'|| ARP |': P' | ARP | "_DT_ID, P' | ARP | "_DT_ID_4_HIST, P' | ARP | "_DEV_CLASS, P' | ARP | ' _DEV_SUBCLASS :'|| v.dt_id | ',' | v.dt_id | ',' | v.DC_ID | ',' | v.DSC_ID
         END
       ANOTHER NULL
      END show_link
      CASES WHERE the afp IS NOT NULL THEN
         CASE perm WHEN = 1 THEN ' menu/pencil2_16x16.gif.
            ELSE 'calmag.gif '.
         END
       "1px_trans.gif" - NOTHING ELSE
      END show_icon

    To the link column, I added the following HTML Expression:

    Thanks for your help!

    Birgitt

  • Interactive report, conditional display of the column binding

    Hello

    We have obligation to disable editing in case this field is 1 (1 = closed).

    Is it possible to disable it on interactive report.

    -case when status = 1 link in the column should be disabled (not visible) in order to prevent future changes on the payroll.

    SELECT payroll_no, status

    OF hr_payroll

    ORDER BY payroll_no DESC;

    I tried the link below, but it does not work in my case.

    http://nerd.NET.au/24-Apex-application-express/report-layout/92-conditionally-show-report-link-column-based-on-value-of-...

    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production

    Request Express 4.2.2.00.11


    Thank you in advance,

    Best regards, FM

    Status of the INCIDENT WHEN 'ACTIVE' = then


    '
    OTHER END null deactivate_employee.

    Of

    EMPLOYEES

    What exactly is the error you get? What HTML is displayed in the HTML source code?

    Just by looking at it, I would say that you need to remove the "/" before the f? p

    Don't forget not this way could cause problems if you start using the checksum, then you might want to look at the use of APEX_UTIL. PREPARE_URL to create your URL.

  • ADF: Columns of the Table filtering problem

    Hello

    My Version of JDeveloper is 11.1.1.5

    I am facing a problem with the filter of the table...

    Is it possible to implement the feature of research on filtering only on af:table with panelCollection?

    Could someone help me please in this?

    I need Research* not only the filtering of the data inside the table with the facet of the columns of the table filter...

    Can someone help me with this application?

    Many thanks in advance,

    Kind regards
    Anil

    Published by: 977652 on February 17, 2013 19:28

    Published by: 977652 on February 17, 2013 19:38

    You can just type in the filter like '% EBS' field and you will find your file.

    Timo

  • Column containing the information of Partition Condition critical

    I use 11.2.0.2 on AIX 6.1.
    I create a range such as partition table below.
    CREATE TABLE SALES_RANGE
      ( prod_id       NUMBER(6)
      , cust_id       NUMBER
      , time_id       DATE
      , channel_id    NUMBER(3)
      )
     PARTITION BY RANGE (time_id)
     ( PARTITION sales_q1_2012 VALUES LESS THAN (TO_DATE('01-APR-2012','dd-MON-yyyy'))
     , PARTITION sales_q2_2012 VALUES LESS THAN (TO_DATE('01-JUL-2012','dd-MON-yyyy'))
     , PARTITION sales_q3_2012 VALUES LESS THAN (TO_DATE('01-OCT-2012','dd-MON-yyyy'))
     , PARTITION sales_q4_2012 VALUES LESS THAN (TO_DATE('01-JAN-2013','dd-MON-yyyy'))
     );
    I can find all the information related to this table in the tables of the dictionary as below.
    SQL> SELECT OWNER,
           TABLE_NAME,
           PARTITIONING_TYPE,
           SUBPARTITIONING_TYPE,
           PARTITION_COUNT,
           PARTITIONING_KEY_COUNT,
           STATUS,
           DEF_TABLESPACE_NAME
    FROM DBA_PART_TABLES
    WHERE OWNER='SCOTT';
    
    OWNER                          TABLE_NAME                     PARTITION SUBPARTIT PARTITION_COUNT PARTITIONING_KEY_COUNT STATUS   DEF_TABLESPACE_NAME
    ------------------------------ ------------------------------ --------- --------- --------------- ---------------------- -------- ------------------------------
    SCOTT                          SALES_RANGE                    RANGE     NONE                    4                      1 VALID    USERS
    
    SQL> SELECT TABLE_OWNER,
           TABLE_NAME,
           COMPOSITE,
           PARTITION_NAME,
           PARTITION_POSITION,
           TABLESPACE_NAME,
           LAST_ANALYZED
    FROM DBA_TAB_PARTITIONS
    WHERE TABLE_OWNER='SCOTT'
    ORDER BY PARTITION_POSITION;
    
    TABLE_OWNER                    TABLE_NAME                     COM PARTITION_NAME                 PARTITION_POSITION TABLESPACE_NAME                LAST_ANAL
    ------------------------------ ------------------------------ --- ------------------------------ ------------------ ------------------------------ ---------
    SCOTT                          SALES_RANGE                    NO  SALES_Q1_2012                                   1 USERS                          17-FEB-12
    SCOTT                          SALES_RANGE                    NO  SALES_Q2_2012                                   2 USERS                          17-FEB-12
    SCOTT                          SALES_RANGE                    NO  SALES_Q3_2012                                   3 USERS                          17-FEB-12
    SCOTT                          SALES_RANGE                    NO  SALES_Q4_2012                                   4 USERS                          17-FEB-12
    
    
    SQL> SELECT * FROM DBA_PART_KEY_COLUMNS WHERE OWNER='SCOTT';
    
    OWNER      NAME            OBJEC COLUMN_NAME     COLUMN_POSITION
    ---------- --------------- ----- --------------- ---------------
    SCOTT      SALES_RANGE     TABLE TIME_ID                       1
    But where can I find the essential condition of the c partition * ' VALUES LESS THAN (TO_DATE('01-APR-2012','dd-MON-yyyy')) "* in any dictionary table?".
    SQL> SELECT TABLE_OWNER,
           TABLE_NAME,
           COMPOSITE,
           PARTITION_NAME,
           PARTITION_POSITION,
           TABLESPACE_NAME,
           LAST_ANALYZED
    FROM DBA_TAB_PARTITIONS
    WHERE TABLE_OWNER='SCOTT'
    ORDER BY PARTITION_POSITION;
    

    Look again - it's in the column HIGH_VALUE

    SQL> set long 10000000
    SQL> SELECT partition_name, HIGH_VALUE
      2  FROM DBA_TAB_PARTITIONS
      3  WHERE TABLE_OWNER='SCOTT'
      4  /
    
  • Conditionally display the values in the column based on another column

    Hello

    I'm sure this has been covered before, but I can't find anything appropriate based on the research I've done.

    I have 2 attributes in VO.

    I have a table that displays this VO.

    I still want to display header for both attributes, but I only want to show the value of attribute 1 in a row, if value of Attibute2 = 'I '.

    If Attibute2! = 'I', so I want just the column for Attribute1 to be empty space.

    I've not yet done anything with conditional expressions, and I wonder if someone could provide a link or a thread which is similar to this issue.

    Thank you

    Joel

    You can do according to the post above, but if you are not interested in changing the original Version and I want to just change the user interface page only, you can do as in the example below:


    lines = ' #{bindings. " Employee.rangeSize}.
    emptyText = "#{bindings." Employee.Viewable? "{'No data to display.': 'Access Denied.'}".
    fetchSize = "#{bindings." Employee.rangeSize}.
    rowBandingInterval = '0 '.
    selectedRowKeys = ' #{bindings. " Employee.collectionModel.selectedRow}.
    selectionListener = "#{bindings." Employee.collectionModel.makeCurrent}.
    rowSelection = "single" id = "t1" >

    headerText = "#{bindings." Employee.hints.Employeeid.label}.
    ID = "c2" >


    model = ' #{bindings. " Employee.hints.Employeeid.format}"/ >



    headerText = "#{bindings." Employee.hints.Employeename.label}.
    ID = 'c3' >



    headerText = "#{bindings." Employee.hints.Salary.label}.
    ID = "c1" >
    *
    ID = "ot2" >

    model = ' #{bindings. " Employee.hints.Salary.format}"/ >


    OutputText for the Attibute1, you can write the EL expression as:
    *<>
    * value = "#{rank." Attibute2 == "I"? "line. "{Attibute1:"}. "
    * id = "ot2" > *.

    I hope this helps.

    Thank you
    Nini

  • the column of numeric string filtering

    I have this problem.
    Consider having a table named table1 with an id of the column named Column1 of varchar2.
    This column contains the giuds and the number (es '12345' and 'ed6tyJh56')
    I want to filter all the lines containing the string of number.
    I did:
    Select * from table1 where LENGTH (TRIM (TRANSLATE (column1, ' + -. 0123456789', ' '))) is null.

    OK so far.

    My problem is that I am not able to filter the table that contains a predicate as column1 > 100

    I tried to write:

    Select / * + no_query_translation * / column1)
    Select / * + no_merge * / column1 from table1 where LENGTH (TRIM (TRANSLATE (column1, ' + -. 0123456789', ' '))) a null value
    ) a
    where a.column1 > 100

    but nothing. I get the message "invalid character '!
    I believe the problem can be solved with a function but who work for a single line, I ' m courious to know if
    There is a trick or something to force the order of filters somting.
    In particular, to force the filter (a.column1 > 100) on display online.

    Anyone know?

    .. or be achieved the first inline view

    SQL> create table table1
      2  (column1 varchar2(100)
      3  );
    
    Table created.
    
    SQL> insert into table1 values ('12345');
    
    1 row created.
    
    SQL> insert into table1 values ('ed6tyJh56');
    
    1 row created.
    
    SQL>
    SQL> select * from table1 where LENGTH(TRIM(TRANSLATE(column1, ' +-.0123456789',' '))) is null
      2  /
    
    COLUMN1
    --------------------------------------------------------------------------------
    12345
    
    SQL>
    SQL> select column1 from (
      2  select rownum, column1 from table1 where LENGTH(TRIM(TRANSLATE(column1, ' +-.0123456789',' ')))
     is null
      3  ) a
      4  where a.column1 > 100
      5
    SQL> /
    
    COLUMN1
    --------------------------------------------------------------------------------
    12345
    
    SQL> 
    

    Published by: Alex Nuijten on September 8, 2009 13:46

  • How to use c:if condition check in the column to display the value

    I'm working on Jdeveloper11g with the table of the ADF.

    UseCase: in one of the column I use the condition such that if the value is not null then use golink otherwise display fair value (in fact, it is nothing). I mean I should be using golink if there is a value for this line. I tried with below but without success.

    Let me know the solution.

    < af:column sortProperty = "docName" sortable = "true".
    headerText = "#{res}" >
    < c:if test = "${docName.length > 0}" >
    "< af:goLink destination =" #{row.docURL} "text =" #{row.docName} ".
    targetFrame = "_blank" / >
    < / c:if >
    < af:outputText value="#{row.bindings.docName.inputValue}"/ >
    < / af:column >

    Thank you
    Katie

    Katie,

    You can do this by using switch or by using the visible property.
    The use of switcher:

    
         
          
              
          
          
              
          
         
    
    

    The visible property using:

    
         
         
    
    

    Jean Lou

  • Column filtering for the current year measure

    Hello

    I'm blocked up with the question, we have a report of three tables D1, D2, and F1. Where D1 is of time dimension. We now report D2 and F1 with action, and the report is placed on the dashboard which is having the guest of the year.

    F1 is joined with dimension D2 and D1 time as well, the requirement is in the report we measure column say X should always show the values for the current year, while others displayed according to the prompt values... In short, I want to show the column to measure for the current year, even if the user selects the value of prompt for year earlier and it must not change the values.

    Please let me know, how to get there.

    Thanks in advance

    I am able to do this by following steps.

    1. I created a column in the MDB layer with similar to above said Srini case statement.
    2. Then I made the logic level of the time dimension column at ALL. So obiee ignores / filter join with the dimension of time to this measure, and the measure will always displays the data from the current year according to the case statement.
    3. If I did not this measure to all levels at the logical level, it's not working to the dashboard, when we change the year with the previous year it shows null values or zero according to the instruction box.

    Thank you.

  • Custom AF:table, the default filtering view filtered etc.

    JDeveloper 12.1.3

    I am trying to assemble the pieces, I found on these forums and elsewhere on the web, given that I use 12.1.3 do not know if what I found, it is best practice, given that some ideas are dated.

    Let's say I have a table of addresses, several fields such address_id,address_line, city, state, zip, country... but what is important for this use case, the table has a current flag, which is always either Y or N.

    1. try to implement filtering without using table blockable af. The main reason is that users do not want to see this side of filter above the column headers. In addition, the table should be filterable by a single attribute (current flag), and finally this even filterable column is not used in the presentation of the table, only the addresses in the table. The current filter is af:selectOneChoice something like:

    < af:selectOneChoice label = "Current"? ID = "soc2" simple = 'true '.

    valueChangeListener = "#{backingBeanScope.backing_view1.filterChanged} '"

    autoSubmit = "true" binding = "#{backingBeanScope.backing_view1.currentFilter}" >

    < af:selectItem label = "All" value = "All" id = "si2" / >

    < af:selectItem label = 'Current' value = 'Y' id = "si3" / >

    < af:selectItem label = "Non-routine" value = "N" id = "i5" / >

    < / af:selectOneChoice >

    2. the second condition is that when the user opens the page for the first time, more high af:selectOneChoice is defined on < af:selectItem label = 'value' = 'Y' id = "si3" / > and the table is filtered to display only the lines with the flag set to y. user can use af:selectOneChoice to set the table to any other option. If the user navigates to this page and returns, the table and the 'filter' must retain value selected previously.

    3. If a table is filtered with say < af:selectItem label = 'value' = 'Y' id = "si3" / > and the user modifies or creates record, such as modified or new address is marked with current = 'n', (and this is done in the form of popup dialogue), after the closure of the pop-up window CRUD, newly edited/created record cannot be demonstrated.

    I guess I'd know how to implement these requirements individually (not sure about 2 though) but putting all the best practice way, probably not. Any help is appreciated, I'll close this thread once I have a complete solution for this use case (which I or someone else will publish) so that it can be useful in the future.

    My 5 cents:

    1.

    valueChangeListener = "#{backingBeanScope.backing_view1.filterChanged} '"

    backingBeanScope is specific scope adf provided for declarative components.

    If your code is not part of these components so it is best to use a different scope (for this use case, application scope is probably sufficient and you can't even write the requestScope prefix)

    Binding = "#{backingBeanScope.backing_view1.currentFilter}" > "

    It is usually bad practice (any component of a binding class is a standard approach for desktop applications, but not for the JSF).

    In short, you should bind the component to a managed bean that you must handle with any component (which is rare).

    In all other cases, you must create a concrete property binding (as the "value", "label", "read-only",...)

    2. you are talking about the value of the element, so it would be 'natural' to link the 'value' variable in some managed bean property.

    Because this bean must survive browsing, it should be placed in pageFlowScope or sessionScope.

    3. well, you will probably be filter your lines using ViewCriteria.

    Then maybe that you can use ViewObjectImpl.rowQualifies () method of applied access VC, read the value of the bind variable and determine if this line should be displayed or not.

    Something like this: binary: the substitution of ViewObjectImpl::rowQualifies (...) for memory filtering of the child nodes of a tree component

    Dario

  • A loop until the end of the column

    Hello!

    I have a string type 2D table that I want to loop through. The output of the table is feeding an "analysis of the string" vi and then converted into a timestamp. The problem is that the column of my table 2D is a different size. This means that some columns have a few empty cells towards the end of the column. When the cells are feed to the 'string analysis', and it occurs. I want it first is research in the table and delete all of the empty cells or find a way to the loop to the bottom of the column and stop when empty cells begin. The table is not fixed, then it is impossible to use a constant here. Can someone help me on this one?

    Greetings

    Kristoffer

    Here is my interpretation of the solution of Alexander.

    Right-click on the inner circle for loop to add the conditional terminal.

  • Update line in the column-based database

    Hello

    I am trying to find a way to update a row that has a SQL database based on two columns. If the command and the match number sensor order number and sales sensor that already exists in the database, I want to update the column of reading of the sensor. If not exists then I want that it creates a new line. How would I go to do this?

    Thank you

    Chris

    You can use the tools of DB Query.vi Execute. Here is an example of a MS Access 2010 database where a column value is updated in all rows satisfying the WHERE conditions.

    Ben64

Maybe you are looking for

  • Buttons to the left of the URL are missing.

    I accidentally did something to make the buttons 'Coffee Morning', 'Web of Trust' and 'Readability' gone to the left of the URL that is in the 3rd line horizontally to the browser (i.e. line 1 is orange "Firefox", line 2 are tabs that are currently o

  • Safari address bar does not work

    Hello This morning I try to type the text in the address bar of safari, but I can't type, when I press on enter overlaps with the previous text. How to restore safari? Thank you Software version: OS X El Capitan 10.11.3

  • Upgrade the hard drive or the new laptop

    I currently own a mid-2010 Macbook Pro that works well (Apple store ran all the checks and he said everything was good), but there almost six years and I don't want to die any time soon (I need a laptop for school). I do not use the mac for something

  • Pavilion Elite m9600t: OS reinstall for HD "Advanced format" on Windows Vista

    I have a HP Pavilion Elite m9600t desktop provided with Windows Vista. Recently my 640 GB Hitachi hard drive gone bad. I ordered a new one (Seagate 1 TB), installed and tried to reinstall the Vista operating system with the provided HP Vista recovery

  • What are the possible ways to re-create a profile windows without a mouse click?

    I need to automate how to recreate profiles windows corrupted by just double clicking on an executable file to a standard user with no privileges admin on his machine. How can I achieve this? Is this possible? Windows Vista SP2UAC is controlled via G