Multi Value PS Query Works in v2, but not v3 or 4
I have been using the query below (and others like it) for a few years, but it didn't work on v3, and now it doesn't work on v4--which is supposed to be backwards compatible.
Get-ADUser test01 –properties memberof, DisplayName, employeeID | Select-Object SamAccountName, DisplayName, employeeID, @{label="Groups";Expression={[string]::join(";", ($_.memberof))}} | export-csv -notype -force c:\filepath\filename.csv
I must invoke PS with the -version 2 suffix to run it. Any ideas?
Thanks!
Hi,
Here's the adjustment I'd make:
Get-ADUser testac1 -Properties memberOf, DisplayName, employeeID |
Select-Object SamAccountName, DisplayName, employeeID, @{label="Groups";Expression={ ($_.memberOf | % { Get-ADGroup $_ }).Name -join ';' }} |
Export-Csv -NoTypeInformation -Force c:\filepath\filename.csv
EDIT: Another option:
Get-ADUser testac1 -Properties DisplayName, employeeID |
Select-Object SamAccountName, DisplayName, employeeID, @{N='Groups';E={(Get-ADPrincipalGroupMembership -Identity $_.SamAccountName).Name -join ';'}} |
Export-Csv -NoTypeInformation -Force c:\filepath\filename.csv
http://ss64.com/ps/get-adprincipalgroupmembership.html
Don't retire TechNet! -
(Don't give up yet - 13,085+ strong and growing)
Similar Messages
-
Query works in preview, but not when added under a Query Group
Hello Experts-
I'm trying to use this query as one of the options under the drop down on the Supplier Search under the Supplier Management.
Error message:
while trying to invoke the method com.sap.odp.comp.query.QueryParamValue.getPromptParamDef() of a null
object loaded from local variable 'paramValue' while trying to invoke the method
com.sap.odp.comp.query.QueryParamValue.getPromptParamDef() of a null object
loaded from local variable 'paramValue'
The query itself is complicated, but it works fine when executed under preview.
Wondering if any one has ever seen this behavior and knows of any typical causes?
Thanks,
MikeThanks for the offer, Vignesh.
Sorry, I'm currently having trouble duplicating it, but next time it happens I'll try to get some screenshots.
I have narrowed it down to blank values in optional string fields when the query loads. I fixed (kind of) the ones I was having trouble with by rearranging the filter parameters so there would not be blanks.
Thanks again,
Mike -
XPath query works with CLOB but not with object relational
hi all
i have the following queries,the XQuery work with all, but XPath queries work with XMLType CLOB and Binary XML, but they do not work with XMLType as Object relational,
select extract (object_value,'movies/directorfilms/films/film [studios/studio = "Gaumont"]')
from xorm;
select extract (object_value,'movies/directorfilms[director/dirname = "L.Cohen"]/films/film[position()=2]/t')
from xorm;
they shows this message
ORA-00932: inconsistent datatypes: expectd SYSTEM.name683_COLL got CHAR
thanksHi Marco
fisrt here is my RO
BEGIN
DBMS_XMLSCHEMA.registerSchema(
SCHEMAURL=>'http://......../ORMovies.xsd',
SCHEMADOC=>bfilename('DB','Movies.xsd'),
LOCAL =>false,
GENTYPES=>true,
GENTABLES=>FALSE,
CSID=>nls_charset_id('AL32UTF8'));
END;
create table XORM of xmltype
xmltype store as object relational
XMLSCHEMA "http://......../ORMovies.xsd"
ELEMENT "movies";
INSERT INTO XORM
VALUES(XMLType(BFILENAME('DB','ORMovies.xml'),nls_charset_id('AL32UTF8')));
here the XQuery format that work fine with the OR
A/D
select XMLQuery ('for $a in movies/directorfilms/films/film
where $a/studios/studio = "Gaumont"
return $a'
passing object_value
returning CONTENT)"TitleX"
from xorm;
child element query
select XMLQuery ('for $a in movies/directorfilms/director[dirname = "Feyder"]
let $b:=$a/../films/film[position()=2]
return $b/t'
passing object_value
returning CONTENT)"TitleX"
from xorm;
here is the XPath format which doesn't work
select extract (object_value,'movies/directorfilms/films/film [studios/studio = "Gaumont"]')
from xorm;
select extract (object_value,'movies/directorfilms[director/dirname = "Feyder"]/films/film[position()=2]/t')
from xorm;
by the way all queries work fine with the CLOB or Binary XML
many thanx Marco -
ORA-01891 - Query works in SQL+ but not in JDev
JDev 9.0.4 / DB 8i...
I run a query in SQL+ and it returns results, I run it in JDev Worksheet and I get "ORA-01891: Datetime/Interval internal error".
The query is a select from a view based on a synonym that links to a table in another DB (database link). I have boiled it down to it's "simplest" form for testing and it looks like:
select * from some_table;
I can also run this query in 9.0.5.2 worksheet.Funny you should mention that. The reason I found this error is because one of my VOs wasn't working, so I tried running the query in the worksheet. Didn't work there either but I was getting this different error (posted above). Anways, turns out the viewobject had the wrong attribute listed so I fixed that but the worksheet doesn't work.
I don't think it's the attribute because the worksheet isn't directly connected to the VO so it shouldn't be aware of it. Additionally, only the VOs that are based on the view/synonym/link are affected.
Thanks for the suggestion though! -
Query works in Report but not during Edit session
I have a report based on an SQL query, and it works perfectly from the menu in Development. It's also in Test and Production, and it works there, too. I want to change the template it's on, so I went in through the Navigator to open up and change the report. The Edit session opens up to the query, but I cannot move to any of the other tags, because it says the query is "not valid".
It won't allow me to save the query 'as is', because it supposedly isn't valid. The report isn't locked, and prior versions (I went back to view five of them) have the same trouble. How can the query work off the menu, but not be 'valid'? We installed a patch recently, but even so, why would the query work in one spot and not another?
Anyone have any ideas on what I can do?
Pat MurrayHi,
Please give me the query and the error the error you are getting.
Thanks,
Sharmila -
SQL query works for Access but not mySQL
*I'm using the Database Connectivity VIs* Can anyone give me a clue as to why the following query works with an MS Access File DSN but not a mySQL File DSN:
SELECT * FROM (SELECT * FROM WP100598 WHERE SerialNum LIKE '311022-05%' OR SerialNum LIKE '311022-07%') WHERE UTCTime > 1090882800 AND UTCTime < 1092870000 ORDER BY SerialNum desc
Thank you, your help is much appreciatedHi,
I don't think MySQL supports nested queries.
Regards,
Wiebe.
"optobionics" wrote in message
news:[email protected]..
> *I'm using the Database Connectivity VIs* Can anyone give me a clue
> as to why the following query works with an MS Access File DSN but not
> a mySQL File DSN:
> SELECT * FROM (SELECT * FROM WP100598 WHERE SerialNum LIKE
> '311022-05%' OR SerialNum LIKE '311022-07%') WHERE UTCTime >
> 1090882800 AND UTCTime < 1092870000 ORDER BY SerialNum desc
> Thank you, your help is much appreciated -
Query working from sqldeveloper but not from aspx
Hello,
Well Im working on an application that has different queries that involve characters such as áéíóú // ÁÉÍÓÚ // ñÑ. Now the problem is that the query works just fine coming from sqldeveloper or toad but when it's called from an aspx file it returns no rows. Any idea why this might be? It only happens when the query has at least one of the above mentioned characters.
Here you can see an example:
SELECT DISTINCT N_DOCUMENTO FROM PROCESOS_METODOLOGIAS WHERE "LINEA DE NEGOCIO" = 'PRODUCCIÓN' AND N_DOCUMENTO IS NOT NULL ORDER BY N_DOCUMENTO ASC;I managed to "bypass" it by using LIKE for the time being
SELECT DISTINCT N_DOCUMENTO FROM PROCESOS_METODOLOGIAS WHERE "LINEA DE NEGOCIO" LIKE '%PRODUCCI%' AND N_DOCUMENTO IS NOT NULL ORDER BY N_DOCUMENTO ASC;But I'm sure there's a solution for that. Any hints would be greatly appreciated.
PS: Query from aspx is made with reference 10g to version 11g on server.Just as I finished osting this, I found out that the problem was ust that, working with the 10g reference on the 11g server version. in case anyone needs that...
-
Query works in Access but not CF
I wrote this query initially in access to extract the data I
wanted out of my table. In MS Access, the query works fine, returns
the desired data. When I run the query from my CF page, i get the
following error:
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC
Socket][Microsoft][ODBC Microsoft Access Driver] Too few
parameters. Expected 2.
Can anyone tell me why? Below is my queryAs the IIF function is a valid CF function, it may not be
getting passed as 'plain text' to Access, instead CF
may be attempting to compile the function and pass the
result. If you can turn on debugging and for a short time set it to
include the SQL being passed in error messages, you can see what is
really going on.
Another option is to create/save the query in the Access
database and reference that instead of a table in your CFQUERY
call. Since you are just running a staright query and not passing
anything from CF (unless I am mistaken), calling the Access query
for your results would work fine.
<CFQUERY ...>
SELECT * FROM myQueryName
</CFQUERY>
HTH,
CR -
Coldfusion query works in cfm but not cfc
I have the following query that works just fine in cfm file but cannot seem to get to work in a coldfusion cfc. Any ideas.
Select distinct include.value from xxxxx.authorprofile,
table(authorprofile.uidinclude) include where profilename='#selectedProfile#'No Oracle version
No Cold Fusion version
No explanation of what either CFM or CFC means
My recommendation would be that you ask the people that sold you the tool. It is, after all, their product that is the issue. -
I sell things on ebay. I need to print out multi invoices from ebay. When I do this from Firefox the first page has my address but no customer info. It then prints out the second page OK.
So I have to then return to printing out invoices and check (tick) the ones it's missed. Checked printer page sizes etc, prints fine from other apps and pages.
I asked on ebay and someone said it's a FIREFOX problem, try it on IE8, -I did and it works ok. Please fix so I don't have to use IE8!You have an invalid path reference. in one version of the object tag it reads ../../navbar.swf, in the other this is truncated to ../navbar.swf. Hence the browser can simply not find the file (IE and FF each look at differnt parts of the code).
Mylenium -
Query working in sql but not if forrms!!!!
I transferred my column apprnum from tblrefstaff to paymast using
SQL>update paymast set paymast.apprnum=(select tblrefstaff.apprnum from tblrefstaff where tblrefstaff.empno=paymast.empno and rownum=1);
5072 rows updated
Now i query for the records in paymast
SQL> select empno from paymast where apprnum='338';
EMPNO
2217
SQL> select apprnum from paymast where empno='2217';
APPRNUM
338
Now in forms when i write this under POST-QUERY
begin
select apprnum
into :paymast.apprnum
from paymast
where empno = :paymast.empno;
exception when no_data_found then null;
end;
no data is retrieved in to the item apprum
its only retrieved when the name of table is that of the previous one like this
begin
select apprnum
into :paymast.apprnum
from tblrefstaff
where empno = :paymast.empno;
exception when no_data_found then null;
end;
2nd CASE: after transferring apprnum to paymast all the items are now under paymast so i just removed the code under POST-QERY and the set the datbase item to yes and column name to APPRNUM but still no use
It only fetches records in apprnum using
select apprnum
into :paymast.apprnum
from tblrefstaff
where empno = :paymast.empno;
exception when no_data_found then null;
end;
how should solve this.?
Edited by: Suhail Faraaz on Nov 10, 2009 2:10 AMi think you forgot to commit; after executing update stmt..
It will work in SQL becoz, you wrote the Query immediately after the select stmt.
But Forms is in another session, it cannot access the data until you commit the SQL session.
Regards
Dora
Edited by: Dora on Nov 10, 2009 2:26 PM -
Multi-Slide Synchronized Video Working in SWF - but not HTML5
We have a module that has 8 slides that contain Multi-Slide Synchronized Videos, each of which are contained on 1 slide (as seen in the screen shot.)
When we publish the project, the swf version works fine. However, the first html5 video shows up, then none of the others do.
We first tried inserting the video as an "Event Video" but when we tried that, in html5 there were no controllers at all for the in-slide video. This breaks our spec because the client needs cross browser and mobile device combatability.
Any clues as to why the video isn't even appearing after the first slide in html5?No controllers showing here either. Controllers show and work in preview mode, but when publishing to Html5 then playing on Ipad, video in slide plays once, but now controls visible...can't pause. stop or rewind...
Dave -
Query working in sql but not in forms
hi this is my query
insert into sa_prod_temp
select sa_idno,sa_srno_desc,count(*) qty from sa_master,
select sa_code,sa_idno,sa_prod_date,sa_srno,sa_srno1 from
select sa_code,sa_idno,sa_prod_date,sa_srno,sa_srno1 from bom_sa_prod
order by sa_prod_date desc
where rownum <=50
) b
where sa_type = :dummy.sa_code and sa_type = sa_code
and sa_master.sa_srno = b.sa_idno
group by sa_idno,sa_srno_desc ;insert into sa_prod_temp
select sa_idno,sa_srno_desc,count(*) qty from sa_master,
select sa_code,sa_idno,sa_prod_date,sa_srno,sa_srno1 from
select sa_code,sa_idno,sa_prod_date,sa_srno,sa_srno1 from bom_sa_prod
order by sa_prod_date desc
where rownum <=50
) b
where sa_type = :dummy.sa_code and sa_type = sa_code
and sa_master.sa_srno = b.sa_idno
group by sa_idno,sa_srno_desc ;
VALUE CLASS IS MISSING
----------------- -
Query working in access but not in program
Hello all,
This is a problem I've faced many a times, specially with a table with large no of fields.
I write a query in my programm, and it throws invalid argument exception.I copy the query string from the command prompt and paste it in access query and run it in access, it runs just fine.
any insights , as to why this is happening.It did happen to me before but couldnt get around to solving it that time, but this time i hope to reach to some generic solution to the problem.
any hints, suggestion , ideas would be appreciated.Well I've been staring 30 minutes into crystal ball now, but still your code doesn't show up.
Honestly: without your code, there is no way in telling what is going wrong. Where/when is the InvalidArgumentException thrown? Which method call throws that exception. Which argument is it, that you provide? Did you check the stack trace to find out where it happens? ... -
Query works in sqldeveloper but not apex
In my APEX application, have a textfield on a page in which user enters a code in the format 111-000-461. The textfield item is called p1_searchmergecode
My query in a report region is this
select * from t3_mail_piece
where :P1_searchmergecode BETWEEN start_merge_code and end_merge_code
I have tried using syntax for all the different session states, but no matter what I do, the query returns 'no data' in the apex application.
If I run this query in sqldeveloper it returns a correct result
select * from t3_mail_piece
where '111-000-461' BETWEEN start_merge_code and end_merge_code;
RESULT
302 Travel_Check American_TAD_Typed_Template 22-APR-13 30-APR-13 555-2424 Scottsdale 1 1350 111-000-461 111-000-465 17 1 One Thousand Three Hundred Fifty and 00/100ti3r wrote:
In my APEX application, have a textfield on a page in which user enters a code in the format 111-000-461. The textfield item is called p1_searchmergecode
My query in a report region is this
select * from t3_mail_piece
where :P1_searchmergecode BETWEEN start_merge_code and end_merge_codeWhat are the data types of start_merge_code and end_merge_code columns??
It seems you are comparing varchar columns...
See the usage of between condition
Maybe you are looking for
-
How can I get Netflix Movies to run on my MacBook Pro via wi fi?
When I log onto Netfix with my MacBook Pro and select a movie to watch on line, I find that I lack an application that will work only in a 32-bit environment. It won't load. Is there any other application I can use to substitute for that?
-
Open a PDF via a button/script in a projector
I am going to burn a projector to a CD with a folder containing some pdf files. I would like to ask how to open a pdf file(if it's even possible) from a button in director. I don't need it to open inside the projector, just click on the button then i
-
Invalid column name 'PROC_TYPE'.
Hi all, After upgrading SAP ME to 6.1.4, IDOC are not coming in SAP ME Queue monitor and we see the following message in logs. [ERROR] [Enqueuer_0] Action: Runtime threw an exception. Exception: [com.microsoft.sqlserver.jdbc.SQLServerException: Inval
-
Transient Entity Attribute as an Assoc
Can I use a transient Entity attribute as an Assoc? I created an Attribute at the Entity level that is not mapped to a table. The entity is called FirstEndEntity. Then I created an Association between FirstEndEntity and OtherEndEntity. I used the att
-
Problems Involving text and FCP
I'm working on of the motion templates and the text that I am adding in motion, when I open the same project file in FCP the same text gets moved and is no longer in the same position. http://img685.imageshack.us/img685/4611/screenshot20100225at914.p