User query error
Dear all,
I have a user query like below
Select T001.ItemCode, T001.Warehouse
from (SELECT T00.[ItemCode] 'Itemcode', T00.[Warehouse] 'Warehouse', T00.[Price] 'ItemCost'
FROM OINM T00
Inner Join (SELECT MIN(T0.[TransNum]) 'MinTransNum', T0.[ItemCode] 'ItemCode', T0.[Warehouse] 'WareHouse'
FROM OINM T0
WHERE T0.[DocDate] > [%0]
GROUP BY T0.[ItemCode], T0.[Warehouse]) T01
on T00.[ItemCode]=T01.[Itemcode] and T00.[Warehouse] = T01.[Warehouse]) T001
I got an error Must specify table to select from
If I remove
WHERE T0.[DocDate] > [%0]
it works fine
Select T001.ItemCode, T001.Warehouse
from (SELECT T00.[ItemCode] 'Itemcode', T00.[Warehouse] 'Warehouse', T00.[Price] 'ItemCost'
FROM OINM T00
Inner Join (SELECT MIN(T0.[TransNum]) 'MinTransNum', T0.[ItemCode] 'ItemCode', T0.[Warehouse] 'WareHouse'
FROM OINM T0
GROUP BY T0.[ItemCode], T0.[Warehouse]) T01
on T00.[ItemCode]=T01.[Itemcode] and T00.[Warehouse] = T01.[Warehouse]) T001
If I just run below, it works fine
SELECT T00.[ItemCode] 'Itemcode', T00.[Warehouse] 'Warehouse', T00.[Price] 'ItemCost'
FROM OINM T00
Inner Join (SELECT MIN(T0.[TransNum]) 'MinTransNum', T0.[ItemCode] 'ItemCode', T0.[Warehouse] 'WareHouse'
FROM OINM T0
WHERE T0.[DocDate] > [%0]
GROUP BY T0.[ItemCode], T0.[Warehouse]) T01
on T00.[ItemCode]=T01.[Itemcode] and T00.[Warehouse] = T01.[Warehouse]
Is this a SAP limitation? I really need to have a
WHERE T0.[DocDate] > [%0]
in this query.
Any idea? Thanks in advance.
Regards,
Yuka
HI,
Try this:
/*SELECT FROM [dbo].[OINM] T9*/
declare @DocDate as datetime
/* WHERE */
set @DocDate = /* T9.DueDate */ '[%0]'
Select T001.ItemCode, T001.Warehouse
from (SELECT T00.[ItemCode] 'Itemcode', T00.[Warehouse] 'Warehouse', T00.[Price] 'ItemCost'
FROM OINM T00
Inner Join (SELECT MIN(T0.[TransNum]) 'MinTransNum', T0.[ItemCode] 'ItemCode', T0.[Warehouse] 'WareHouse'
FROM OINM T0
WHERE T0.[DocDate] > @DocDate
GROUP BY T0.[ItemCode], T0.[Warehouse]) T01
on T00.[ItemCode]=T01.[Itemcode] and T00.[Warehouse] = T01.[Warehouse]) T001
Thanks,
neetu
Similar Messages
-
Hello, I have the following User Query:
SELECT T.USERID As EmpID, OHEM.FIRSTNAME' 'OHEM.LASTNAME, OHEM.U_RATE AS GeneralRate, T.CARDCODE As CardCode, T.CARDNAME As CardName, SUM(ISNULL(T.APPROVED_HOURS,0)*ISNULL(T.RATE,0)) As BilledAmount, T.GENCHECK AS CheckNumber, OVPM.[CheckSum], OVPM.DOCDATE
FROM SCCG_WB_TIME AS T LEFT JOIN OHEM ON OHEM.EMPID=T.USERID LEFT JOIN OVPM ON T.GENCHECK = OVPM.DOCNUM
WHERE ISNULL(T.GENCHECK, 0)<>0 AND <b>T.USERID =[%0]</b>
GROUP BY T.USERID, OHEM.FIRSTNAME' 'OHEM.LASTNAME, OHEM.U_RATE, T.CARDCODE, T.CARDNAME, T.GENCHECK, OVPM.[CheckSum], OVPM.DOCDATE
I get an error because of the variable I have. When I press Execute I just get '' (SEWSY) error message in red. Without the variable is working fine. Please help me!
Thank you,
IrinaHi Irinca,
I think (can't test it) the problem is the not-system-nor-usertable-but-yours table created in SBO that you're passing the variable (SCCG_WB_TIME, just in case).
Try something like,
DECLARE @UserId int
SET @UserId = (SELECT TOP 1 T0.INTERNAL_K FROM [dbo].[OUSR] T0 WHERE T0.U_NAME = '[%0]')
...(your query....)... T.USERID = @UserId...
HTH,
Ian -
Is it possible to use parameter in a user query with subquery ?
Hi ,
i need to use parameter ( [%0] ) in user query using a subquery , but i have errors message when i execute the query
example :
SELECT T0.[DocNum] as docnum, T0.[DocTotal] as cde , 0 as fact FROM ORDR T0 WHERE T0.[CardCode] =N'[%0]'
union all
SELECT T0.[DocNum], 0 as cde,T0.[DocTotal] as fact FROM OINV T0 WHERE T0.[CardCode] =N'[%0]'
works fine
but ( exactly the same query in the subquery )
Select t2.Docnum ,t2.cde , t2.fact from
SELECT T0.[DocNum] as docnum, T0.[DocTotal] as cde , 0 as fact FROM ORDR T0 WHERE T0.[CardCode] =N'[%0]'
union all
SELECT T0.[DocNum], 0 as cde,T0.[DocTotal] as fact FROM OINV T0 WHERE T0.[CardCode] =N'[%0]'
) t2
return an error message
the same query without parameter works fine too :
Select Docnum ,cde , fact from
SELECT T0.[DocNum] as docnum, T0.[DocTotal] as cde , 0 as fact FROM ORDR T0 WHERE T0.[CardCode] ='C1'
union all
SELECT T0.[DocNum], 0 as cde,T0.[DocTotal] as fact FROM OINV T0 WHERE T0.[CardCode] ='C1'
) t2
Is it possible to use parameter in a subquery ?
thanksTry this one:
declare @cc nvarchar(20)
set @cc=/*Select c.cardcode from OCRD c where c.cardcode=*/'[%0]'
Select Docnum ,cde , fact from
SELECT T0.[DocNum] as docnum, T0.[DocTotal] as cde , 0 as fact FROM ORDR T0 WHERE T0.[CardCode] =@cc
union all
SELECT T0.[DocNum], 0 as cde,T0.[DocTotal] as fact FROM OINV T0 WHERE T0.[CardCode] =@cc
) t2 -
Getting "CONNECT BY loop in user data" error
Hi all,
I used to run the following query but I got this error "CONNECT BY loop in user data"
select * from
bom_details
where common_bill_sequence_id=bill_sequence_id
connect by prior assembly_item_id=component_item_id
Bom_details is one view which contains
SELECT distinct bi1.assembly_item_id, bic.bill_sequence_id, bi1.organization_id,
bi1.common_bill_sequence_id, bic.component_item_id,
bic.component_quantity, bic.item_num
FROM bom_bill_of_materials bi1, bom_inventory_components bic
where bi1.bill_sequence_id = bic.bill_sequence_id
Please advice how to use the query.
Thanks,
KamalHi,
You could try using the NOCYCLE directive to avoid user data errors e.g.
select * from
bom_details
where common_bill_sequence_id=bill_sequence_id
connect by NOCYCLE prior assembly_item_id=component_item_id
Rod West -
Link user query to required print layout
Hi all,
I tried linking my user query to a required print layout for user reports.
I have followed the same procedure as given in (Query PLD.pdf ) but when I try to save ,
I get the following error
Items were found with the same exclusive no [Message 101-19 ]
Can anybody help me with this
Thanks
Nirmala B.finally got it
-
This is the error I get -
Query Of Queries syntax error. Encountered ". Query Of
Queries runtime error.
The Cold Fusion server is running MX 7,0,1,116466.
The sql is "Select * from Invlotquery2 where lotnum =
'2011-61-12' ". (The extra space after the single quote is for
clarity.)
I have already built the query and the user is trying to
filter on a lot number. Whenever the lot number starts as numeric
and is 10 digits long(2011-61-12) the above error happens. A
lotnumber thats starts as a character or a lot number that starts
numeric and has less than 10 characters or more than 10 characters
works ok. I still have code in place to create a dummy record for
the query that sets the query fields up as characters. I found out
that previous versions of Cold Fusion could create query fields as
numeric if not specified.
This really seems to be a user specific error but I thought I
would post here to see if anyone has had a similiar problem or
knows of a solution.
Thanks,
Dale>> Does a cfqueryparam work with a query of query?
> Yes. I'm not so cruel as to suggest something that
doesn't work ;-)
Hmmm.
Seems there's *degrees* of working. They certainly work when
telling CF
that a value *is* a date, but seemingly not so much when
telling CF that a
string *isn't* a date, even when it clearly isn't.
See this sample code:
<cfset q1 =
queryNew("iCol,dCol","integer,VarChar")><!--- no dates here
--->
<cfset queryAddRow(q1)><cfset querySetCell(q1,
"iCol", 1)><cfset
querySetCell(q1, "dCol", "2011-61-12")><!--- not a date
--->
<cfset queryAddRow(q1)><cfset querySetCell(q1,
"iCol", 2)><cfset
querySetCell(q1, "dCol", "2006-06-29")>
<cfset queryAddRow(q1)><cfset querySetCell(q1,
"iCol", 3)><cfset
querySetCell(q1, "dCol", "2006-07-29")>
<cfset queryAddRow(q1)><cfset querySetCell(q1,
"iCol", 4)><cfset
querySetCell(q1, "dCol", "2006-08-29")>
<cfset queryAddRow(q1)><cfset querySetCell(q1,
"iCol", 5)><cfset
querySetCell(q1, "dCol", "2011-1-12")>
<cfquery name="q2" dbtype="query">
select iCol, dCol
from q1
where dCol = <cfqueryparam cfsqltype="cf_sql_varchar"
value="#javacast('string', '2011-61-12')#"><!--- change
'61' to '1' and it
works --->
</cfquery>
<cfdump var="#q2#">
Now... column dCol is CLEARLY not date data:
1) I'm specifying it as VARCHAR in the query definition.
2) The first value in it is definitely not a date.
3) Nowhere am I treating it like a date.
Although CF apparently knows better, and goes 'ooh... despite
him saying
it's not a date, the data not being date data, and when he
uses the data,
he specifically says "it's not a date" (and man... he's even
saying that
TWICE!)... I reckon cos SOME of the date looks kinda like a
date... I know
what I'll do!!" [and proceeds to collapse in a heap, because
it decides I'm
using dates].
So. Looks like I'm gonna have to suck it up, and suggest you
should listen
to Dan and not me!
Adam
(PS: I shall raise a bug with Adobe regarding this
behaviour). -
Cannot set user query to view "{0}" because it is a destination in a view link
Hi
11.1.1.7 - I have 2 programatically view objects. I have created a viewLink between them and I am getting the error:
Cannot set user query to view "MyView2" because it is a destination in a view link.
Does anyone know what are the methods I need to implement? I have follow the Frank Nimphius Post: Oracle ADF: Service, Please! and it is working fine. However, after seeing this example: Decompiling ADF Binaries: Building programmatically managed business components - Part 2 - I realised that I am missing some other stuff to make the view link work. There are too many methods and its quite difficult to understand and digest all classes and methods etc.
Anyone can please point me in the right direction?
RegardsWhich version are you using? Could you maybe turn on logging (http://blog.goverco.com/p/psmalogging.html) and post content of log file if you still have the issue...
Also, remember that even though you set credentials in the PARAM section, these values are overwritten by the ones specified on the properties of the MA - so make sure that you specify correct creds on the MA. Specifying creds directly in the script makes
for an easy way of testing from the PowerShell prompt, but not for running the script from the MA / Run Profiles
Regards, Soren Granfeldt
blog is at http://blog.goverco.com | facebook https://www.facebook.com/TheIdentityManagementExplorer | twitter at https://twitter.com/#!/MrGranfeldt -
Drag and relate from User query not working as expected
Hi All,
Could anyone shed some light on why using drag and relate from a user query is not working for me?
Drag and relate works well from all system generated queries, but not from my user queries.
For example:
- System query/report - running a system stock report and dragging the 'Item number' field result to a D&R Sales Order generates a report of all Sales Orders for the selected Item Number. As expected - success.
- User Query - running a item lookup report from a user generated query and then D&R to Sales order for the selected Item Number does not work. Error = 'No matching records found (ODBC -2028) [message 131-183]
Any ideas?
Best regards,
JohnHi John,
I believe Drag and relate only works for system form. The whole function is hard coded. It will not work for any queries including system queries.
Thanks,
Gordon -
Agilent 53230A: +320, 0xbfff0015, 0xbfff0030 user abort errors?
While testing out my code, everytime I set sample count higher than 1 it keeps returning 0xbfff0030 user abort errors, and the measured data doesn't get transferred. Occasionally (haven't been able to duplicate the errors exactly) it also returns "Instrument reports:+320,"Input signal frequency shift caused internal counter overflow" and "hex 0xbfff0015" errors. Is there something wrong with my code? Should I use a while loop to get multiple/continuous data instead of using a higher sample count?
The instrument also shows "error caused by remote command".
I've attached the block diagram image for my code. Thanks again for any help!
Attachments:
draft2.GIF 18 KBHi, thank you for your reply!
I'm trying to compare 2 channels so it's supposed to export out the frequency ratio between the 2 channel inputs.
It's actually the Read Measurement VI that's throwing up the errors:
Possible reason(s):
Instrument reports:
+320,"Input signal frequency shift caused internal counter overflow"
+0,"No error"
Complete call chain:
Agilent 532XX Series.lvlib:Error Query.vi
Agilent 532XX Series.lvlib:Read Measurement (Multiple).vi
draft 4a.vi
and
Error -1073807339 occurred at VISA Read in Agilent 532XX Series.lvlib:Wait for Acquisition Complete.vi->Agilent 532XX Series.lvlib:Read Measurement (Multiple).vi->draft 4a.vi
The most readings it's been able to export out is 2 readings, and still gives an error. Anything more and it just exports out a blank report (other than the header). I took all the VI from the Agilent driver pages, and all values have been left at the defaults. I've tried using the Fetch Measurement VI before the Read Measurement but it just makes the program run indefinitely (only way to stop it was to save the VI). Did I screw up the order of the subVIs in my program? Right now it's [Initialize -> Configure Measurement Freq Ratio -> Configure Freq Gate -> Configure Gate Start -> Configure Gate Stop ->Configure Sample Count -> Read Measurement -> Close -> Error Query]. I pretty much used the examples VIs in the drivers I downloaded as a base so if I screwed up anything please let me know.
Also, right now it looks like the VI is exporting values at one second intervals. Is it possible to make it such that it can read values at intervals other than one second (shorter or longer), preferably user-defined?
Again, thanks a lot for taking the time to help out. -
In oracle rac, If user query a select query and in processing data is fetched but in the duration of fetching the particular node is evicted then how failover to another node internally?
The query is re-issued as a flashback query and the client process can continue to fetch from the cursor. This is described in the Net Services Administrators Guide, the section on Transparent Application Failover.
-
How do you use user defined error messages in Value Help?
Hi,
I'm currently working on a Modifiable Value Help Selector in Web Dynpro Java, and I want to use a user defined error message when I validate the values entered by a user. Currently, it's returning its default error message ("Character <string> does not match...").
Since the project requires a different error message, is there a way to override the default error message and use my defined error message instead?
Thanks!Hi Angelo,
I am not sure why message area is showing both Custom and inbuilt messages but you can try the following:
i guess you must be using reportContextAttribute exception for showing Error messages on the input fields as well.in that case you can disable the message area so messages will appear only on the Context level ie; on input fields.
For other messages apart from validation messages you can enable the message area before reporting the exception.
make sure the boolean context variable which will be used for enabling and disabling the message area should have Readonly property set as true.
I am not sure whether this is the only solution for this but you can try and see if it works.
Siddharth -
Error while saving record "User:johndoe": Error -14071
I have added my augmented users from the AD server. When I select user and to apply a setting under Preferences I get this on attempting an "Apply", Error while saving record "User:johndoe":Error -14071. I'm authenticating to my LDAP not AD/All Domains.
I have the server bound correctly to the AD server. Bound to AD, then promoted to OD master.
Tried WGM from another Mac, same error.
I recall my AD admin extending the ad schema last year for OS X 10.4.
Thoughts? Thanks.Thanks David and Mabel, and all for the suggestions. I did go through "Leveraging Active..." prior to posting. I did try your method of canceling the authorization to WGM and viewing Directories. I would select a user from this method and try to apply something from MCX, but still got the -14070 error. Yes, I do have my client bound 1st OD, 2nd AD, with OD first on the search policy for the client.
I though I had solved my issue by authenticating to WGM and LDAP. Then selecting Groups and the Members tab, I define an OD group and select that group. I can then click the "+" towards the right of the window. Then select my AD there which populates. I can add my AD groups or single users to my OD group. Then I'm able to apply MCX settings. But, no "blue" circle next to the group's silhouette. How is my method possibly incorrect?
Also, at some point I unbound my client from AD and it seems the client is ok with getting AD info off my OD server. Example, my AD sharepoint mounts for PHD.
But, I do have a pause of 20 secs. are more when logging into the client as well as accessing applications. Side effect of my method? -
"Invalid User ID" error while running OSoft Application in browser
Hi,
I have installed BPC 7.5 SP04 in Multi Server environment where SQL Server, OLAP Server, Reporting Server on one machine and Application Server and Web Server on other machine, After installing I tried to run Osoft application via url "http://Application Server name/OSoft" as suggested in Install guide but receiving "Invalid User ID" error
Error Information
Server Error in '/OSoft' Application.
Invalid UserID
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Exception: Invalid UserID
Please guide me on this as what can be the cause of this error and how to fix it.
I have used Windows Server 2008 with IIS 7.
Thanks,
Rohit
Edited by: Khatak Rohit on Mar 18, 2011 10:57 AMFirst login must be done with Installation user.
In your case you tried to login from your PC where you were conected with your user.
This user is used to connect to BPC and this user has no rights into BPC.
It was used this user because BPC allow Windows authentication.
So you have to go into IE - Tools - Internet Options
Select Security Tab - Select Intranet
Push Custom Level
Go to section - User Authentication - select "Prompt always user and pwd"
Close IE
Open again and try http://nameofserver/osoft you will receive now a prompt for user and pwd.
Input an user and pwd with access to BPC and you will see this time the page will be load correct.
Regards
Sorin Radulescu -
Hi all
when i run yaourt to install any things :
package-query: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory
why?
what can i do?
I'm very newbie so help me with easy commands!
thankstry to reinstall yahourt :
https://wiki.archlinux.org/index.php/Yaourt -
Attribute for user contains errors. Inform system admin
Hello,
We've got an issue with shopping carts created by a user that was deleted from system. When trying to see in Monitoring Shopping Carts header or item details of a given sc. A web error occurs:
The URL http://srp.srm.gruposalinas.com.mx:8000/sap/bc/gui/sap/its/bbpsc11/! was not called due to an error.
Note
The following error text was processed in the system SRP : Attribute for user contains errors. Inform system admin.
The error occurred on the application server srm-pro_SRP_00 and in the work process 2 .
The termination type was: TH_RES_FREE
The ABAP call stack was:
Form: OUTPUT_EXPRESS_MESSAGES of program SAPLBBP_SC_UI_ITS
Form: EXTERNAL_SCREEN_DETERMINE of program SAPLBBP_SC_UI_ITS
Module: EXTERNAL_SCREEN_DETERMINE of program SAPLBBP_SC_UI_ITS
We've cheked SAP NOTE 312058-BBPPU99: Error: Attribute for ... is missing. Inform ...
But it seems that none of the information applies to us, since this issue is only present for Shopping carts that were created by this deleted user.
So we tried to re-assing one of this sc, chaning PARTNER_NO,ADDR_NR
ADDR NP data in table CRMD_PARTNER according to a new given user, but it didn't work. So we need to know how to re-assing this sc or perhaps how to find what specific attribute is missing.
Any advice is welcome.
Thanks in advance.Hi
<b>Which SRM version are you using ? This is an SRM error message.</b>
The manager role should be enough to change user attribute. The transaction is BBPATTRMAINT. Employee role should have BBPUM02 or BBPAT05 to change their own attribute.
<u>Please check whether the User ID you are using to Log into BBP_PD (and seems to be assigned in the org structure also)is consistent and has no errors in tcode USERS_GEN. You should check the user, it's not set up properly in USERS_GEN Transaction, Else repair the user.
To maintain the user attributes you must have the Administrator role.. Your user should have role SAP_BBP-STAL_ADMINISTRATOR and be integrated in the org structure. your user must be integrated in SRM organizational structure. To see which attributes are missing, you can click on the user in PPOMA_BBP to see details, and go to last tab "Check". This will list all required attributes depending on used scenarios (so you may not require all of them). You can also use transaction BBP_ATTR_CHECK to check user's attributes for a particular scenario.</u>
<b>Please go through the following links as well -></b>
bbp_mon_sc attributes
Re: FM for attribute's value assignation in PPOMA ?
Note 751022 - Monitor Shopping Cart: Item deletion causes termination
Re: User Settings are not saved
Re: Not able to generate user users_gen
Re: SRM organization plan...
Re: User creation error
<u>Hope this will definitely help. Do let me know.</u>
Regards
- Atul
Maybe you are looking for
-
How to find text in a button on the page
When viewing a page containing a form, and the form has a button with a label, how do I search for the label to find the button?
-
Hi all, newer user.. I have always wanted to ask this. Which one? Why more than one supported? Is 1.3.1_8 compatible with 1.3.1_02?
-
(un)editable regions extension
Hello ! I'm currently trying to do an extension which would parse a (JSF) DreamWeaver file, find a certain kind of tag and then make all content nested into them uneditable. Could anyone give me an hint ? Ideally, I would not use templates, but I'm a
-
How to get patch CR095687 required for WebLogic Adapters
The release notes of WebLogic Adapters specify to ensure that patch CR095687 need to be installed
-
What can I do to use or substitute for java on an android
Is there a way to open web pages that run on java?