Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] SQL Pass through errors

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] SQL Pass through errors
 Login/Join
 
Platinum Member
posted
Not sure if this is possible or not but I have a sql file that I'd like to run out of focus SQL editor:

 DECLARE @D1 DATETIME
			DECLARE @D2 DATETIME
			SET @D1 = DATEADD(d,DATEDIFF(d,0,GETDATE())-1,0)
			SET @D2 = DATEADD(D,1,@D1)
 
 
			select
				logid,
				extension,
				calls
			from (
				select distinct
				Lucent_Log_new,
				staffed.logid,
				staffed.extension,
				calls = sum(staffed.acdcalls)
				FROM approach_db a
			LEFT OUTER JOIN 
				dagent staffed
			on
				RIGHT(LTRIM(RTRIM(a.Lucent_Log_new)),7) = (right(ltrim(rtrim(staffed.logid)),7))
			LEFT OUTER JOIN (SELECT DISTINCT AGENTKEY=SUBSTRING(AGENTKEY,4,7)
				FROM FirstCallRes where SEGMENTTIMESTAMP BETWEEN @D1 AND @D2) T
			ON
			RIGHT(LTRIM(RTRIM(a.Lucent_Log_new)),7) = T.AGENTKEY
			WHERE 
			staffed.row_date = @D1 and
			a.EmpRoleID is not null and
			a.EmpRoleID <> 0 and
			a.IS_MANAGER = 0 and
			a.[Is Lead?] = 'No' and
			a.Lucent_Log_new is not null
			AND T.AGENTKEY IS NULL
			group by 
			Lucent_Log_new,
			staffed.logid,
			T.AGENTKEY,
			staffed.extension
			) tbl
			where
			calls > 0
ORDER BY 3 DESC
 


keep getting this error

  THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: SQLOUT
 BYPASSING TO END OF COMMAND

 


The file does contain date parameters. Not sure if that's the reason or not. Thanks for any help possible.

Joe

This message has been edited. Last edited by: Kerry,


WebFocus 7.7.02 WinXP
 
Posts: 236 | Registered: May 12, 2006Report This Post
Expert
posted Hide Post
Are there any other errors ?

Could you post the code before and after the SQL?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
I am not sure if we can do TSQL using WebFocus SQL Pass Thru. Remove the lines where you are declaring your SQL variables.
Then hardcode a date range instead of using SQL variables. If that works then replace your SQL variables with WebFocus variables.
where SEGMENTTIMESTAMP BETWEEN '01/01/2012' AND '12/31/2012'


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] SQL Pass through errors

Copyright © 1996-2020 Information Builders