The following sql stmt is giving syntax error
Dear abap experts,
The following sql stmt is givin me the followin error.
Incorrect expression " A~CURRENCY" in WHERE condition.
the sql stmt is
SELECT AFLDATE APRICE ACURRENCY BCOUNTRYFR BCITYFROM BAIRPFROM BCOUNTRYTO BCITYTO B~AIRPTO
FROM SFLIGHT AS A INNER JOIN
SPFLI AS B
INTO CORRESPONDING FIELDS OF ITAB_ALV
ON ACARRID = BCARRID
WHERE CARRID EQ CARRID
AND CONNID EQ CONNID.
kindly tell me the error.
Edited by: Ansuman Parhi on Jul 7, 2008 11:30 AM
Hi,
SELECT AFLDATE APRICE ACURRENCY BCOUNTRYFR BCITYFROM BAIRPFROM BCOUNTRYTO BCITYTO B~AIRPTO
FROM SFLIGHT AS A INNER JOIN
SPFLI AS B
INTO CORRESPONDING FIELDS OF ITAB_ALV
ON ACARRID = BCARRID
WHERE CARRID EQ CARRID
AND CONNID EQ CONNID.
above ur code.
in the where condition exactly mention carrid and connid for belongs to which table. mean check it elow code.
WHERE ACARRID = CARRID(PARAMETER NAME) AND ACONNID = CONNID(PARAMETER NAME).
REGARDS.
sriarm.
Similar Messages
-
Use Of "#EC CI_EXECSQL in ABAP with EXEC SQL. Statement giving Syntax Error
Dear Gurus,
I have encountered an issue while trying to remove warning for using Native SQL statement using pseudo comment "#EC CI_EXECSQL
The thing is like this -- i have used follwing native sql command in abap.
EXEC SQL.
CONNECT TO 'SURROUND_DB'
ENDEXEC.
Now when i am checking this code in code inspector it is showing a warning with information below
CA CL_CI_TEST_CRITICAL_STATEMENTS0006
Code Inspector
Critical Statements
Use of Native SQL
Authorization checks cannot be appropriately run using EXEC SQL and should be carried out at program level.
The message can be hidden using the pseudo-comment "#EC CI_EXECSQL
Use of exceptin handling section for that warning showing me to use :
The message can be hidden using pseudo
comment "#EC CI_EXECSQL
Now when I am using "#EC CI_EXECSQL in the abap like below :
EXEC SQL. "#EC CI_EXECSQL
CONNECT TO 'SURROUND_DB'
ENDEXEC.
It is giving syntax error
The text literal ""#EC CI_EXECSQL " is longer than 255
characters.Check whether it ends correctly.
Please provide the guideline to resolve this issue.
Thanks & regards
Saifur Rahaman.Hi Saifur,
You can remove the warning using the following syntax:
EXEC "#EC CI_EXECSQL
SQL.
CONNECT TO 'SURROUND_DB'
ENDEXEC.
At least, it worked fine for me when using OPEN CURSOR, SELECT, FETCH and so on statements.
The way to use the pseudo comment is not very intuitive, but at least for my examples worked fine.
I hope this may help you.
Best regards,
Edgardo G. König -
If the following code results in a syntax error
DATA: itab TYPE SORTED TABLE OF rec_type WITH UNIQUE KEY field1
WITH HEADER LINE.
itab-field1 = 'Company'. itab-field2 = '1234'. INSERT TABLE itab.
itab-field1 = 'Bank'. itab-field2 = 'ABC'. INSERT TABLE itab.
SORT itab.
LOOP AT itab.
write: /1 itab-field1, itab-field2.
ENDLOOP.
SELECT fld1 fld2 FROM tab1 WHERE fld3 = pfld3.
WRITE: /1 tab1-fld1, tab1-fld2.
ENDSELECT.
Message was edited by: kiran machavarapuHi,
In your prgram field1 is not there in rec_type.
DATA: itab TYPE SORTED TABLE OF rec_type WITH UNIQUE KEY <b>field1</b>
WITH HEADER LINE.
itab-field1 = 'Company'. itab-field2 = '1234'. INSERT TABLE itab.
itab-field1 = 'Bank'. itab-field2 = 'ABC'. INSERT TABLE itab.
SORT itab.
LOOP AT itab.
write: /1 itab-field1, itab-field2.
ENDLOOP.
Thank you,
Ramu N -
Environment: SQL Server 2008 R2
Code:
CREATE TABLE dbo.PkgAudit
PkgAuditID INT IDENTITY(1, 1),
PackageName VARCHAR(100),
LoadTime DATETIME ,
NumberofRecords VARCHAR(50),
Status1 VARCHAR(50),
Status2 VARCHAR(50),
The following code is inserted in the SQL Task Execute Editor
INSERT INTO dbo.PkgAudit(PackageName
,LoadTime
,NumberofRecords
,Status1
,Status2
) VALUES(?,?,?,?,?)
Screen Shot (Parameter Mapping):
Problem: an error Message occurred when I hit Parse Query Button in the Execute SQL Task Editor, "Execute SQL: Task Editor: The query failed to parse. Syntax error, permission violation, or other nonspecific error". How I could Solve this
problemDifferent connection providers require different Parameter syntax. E.g. ADO @ParameterName notatoin, not just an offset of 0,1 etc.
Arthur My Blog -
(NOLOCK) is giving syntax error
Hi,
I have query which runs properly in 1 server and in the other server it gives syntax error because of (NOLOCK).
When i remove (NOLOCK) its working fine.
my query is a big one...
But it is something like
INSERT INTO @abc
SELECT a.id,SUM(b.count) FROM
(SELECT DISTINCT id FROM table1 (NOLOCK)) AS a
INNER JOIN Table2 (NOLOCK) AS b
GROUP BY a.id
It is giving syntax error at only one (NOLOCK) that is near Table2 in one server and in other server it works fine...
Both the server versions are exactly same...
What is the reason?First, it is generally a bad idea to post a follow-up "me, too" response to an old and answered question. Fewer people will look at an answered question generally.
Next, the reason this thread provides no information about the original problem and the solution is because the complete problem was not posted. If your query generates an error message, it is important to see the complete and actual error message.
Given the conversation, it is likely that there was a syntax error in the various statements that OP tried and it was a happy accident that the removal of the hint caused the error to go away.
Lastly one should refrain from using hints generally. For some unfathomable reason there is a myth that it is a good practice to use the nolock hint. -
TF255186: The following SQL Server Reporting Services Instance could not be found
Hi,
I'm trying to install TFS 2013 on a remote SQL RS instance.
Using the TFS 2103 U4 installation
SQL 2012 RS, name instance, Server: SQLProdA, Instance Name COMRS
When I enabled tracing using debugView I see the following output:
[4160] [Error @11:07:10.978] Exception Message: TF255186: The following SQL Server Reporting Services Instance could not be found: COMRS. The server name is: SQLProdA. (type TfsAdminException)
Any ideas what the issue is?
Thanks,
reuvyHi Charles,
Thanks for the help. I already saw those links, and am already trying with the format. As I wrote above:
Server: SQLProdA, Instance Name COMRS
So I wrote in the box "SQLProdA\COMRS" (without quotes of course) and I still keep getting that error.
I don't know if it matters, but although this is indeed a named instance, nonetheless, the path to the report server uses the default url (ie.
http://servername/reports) as opposed to the name instance version (ie.
http://servername_instance/reports) as mentioned by your link and this post:
https://msdn.microsoft.com/en-us/library/bb552341.aspx
But, I checked with Fiddler on the server and didn't see it trying to even access the link so I don't think it is related. I saw with Process Monitor that it is indeed trying to access via the network resources on SQLProdA, so I know it's trying.
I have noticed something in the past, and wondered if this could be the issue, that for example if I have Management Studio 2014 installed, I cannot connect to a Reporting Services instance which is 2012. Only when Management Studio 2012 is installed
and being used can I connect. I wondered if this possibly could be related, that maybe the API or something else which the installer is using is missing some component to connect to the RS instance.
Just in case, I already installed both the SQL 2012 and 2014 Client Tools Connectivity (although I first installed 2014, and then 2012).
Do you think this could be the issue? If not, do you possibly have any other leads?
Thanks,
Reuvy -
I have tried to restore my i phone via itunes after doing the update and it keeps giving unknown error occurred (3194) please help
Hello Sam-marchesi,
Thanks for using Apple Support Communities.
For more information on this, take a look at:
iTunes: Specific update-and-restore error messages and advanced troubleshooting
http://support.apple.com/kb/TS3694#error3194
Unable to contact the iOS software update server gs.apple.com
Error 1004, 1013, 1638, 3014, 3194: These errors may be the result of the connection to gs.apple.com being redirected or blocked. Follow these steps to resolve these errors:
Install the latest version of iTunes.
Check security software and ensure that communication to gs.apple.com is allowed. Follow these stepsfor assistance with security software.
Check the hosts file. The restore will fail if there is an active entry to redirect gs.apple.com. Follow theadvanced iTunes Store troubleshooting steps to edit the hosts file or revert to a default hosts file. See "Blocked by configuration: (Mac OS X/Windows) > Rebuild network information."
Try to restore from another known-good computer and network.
If the errors persist on another computer, the device may need service.
Best of luck,
Mario -
I was using Aperture (3.4.1), when he appeared a notice that asked me to stop the Mac with the power button. When I restart Aperture no longer opens and the following message appears: There was an error opening the database for the library "/ Users / Andrea / Pictures / Aperture 3 Library.aplibrary."
How can I solve this problem?
ThanksAfter a system crash your Aperture Library may be corrupted, because Aperture may not have been able to finish the ongoing database transactions.
Have you tried the Aperture Library First Aid Tools?
Aperture 3 User Manual: Repairing and Rebuilding Your Aperture Library
Try "Repair Database", and if this does not help: "Rebuild Database"
Regards
Léonie -
How to tune the following sql statements which has two unions in oracle 10g
It takes a long time to run the following sql statement in 10g. Each select brings back about 4 million rows and there will be about 12 million rows. When I run each select statements seprately in sqlplus I can see the data immedaitely but when I run it as whole with two unions in the select it just takes very very long time? I want to know how to make this run faster? Can we add hints? or is it because of any table space? Any help is appreciated.
select
D.EMPLID
,D.COMPANY
,'CY'
,D.CALENDAR_YEAR
,D.QTRCD
,D.ERNCD
,D.MONTHCD
,D.MONTHCD
,D.GRS_MTD
,D.GRS_QTD
,D.GRS_YTD
,D.HRS_MTD
,D.HRS_QTD
,D.HRS_YTD
from PS_EARNINGS_BAL D
where D.SPCL_BALANCE = 'N'
union
select
D.EMPLID
,D.COMPANY
,'FY'
,(case when D.MONTHCD > '06' then D.CALENDAR_YEAR + 1 else D.CALENDAR_YEAR end)
,ltrim(to_char(to_number(D.QTRCD) + decode(sign(3-to_number(D.QTRCD)),1,2,-2),'9'))
,D.ERNCD
,ltrim(to_char(to_number(D.MONTHCD) + decode(sign(7-to_number(D.MONTHCD)),1,6,-6),'09'))
,D.MONTHCD
,D.GRS_MTD
,D.GRS_QTD
,(select sum(F.GRS_MTD) from PS_EARNINGS_BAL F where
F.EMPLID = D.EMPLID and
F.COMPANY = D.COMPANY and
F.ERNCD = D.ERNCD and
F.SPCL_BALANCE = D.SPCL_BALANCE and
(case when F.MONTHCD < '07' then F.CALENDAR_YEAR -1 else F.CALENDAR_YEAR end)
= (case when D.MONTHCD < '07' then D.CALENDAR_YEAR -1 else D.CALENDAR_YEAR end)
and to_number(F.MONTHCD) + decode(sign(7-to_number(F.MONTHCD)),1,6,-6)
<= to_number(D.MONTHCD) + decode(sign(7-to_number(D.MONTHCD)),1,6,-6))
,D.HRS_MTD
,D.HRS_QTD
,(select sum(F.HRS_MTD) from PS_EARNINGS_BAL F where
F.EMPLID = D.EMPLID and
F.COMPANY = D.COMPANY and
F.ERNCD = D.ERNCD and
F.SPCL_BALANCE = D.SPCL_BALANCE and
(case when F.MONTHCD < '07' then F.CALENDAR_YEAR -1 else F.CALENDAR_YEAR end)
= (case when D.MONTHCD < '07' then D.CALENDAR_YEAR -1 else D.CALENDAR_YEAR end)
and to_number(F.MONTHCD) + decode(sign(7-to_number(F.MONTHCD)),1,6,-6)
<= to_number(D.MONTHCD) + decode(sign(7-to_number(D.MONTHCD)),1,6,-6))
from PS_EARNINGS_BAL D
where D.SPCL_BALANCE = 'N'
union
select
D.EMPLID
,D.COMPANY
,'FF'
,(case when D.MONTHCD > '09' then D.CALENDAR_YEAR + 1 else D.CALENDAR_YEAR end)
,ltrim(to_char(to_number(D.QTRCD)+decode(sign(4-to_number(D.QTRCD)),1,1,-3),'9'))
,D.ERNCD
,ltrim(to_char(to_number(D.MONTHCD)+decode(sign(10-to_number(D.MONTHCD)),1,3,-9),'09'))
,D.MONTHCD
,D.GRS_MTD
,D.GRS_QTD
,(select sum(F.GRS_MTD) from PS_EARNINGS_BAL F where
F.EMPLID = D.EMPLID and
F.COMPANY = D.COMPANY and
F.ERNCD = D.ERNCD and
F.SPCL_BALANCE = D.SPCL_BALANCE and
(case when F.MONTHCD < '10' then F.CALENDAR_YEAR -1 else F.CALENDAR_YEAR end)
= (case when D.MONTHCD < '10' then D.CALENDAR_YEAR -1 else D.CALENDAR_YEAR end)
and to_number(F.MONTHCD)+decode(sign(4-to_number(F.MONTHCD)),1,9,-3)
<= to_number(D.MONTHCD)+decode(sign(4-to_number(D.MONTHCD)),1,9,-3))
,D.HRS_MTD
,D.HRS_QTD
,(select sum(F.HRS_MTD) from PS_EARNINGS_BAL F where
F.EMPLID = D.EMPLID and
F.COMPANY = D.COMPANY and
F.ERNCD = D.ERNCD and
F.SPCL_BALANCE = D.SPCL_BALANCE and
(case when F.MONTHCD < '10' then F.CALENDAR_YEAR -1 else F.CALENDAR_YEAR end)
= (case when D.MONTHCD < '10' then D.CALENDAR_YEAR -1 else D.CALENDAR_YEAR end)
and to_number(F.MONTHCD)+decode(sign(4-to_number(F.MONTHCD)),1,9,-3)
<= to_number(D.MONTHCD)+decode(sign(4-to_number(D.MONTHCD)),1,9,-3))
from PS_EARNINGS_BAL D
where D.SPCL_BALANCE = 'N'
Edited by: user5846372 on Mar 11, 2009 8:55 AMHi,
What i observed is that your table name and where clause is same in all the thress SELECTs whereas columns having some manipulations that is not going to be unique. I guess you can easily replace UNION with UNION ALL.
from PS_EARNINGS_BAL D
where D.SPCL_BALANCE = 'N'Note: I am not aware of your data and business requirement. Please test the result before removing. It is just a suggetion
Cheers,
Avinash -
I tried updating my Photoshop CS6 via the cloud and received the following message...Update failed Errors encountered during installation.(U44M1P7). What does that mean
http://helpx.adobe.com/creative-suite/kb/error-u44m1p7-installing-updates-ccm.html
-
Unable to open the Project web app Instnace , giving STS error
I am unable to open the Project server web app instance from CA- Proejctserver application service -- Manage , it is giving error and I am unable to open the instance as well http://intranet.cmpy.com/pwa also giving error . LOg is showing as below
An operation failed because the following certificate has validation errors: Subject Name: CN=SharePoint Security Token Service, OU=SharePoint, O=Microsoft, C=US Issuer Name: CN=SharePoint Root Authority, OU=SharePoint, O=Microsoft, C=US Thumbprint:
I have tried all the ways to fix STS error , is there any option to reprovision with out loosing the data and projects and subsites
SriniBy Creating the root certificate solved my issue
Srini -
Second call of an SQL query throws a syntax error?
Private Sub RefreshDataSet()
Dim strSQL As String = DataAdapter1.SelectCommand.CommandText
Try
DataSet1.Clear()
DataAdapter1.SelectCommand.CommandText() = Trim(strSQL & " WHERE BadgeID = " & strEmployeeBadge)
DataAdapter1.Fill(DataSet1)
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
When I call the above procedure, the sub does work correctly and I get the expected results / records in the dataset. But, when I call the Sub again (to refresh the dataset) it gives me an "incorrect syntax" error.
I'm not sure why it is doing this. Any suggestions or ideas?Youjun,
It's very frustrating when you keep asking if the code is the same, or if I have tested the code. I've said that I debugged.. I've said I have tested the code. Your continuing to ask me this is pointless, rude, and only serves to make YOU look
stupid. I'm sorry if that is rude, but please stop asking me!
To respond:
I supposed that the original DataAdapter1.SelectCommand.CommandText is "select * from table1"
-Yes, the base command is similar to this, except that I call each database field, not using the *.
1) When you run it the first time, the DataAdapter1.SelectCommand.CommandText will be "select * from table1 WHERE BadgeID ='123'".
-Yes, I append 'WHERE BadgeID = XXX' to the query, the first and
each subsequent time. Again, I said that the code/call/syntax DOES NOT CHANGE. It is the
same every time.
2) Then you changed the strEmployeeBadge, I supposed that is '234'
-NO! I do NOT change the code!! I'm sorry, but what part of 'the query is
exactly the same' is unclear?
3) when you run it next time, the DataAdapter1.SelectCommand.CommandText will change to "select * from table1 WHERE BadgeID ='123'
WHERE BadgeID = '234'"
-NO! I have specifically tested for this
and as stated, the SQL syntax does not change!
So it 'syntax' fail will pop out when second call.
-NO, your assumptions are INCORRECT.
I suggest you recording the commandText when first change the DataAdapter1.
I write a testing program for you.
-Your 'testing program' is for all purposes, the same exact code as what I used. There is no difference.
Now, as also stated before, I have several other instances
where I use the same 'technique' to amend the base SQL queries of the DataAdapter. Each of these other instances work fine, and I use them to 'refresh' my DataSet information several times throughout the running of my program. Just for some
reason, this time, it does not work. I don't know why and was hoping someone else had found the same/similar issue and also found a resolution. The DataAdapter is configured the same as the others, the code is the same as well. I will just
have to find a work around, or other way to do what I want I guess.
Lastly, yes, I set strSQL in the subroutine because I want that variable to be gone at the end of the procedure. It recalls, then sets the syntax, every time the Sub is called on purpose. I do not want strSQL to be 'global', which by the way,
according to Microsoft documentation I have read, is no longer possible. Global variables are 'technically' not used/recognized anymore. If this has changed, then I stand corrected.
Thank you for responding, I will just find another solution I guess. -
Code working fine in Enterprise version giving syntax error in Rel 4.6C
Hello All,
<b>Consider the following piece of code.</b>
FORM fill_itabs TABLES p_t_table
p_t_table_dummy.
Internal table to be used for dynamic where condition
DATA: lt_wherecond TYPE STANDARD TABLE OF ty_wherecond,
Structure for dynamic where condition
ls_wherecond TYPE ty_wherecond.
p_t_table_dummy[] = p_t_table[].
REFRESH lt_wherecond[].
CLEAR ls_wherecond.
ls_wherecond-data = 'kunnr = p_t_table_dummy-kunnr'.
APPEND ls_wherecond TO lt_wherecond.
SELECT kunnr INTO TABLE gt_kunnr
FROM kna1
FOR ALL ENTRIES IN p_t_table_dummy
WHERE (lt_wherecond).
ENDFORM.
This is working fine in Enterprise version, but when I am trying the same in Rel 4.6C, I am getting a syntax error at the Select statement which states,
"The WHERE condition does not refer to the FOR ALL ENTRIES table.-"
Could anyone please suggest how to avoid this error?
Regards
IndrajitHi Chemmam,
yes, that will be a version problem. The general rule says, always use the NWDS corresponding to your server, and the main reason are the differences within the webdynpro implementation.
So if you have a 6.40 with SP13 for example, use NWDS 2.0.13 as the base of your deployment.
Hope it helps
Detlev
PS: Please consider rewarding points for helpful answers on SDN. Thanks in advance! This also holds for: /thread/80658 [original link is broken] -
Failed to process the file in Input agent giving repository error
Hi All,
I have configured input agent on my machine and when I try to process the file, that file goes into STAGE folder and Error folder by giving the repository error.
Please, anyone help me out.
Thanks in advance.Hi Vikrant,
I have checked the log its giving the following error log:
[2013-04-30T07:38:39.633-06:00] [IPM_server1] [NOTIFICATION] [TCM-00129] [oracle.imaging.agents] [tid: [ACTIVE].ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: ecc27246272aba84:6c20b3cf:13e5aa0c54b:-8000-000000000000059c,0] [APP: imaging] Input Agent is checking for work.
[2013-04-30T07:45:41.397-06:00] [IPM_server1] [ERROR] [] [oracle.imaging.ui] [tid: [ACTIVE].ExecuteThread: '12' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: weblogic] [ecid: ecc27246272aba84:6c20b3cf:13e5aa0c54b:-8000-00000000000005c6,0] [APP: imaging] A repository error occurred.[[
oracle.imaging.ImagingException: TCM-00787: A repository error occurred.
faultType: SYSTEM
faultDetails:
ErrorCode = oracle.stellent.ridc.protocol.ServiceException, ErrorMessage = Unable to execute service CHECKIN_NEW_SUB and function makeNewRevClass.
The error was caused by an internally generated issue. The error has been logged.
at oracle.imaging.repository.ucm.UcmErrors.convertRepositoryError(UcmErrors.java:161)
at oracle.imaging.repository.ucm.UcmRepositoryOperationImpl.convertDocumentRepositoryError(UcmRepositoryOperationImpl.java:410)
Also when I am checken in documents in content server , its giving the error : Unable to execute service CHECKIN_NEW_SUB and function makeNewRevClass.
I think these two are because of the same problem.
Please help me out.
Thanks,
Yogita -
FIM Portal giving Syntax Error "WebResource.axd"
Hi Team,
It is fresh installation of FIM 2010 R2. FIM Sync, FIM Service and Portal are installed on the same box.
When opening FIM Portal, it does not load properly. Some boxes are misplaced and on checking the status bar I can see a list of errors.
First error in the list is "Syntax error" "WebResource.axd" Code: 0 URL: http://FIMPOrtal/webresource.axd?.......
It is followed by several "The value of the property 'WebForm_GetElementByTagName' is null or undefined, not a Function object" error for ScriptResource.axd file.
I have sharepoing 2010 installed. There is no NLB installed. I get the same error when accessing portal using "localhost" or IP.
I have tried to repair the FIM Service and Portal installation that did not help. I have also re-installed the service and portal.
It gives the same error after lowering the security on IE, trying from other machine or adding the portal website to local sites.
Kindly help me fix this error. Any help would be greatly appreciated.Hello,
can you provide a screenshot of that misplaced elements.
I currently only know to reasons of misplaced elements in portal.
1. NLB (which you dont use)
2. Redirect in IIS
but maybe a screen would provide more information to us.
Regards
Peter
Peter Stapf - Doeres AG - My blog:
JustIDM.wordpress.com
Maybe you are looking for
-
BT Broadband Contract Start and End Date
Where can I find my contract start and end date online ?
-
Every morning I click on the Firefox icon and it opens. Today it will not. When I try to reinstall it, a message appears that Firefox is already open. But I cannot see it. Of course I can use Chrome or Internet Explorer (as I'm doing), but I like Fir
-
My wife's new iPhone - yes I messed it up--asks for her to sign in to iCloud but it gives my email not hers. How do I reset her iCloud ID?
-
Hi there, In our architecture, we have developed a perl script to authenticate user before allowing a report to be generated. Thus, all hyperlinks in a report X that would produce another report Y must point to the perl script, passing the name of th
-
Time Machine Back Up Discrepancy...
Hi All, I have a June 2010 17" 2.66 i7 UMBP which has a 500GB internal HD. I recently purchased an external HD of the same capacity so I could keep a full back up of all my data. The internal HD shows capacity of 499.76GB with 160.24GB free. After co