Tuesday, March 20, 2012
An unexpected token "." was found following "". Expected tokens may include: "
CREATE PROCEDURE sp_ivSqlAcquireCWMM_With_15K
@.claim_nbr varchar(30)
AS
/* Declare variables */
declare @.insert_sql varchar(1000)
declare @.openquery_sql varchar(1000)
declare @.fields_sql1 varchar(1000)
declare @.from_sql varchar(1000)
declare @.where_sql varchar(1000)
declare @.claim_nbr_2 char(30)
declare @.pri_con_type char(4)
--declare @.Where_Por Char(30)
CREATE TABLE #tCaseContact
(
CLAIM_NBR char(30),
CASE_NBR CHAR(11),
INJ_SSN CHAR(9),
INJ_FNAME CHAR(20),
INJ_MID_INIT CHAR(1),
INJ_LNAME char(30),
INJ_NME_SUF CHAR(3),
TPLOC_NAME CHAR(60),
TPLOC_POLICY_NBR CHAR(20),
DT_OF_INJ DATETIME,
CASE_STS CHAR(4),
TEAM_NBR CHAR(4),
USER_KEY char(16),
TPA_ID CHAR(9),
CON_TYPE char(4),
CON_ID int,
PRIMARY_IND char(1),
EMP_Tier char(1),
Non_UM char(1),
POR char(42) NULL,
Cont_Type char(4),
Thousand_Date datetime)
/* Assert Claim Number from @.claim_nbr parameter */
set @.claim_nbr_2 = cast(@.claim_nbr as char(30))
set @.insert_sql = 'INSERT INTO #tCaseContact '
set @.openquery_sql = ' ' +
' SELECT * FROM OPENQUERY( CWMM,''SELECT'
set @.fields_sql1 = ' ' +
'a.twccs_claim_nbr, ' +
'a.twccs_case_nbr, ' +
'a.twccs_inj_ssn, ' +
'a.twccs_inj_fname, ' +
'a.twccs_inj_mid_init, ' +
'a.twccs_inj_lname, ' +
'a.twccs_inj_nme_suf, ' +
'mcdb.polloc_cw.tploc_name, ' +
'mcdb.polloc_cw.tploc_policy_nbr, ' +
'a.twccs_dt_of_inj, ' +
'a.twccs_case_sts, ' +
'mcdb.polloc_cw.tploc_team_nbr, ' +
'c.tctyp_user_key, ' +
'a.twccs_tpa_id, ' +
'b.twcon_con_type, ' +
'b.twcon_con_id_pers, ' +
'b.twcon_primary_ind, ' +
'e.tpoli_prem_tier, ' +
'e.tpoli_non_um, ' +
'f.NAME, ' +
'b.twcon_con_type, ' +
'a.twccs_1000_lmt_dt'
set @.from_sql = '' +
'FROM ' +
'MCDB.WCCASE_CW AS a ' +
'INNER JOIN MCDB.WCCONTT AS b ON ' +
'(a.TWCCS_CASE_NBR = b.TWCON_CASE_NBR) ' +
'INNER JOIN MCDB.CONTYPT AS c ON ' +
'(b.TWCON_CON_ID_PERS = c.TCTYP_CON_ID) ' +
'INNER JOIN MCDB.POLLOC_CW AS d ON ' +
'(a.TWCCS_POLICY_NBR = d.TPLOC_POLICY_NBR) ' +
'INNER JOIN MCDB.POLICY_CW AS e ON ' +
'(d.TPLOC_POLICY_NBR = e.TPOLI_POLICY_NBR) ' +
'Left Outer JOIN PRODSYS.CWPV001_PROV_MASTER as f ON ' +
'(a.TWCCS_POR_NO = f.PROV_NO)'
SET @.where_sql = '' +
'WHERE ' +
'b.TWCON_CON_TYPE IN (''''MCS'''', ''''MCN'''', ''''RRS'''') ' +
'AND ' +
'c.TCTYP_CON_TYPE = ''''USER'''' ' +
'AND ' +
'b.TWCON_STS = ''''A'''' ' +
'AND ' +
'a.TWCCS_CLAIM_NBR = '' + @.claim_nbr_2 + ''' +
''')'
exec( @.insert_sql + @.openquery_sql + @.fields_sql1 +
@.from_sql + @.where_sql )
/*
SELECT * FROM #tCaseContact
*/
if (exists
(SELECT CLAIM_NBR
FROM #tCaseContact
WHERE CON_TYPE = 'MCN' AND PRIMARY_IND = '1'))
set @.pri_con_type = cast('MCN' as char(4))
if (exists
(SELECT CLAIM_NBR
FROM #tCaseContact
WHERE CON_TYPE = 'MCS' AND PRIMARY_IND = '2'))
set @.pri_con_type = cast('MCS' as char(4))
if (exists
(SELECT CLAIM_NBR
FROM #tCaseContact
WHERE CON_TYPE = 'MCS' AND CAST(PRIMARY_IND AS VARCHAR(4)) = '') AND
(exists
(SELECT CLAIM_NBR
FROM #tCaseContact
WHERE CON_TYPE = 'RRS' AND PRIMARY_IND = '4')))
set @.pri_con_type = cast('RRS' as char(4))
if @.pri_con_type is null set @.pri_con_type = cast('MCS' as char(4))
/*sets the MCS as the Primary Contact if the primary contact is returned as null*/
/* if (exists
(Select POR
FROM #tCaseContact set POR=f.
where POR is not null))
if Por='' or Por is null
Else set POR=null
*/
SELECT
TOP 1
a.CLAIM_NBR ,
a.CASE_NBR ,
a.INJ_SSN ,
a.INJ_FNAME ,
a.INJ_MID_INIT ,
a.INJ_LNAME ,
a.INJ_NME_SUF ,
a.TPLOC_NAME ,
a.TPLOC_POLICY_NBR ,
convert(varchar(10),a.DT_OF_INJ, 101) as TWCCS_DT_OF_INJ,
a.CASE_STS ,
a.TEAM_NBR ,
(
SELECT top 1 a1.USER_KEY FROM #tCaseContact AS a1 WHERE a1.CON_TYPE = @.pri_con_type
) as USER_KEY ,
a.TPA_ID,
a.EMP_TIER,
a.NON_UM,
a.POR,
(
SELECT top 1 a1.Con_Type FROM #tCaseContact AS a1 WHERE a1.CON_TYPE = @.pri_con_type
) as Cont_Type,
convert(varchar(10),a. Thousand_Date,101) as twccs_1000_lmt_dt
FROM
#tCaseContact AS a
GOdeclare @.openquery_sql varchar(1000)
Up the varchar limit to 2000 and give it a whirl. I think the variable is truncating.|||I still get the same error. Just out of curiousity, does SQL have a problem where the column name has numeric values in it? The reason I'm wondering is when I first added the Thousand_Date to the Temp table I called it K_1000 and SQL basically told me the it was an invalid value, when I chenged it a=it accepted it OK. The DB2 column is twccs_1000_lmt_dt in the @.fields_sql1 portion and I was wondering if that may have something to do with it.
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' reported an error.
[OLE/DB provider returned message: [IBM][CLI Driver][DB2] SQL0104N An unexpected token "MCDB" was found following "". Expected tokens may include: ", FROM INTO". SQLSTATE=42601
]
OLE DB error trace [OLE/DB Provider 'MSDASQL' IColumnsInfo::GetColumnsInfo returned 0x80004005: ].|||This looks like the DB2 server is having trouble with the query. Can you print out the select query that is being generated, and see if that runs via DB2's query tools?|||The only problem I have is my access to the DB2 database is limited to a view in a linked server. It's a remote database and they have it locked down. I don't have any DB2 utilities except for the OBDC conntection.|||Time to get to know someone with the tools, then.
You may not even have to go that far, though. Even if you spit out the query from all the dynamic string concat functions, you may see the problem right off.|||I'll see what I can do.|||Just a quick follow up in case anyone else runs into a similar situation. The problem turned out to be a problem with the DB2 date format. One of the other SQL Admins ran into it when he was creating our data warehouse. to resolve the problem the following code had to be inserted into the open query statement.
' CASE ' +
' WHEN CAST(TWCCS_1000_LMT_DT AS DATE) < ''''1753-01-01'' +
' THEN DATE(''''1753-01-01'''')' +
' ELSE CAST(TWCCS_1000_LMT_DT AS DATE)' +
' END ' +
' AS TWCCS_1000_LMT_DT '|||Just a quick follow up in case anyone else runs into a similar situation. The problem turned out to be a problem with the DB2 date format. One of the other SQL Admins ran into it when he was creating our data warehouse. to resolve the problem the following code had to be inserted into the open query statement.
' CASE ' +
' WHEN CAST(TWCCS_1000_LMT_DT AS DATE) < ''''1753-01-01'' +
' THEN DATE(''''1753-01-01'''')' +
' ELSE CAST(TWCCS_1000_LMT_DT AS DATE)' +
' END ' +
' AS TWCCS_1000_LMT_DT '
With that date is it a "Pilgrim Tracking System" ?
Happy turkey day.
An unexpected error occurred while connecting to the report server.
I have a distributed environment with SQL Server 2005 SP2 (RTM) running on one server. This server holds the databases for SharePoint and Reporting Services. I then have SharePoint 3.0 (32-bit version) with the reporting services add-in installed on a second server. I installed the sharepoint object model (64-bit version) on the database server as suggested and have configured Reporting Services to use domain user accounts. The Reporting Services configuration tool is reporting that integration has been successfully set up but I am unable to access the "Set Server Defaults" page without an error. This is the error I receive:
An unexpected error occurred while connecting to the report server. Verify that the report server is available and configured for SharePoint integrated mode.
Please help.
Solaena,
I would suggest to take a look at the Report Server log files located on your Report Server machine in this location:
%Program Files%\Microsoft SQL Server\MSSQL.X\Reporting Services\LogFiles
Look for a log file whose name starts with ReportServerService and see what exception you find there.
Mihaela
This posting is provided "AS IS" with no warranties, and confers no rights.
|||
After some digging I found an error message that led me to this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1282744&SiteID=1
I am now able to access the "Set Server Defaults" page but I am unable to open any reports and I can't add any reports to the web part. From what I can see I have two errors.
#1 - When adding a report to the web part I am denied access. Access is denied to my domain/user account. This account is a domain admin account.
#2 - NULL Reference exception at "...InternalFindObjectsNonRecursive."
Thanks,
Simone
|||Just thought I would updat that I have been working with Microsoft on this for a few weeks and I will post the outcome when it is resolved. Thanks to all for you insight.|||Just thought I would update everyone on this thread, we were finally able to get all of the integration working. To complete the process we needed to use Kerberos authentication and ensure that the browsers were all set up to enable windows authentication. With Kerberos it is important to be sure that SPNs are set up for the domain account used by the sharepoint and reporting service web services. When doing this, also make sure that duplicate SPNs are not inadvertently created. After two months of working to get this resolved I am thrilled to say we are up and running....Hi Simone,
Did you have to create a SPN for just the MOSS site url or both the MOSS and reportserver url ?
Regards,
BC
|||both servers. also, there is one for just the server name and one for the fully qualified name.
Simone
An unexpected error occurred while connecting to the report server.
I have a distributed environment with SQL Server 2005 SP2 (RTM) running on one server. This server holds the databases for SharePoint and Reporting Services. I then have SharePoint 3.0 (32-bit version) with the reporting services add-in installed on a second server. I installed the sharepoint object model (64-bit version) on the database server as suggested and have configured Reporting Services to use domain user accounts. The Reporting Services configuration tool is reporting that integration has been successfully set up but I am unable to access the "Set Server Defaults" page without an error. This is the error I receive:
An unexpected error occurred while connecting to the report server. Verify that the report server is available and configured for SharePoint integrated mode.
Please help.
Solaena,
I would suggest to take a look at the Report Server log files located on your Report Server machine in this location:
%Program Files%\Microsoft SQL Server\MSSQL.X\Reporting Services\LogFiles
Look for a log file whose name starts with ReportServerService and see what exception you find there.
Mihaela
This posting is provided "AS IS" with no warranties, and confers no rights.
|||After some digging I found an error message that led me to this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1282744&SiteID=1
I am now able to access the "Set Server Defaults" page but I am unable to open any reports and I can't add any reports to the web part. From what I can see I have two errors.
#1 - When adding a report to the web part I am denied access. Access is denied to my domain/user account. This account is a domain admin account.
#2 - NULL Reference exception at "...InternalFindObjectsNonRecursive."
Thanks,
Simone
|||Just thought I would updat that I have been working with Microsoft on this for a few weeks and I will post the outcome when it is resolved. Thanks to all for you insight.|||Just thought I would update everyone on this thread, we were finally able to get all of the integration working. To complete the process we needed to use Kerberos authentication and ensure that the browsers were all set up to enable windows authentication. With Kerberos it is important to be sure that SPNs are set up for the domain account used by the sharepoint and reporting service web services. When doing this, also make sure that duplicate SPNs are not inadvertently created. After two months of working to get this resolved I am thrilled to say we are up and running....Hi Simone,
Did you have to create a SPN for just the MOSS site url or both the MOSS and reportserver url ?
Regards,
BC
|||both servers. also, there is one for just the server name and one for the fully qualified name.
Simone
An unexpected error occurred while connecting to the report server.
I have a distributed environment with SQL Server 2005 SP2 (RTM) running on one server. This server holds the databases for SharePoint and Reporting Services. I then have SharePoint 3.0 (32-bit version) with the reporting services add-in installed on a second server. I installed the sharepoint object model (64-bit version) on the database server as suggested and have configured Reporting Services to use domain user accounts. The Reporting Services configuration tool is reporting that integration has been successfully set up but I am unable to access the "Set Server Defaults" page without an error. This is the error I receive:
An unexpected error occurred while connecting to the report server. Verify that the report server is available and configured for SharePoint integrated mode.
Please help.
Solaena,
I would suggest to take a look at the Report Server log files located on your Report Server machine in this location:
%Program Files%\Microsoft SQL Server\MSSQL.X\Reporting Services\LogFiles
Look for a log file whose name starts with ReportServerService and see what exception you find there.
Mihaela
This posting is provided "AS IS" with no warranties, and confers no rights.
|||After some digging I found an error message that led me to this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1282744&SiteID=1
I am now able to access the "Set Server Defaults" page but I am unable to open any reports and I can't add any reports to the web part. From what I can see I have two errors.
#1 - When adding a report to the web part I am denied access. Access is denied to my domain/user account. This account is a domain admin account.
#2 - NULL Reference exception at "...InternalFindObjectsNonRecursive."
Thanks,
Simone
|||Just thought I would updat that I have been working with Microsoft on this for a few weeks and I will post the outcome when it is resolved. Thanks to all for you insight.|||Just thought I would update everyone on this thread, we were finally able to get all of the integration working. To complete the process we needed to use Kerberos authentication and ensure that the browsers were all set up to enable windows authentication. With Kerberos it is important to be sure that SPNs are set up for the domain account used by the sharepoint and reporting service web services. When doing this, also make sure that duplicate SPNs are not inadvertently created. After two months of working to get this resolved I am thrilled to say we are up and running....Hi Simone,
Did you have to create a SPN for just the MOSS site url or both the MOSS and reportserver url ?
Regards,
BC
|||both servers. also, there is one for just the server name and one for the fully qualified name.
Simone
An unexpected error occurred while connecting to the report server.
I have a distributed environment with SQL Server 2005 SP2 (RTM) running on one server. This server holds the databases for SharePoint and Reporting Services. I then have SharePoint 3.0 (32-bit version) with the reporting services add-in installed on a second server. I installed the sharepoint object model (64-bit version) on the database server as suggested and have configured Reporting Services to use domain user accounts. The Reporting Services configuration tool is reporting that integration has been successfully set up but I am unable to access the "Set Server Defaults" page without an error. This is the error I receive:
An unexpected error occurred while connecting to the report server. Verify that the report server is available and configured for SharePoint integrated mode.
Please help.
Solaena,
I would suggest to take a look at the Report Server log files located on your Report Server machine in this location:
%Program Files%\Microsoft SQL Server\MSSQL.X\Reporting Services\LogFiles
Look for a log file whose name starts with ReportServerService and see what exception you find there.
Mihaela
This posting is provided "AS IS" with no warranties, and confers no rights.
|||After some digging I found an error message that led me to this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1282744&SiteID=1
I am now able to access the "Set Server Defaults" page but I am unable to open any reports and I can't add any reports to the web part. From what I can see I have two errors.
#1 - When adding a report to the web part I am denied access. Access is denied to my domain/user account. This account is a domain admin account.
#2 - NULL Reference exception at "...InternalFindObjectsNonRecursive."
Thanks,
Simone
|||Just thought I would updat that I have been working with Microsoft on this for a few weeks and I will post the outcome when it is resolved. Thanks to all for you insight.|||Just thought I would update everyone on this thread, we were finally able to get all of the integration working. To complete the process we needed to use Kerberos authentication and ensure that the browsers were all set up to enable windows authentication. With Kerberos it is important to be sure that SPNs are set up for the domain account used by the sharepoint and reporting service web services. When doing this, also make sure that duplicate SPNs are not inadvertently created. After two months of working to get this resolved I am thrilled to say we are up and running....Hi Simone,
Did you have to create a SPN for just the MOSS site url or both the MOSS and reportserver url ?
Regards,
BC
|||both servers. also, there is one for just the server name and one for the fully qualified name.
Simone
sqlAn unexpected error occurred while connecting to the report server.
I have a distributed environment with SQL Server 2005 SP2 (RTM) running on one server. This server holds the databases for SharePoint and Reporting Services. I then have SharePoint 3.0 (32-bit version) with the reporting services add-in installed on a second server. I installed the sharepoint object model (64-bit version) on the database server as suggested and have configured Reporting Services to use domain user accounts. The Reporting Services configuration tool is reporting that integration has been successfully set up but I am unable to access the "Set Server Defaults" page without an error. This is the error I receive:
An unexpected error occurred while connecting to the report server. Verify that the report server is available and configured for SharePoint integrated mode.
Please help.
Solaena,
I would suggest to take a look at the Report Server log files located on your Report Server machine in this location:
%Program Files%\Microsoft SQL Server\MSSQL.X\Reporting Services\LogFiles
Look for a log file whose name starts with ReportServerService and see what exception you find there.
Mihaela
This posting is provided "AS IS" with no warranties, and confers no rights.
|||After some digging I found an error message that led me to this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1282744&SiteID=1
I am now able to access the "Set Server Defaults" page but I am unable to open any reports and I can't add any reports to the web part. From what I can see I have two errors.
#1 - When adding a report to the web part I am denied access. Access is denied to my domain/user account. This account is a domain admin account.
#2 - NULL Reference exception at "...InternalFindObjectsNonRecursive."
Thanks,
Simone
|||Just thought I would updat that I have been working with Microsoft on this for a few weeks and I will post the outcome when it is resolved. Thanks to all for you insight.|||Just thought I would update everyone on this thread, we were finally able to get all of the integration working. To complete the process we needed to use Kerberos authentication and ensure that the browsers were all set up to enable windows authentication. With Kerberos it is important to be sure that SPNs are set up for the domain account used by the sharepoint and reporting service web services. When doing this, also make sure that duplicate SPNs are not inadvertently created. After two months of working to get this resolved I am thrilled to say we are up and running....Hi Simone,
Did you have to create a SPN for just the MOSS site url or both the MOSS and reportserver url ?
Regards,
BC
|||both servers. also, there is one for just the server name and one for the fully qualified name.
Simone
An unexpected error occurred in Report Processing
Hi,
I am having MSRS 2000 Reports which is using subscription feature to email PDF format reports to user . I am able to get all the reports e-mailed as expected only this report is giving an errror in the status as "Failure sending mail: An unexpected error occurred in Report Processing". I can pull this report properly and also export it in PDF manually. The Report is a 15 page Report with few images. If I try to email only the link of the Report it works fine. Was wondering if anybody would have a clue about the same .
The Log files read as
Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
An unexpected error occurred in Report Processing. > System.IO.DirectoryNotFoundException:
Could not find a part of the path "F:\".
I dont know why it is going in F drive and failing.
cheers,
siaj
The more detailed log is :
ReportingServicesService!processing!1790!04/25/2006-14:15:10:: e ERROR:
Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
An unexpected error occurred in Report Processing., ;
Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
An unexpected error occurred in Report Processing. > System.IO.DirectoryNotFoundException:
Could not find a part of the path "F:\".
at System.IO.__Error.WinIOError(Int32 errorCode, String str)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path)
at System.IO.Directory.CreateDirectory(String path)
at Microsoft.ReportingServices.Library.PartitionManager.CreateFile(String folder, String filename)
at Microsoft.ReportingServices.Library.FileChunkWriteStream.OpenFileStream()
at Microsoft.ReportingServices.Library.FileChunkWriteStream..ctor(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, String mimeType, ChunkFlags flags)
at Microsoft.ReportingServices.Library.SnapshotChunkStreamFactory.CreateWriteStream(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, String mimeType, Int32 bufferSize)
at Microsoft.ReportingServices.Library.ReportSnapshot.CreateReportChunk(String name, ReportChunkTypes type, String mimeType)
at Microsoft.ReportingServices.ReportProcessing.a.a()
at Microsoft.ReportingServices.ReportProcessing.a.c()
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.a(Report A_0, ProcessingContext A_1, Boolean A_2, GetReportChunk A_3, az A_4, DateTime A_5, CreateReportChunk A_6, ab& A_7)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.a(DateTime A_0, GetReportChunk A_1, ProcessingContext A_2, RenderingContext A_3, CreateReportChunk A_4, Boolean& A_5)
It sounds like you have the feature enabled where we store temporary snapshots in the filesystem. Check this article:
http://msdn2.microsoft.com/en-us/library/ms157439(SQL.90).aspx
Make sure that the FileShareStorageLocation element is set to a path which actually exists. My guess is that it is not.
An unexpected error occurred file 'mddiscretizer.cpp'
I'm not sure if this one should be addresses to the data mining team or the analysis services team, but I first encountered this error while attempting to process a Naive Bayes mining model that has a column with only a couple of distinct values in it. I set the discretization method for the column to clusters and then tried to process the model. The processing completed with failures and complained that the column had too few distinct values to apply the selected discretization.
I have now also noticed that when I attempt to process an OLAP cube that has the same column as a measure group in it the cube processing fails with the following error:
[Analysis Services Execute DDL Task] Error: Internal error: An unexpected error occurred (file 'mddiscretizer.cpp', line 1532, function 'MDDiscretizer::GetBucketForValue').
Any thoughts on this one?
I have found a workaround for this issue:
http://zen-turkey.com/blog/default.aspx?id=32&t=An-unexpected-error-occurred-file-mddis
This seemed to resolve the issue for me, but I am not sure if this would be considered a bug or not? For me the work-around resolves the issue and I consider it closed... but it might bear further investigation...
Cheers :-)
|||This is still a bug that we will investigate and fix in a future release. Thanks for reporting it.
an unexpected error occured during this operation
when i right click table and click design table then error occured
(an unexpected error occured during this operation)
If any one knows please let let me know your help would be appreciated .
thanks
pardhi
--
Message posted via http://www.sqlmonster.comRight click using what tool? I am guessing EM, if so, then try closing
EM and getting back in. I have run into a couple of problems that went
away when I re-started EM.
Knowing what you had done just prior to this might also be helpful as
would the database version: 7, 2000.
HTH -- Mark D Powell --