Showing posts with label lists. Show all posts
Showing posts with label lists. Show all posts

Monday, March 26, 2012

Escpae characters

Hi
I am looking for a reference that lists all special characters in SQL Server
that must be escaped and how
Thank you
Samuel ShulmanSamuel,
have a look in BOL for 'escape characters'. You can use the keyword ESCAPE
to escape a character, and the ones this might apply to are the wildcards
used in pattern matching.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com|||This is a multi-part message in MIME format.
--=_NextPart_000_00CD_01C6800F.9C65F470
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Please view Escape the '\' character
Message that I just sent
T.Y.
Samuel
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message =news:OxUT7b$fGHA.2032@.TK2MSFTNGP02.phx.gbl...
> Samuel,
> have a look in BOL for 'escape characters'. You can use the keyword =ESCAPE > to escape a character, and the ones this might apply to are the =wildcards > used in pattern matching.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com > >
--=_NextPart_000_00CD_01C6800F.9C65F470
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Please view
Escape the '\' character
Message that I just sent
T.Y.
Samuel
"Paul Ibison" wrote in message news:OxUT7b$fGHA.2032@.TK2MSFTNGP02.phx.gbl...> =Samuel,> have a look in BOL for 'escape characters'. You can use the keyword =ESCAPE > to escape a character, and the ones this might apply to are the =wildcards > used in pattern matching.> Cheers,> &nbs=p; Paul Ibison SQL Server MVP, www.replicationanswers.com > >

--=_NextPart_000_00CD_01C6800F.9C65F470--|||Just want to add that whether a character is special and requires escape
depends on the context. The doc under 'escape characters' in BOL talks about
escape characters in search conditions. Delimited identifiers are another
context in which characters such as ] (if delimiters are [ and ]) should be
escaped.
Linchi
"Paul Ibison" wrote:
> Samuel,
> have a look in BOL for 'escape characters'. You can use the keyword ESCAPE
> to escape a character, and the ones this might apply to are the wildcards
> used in pattern matching.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
>
>

Escpae characters

Hi
I am looking for a reference that lists all special characters in SQL Server
that must be escaped and how
Thank you
Samuel ShulmanSamuel,
have a look in BOL for 'escape characters'. You can use the keyword ESCAPE
to escape a character, and the ones this might apply to are the wildcards
used in pattern matching.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com|||Please view
Escape the '' character
Message that I just sent
T.Y.
Samuel
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message news:OxUT7b$fGHA.2032@.TK2MSFTNGP0
2.phx.gbl...
> Samuel,
> have a look in BOL for 'escape characters'. You can use the keyword ESCAPE
> to escape a character, and the ones this might apply to are the wildcards
> used in pattern matching.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
>
>|||Just want to add that whether a character is special and requires escape
depends on the context. The doc under 'escape characters' in BOL talks about
escape characters in search conditions. Delimited identifiers are another
context in which characters such as ] (if delimiters are [ and ]) should
be
escaped.
Linchi
"Paul Ibison" wrote:

> Samuel,
> have a look in BOL for 'escape characters'. You can use the keyword ESCAPE
> to escape a character, and the ones this might apply to are the wildcards
> used in pattern matching.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
>
>

Wednesday, February 15, 2012

Error: Subreport could not be shown

I have a data dictionary report. It lists table & column definitions, then
has a subreport in the group footer to pull up dependent objects (the only
way I could get more than the first dependent object to list). The report
has parameters where you can choose to look at All Tables or individual
tables in the DB. It passes this param (@.tblName) to the subreport.
When I preview individual tables, the subreport works great! When I preview
"All Tables", the subreport works on some tables, and then has that error
listed after other tables. Even tables that it works on fine individually
can have this error message.
The data set for the subreport is called TableDepends and uses the following
code:
---
Declare @.objid int
If @.tblName <> 'All Tables'
Begin
Set @.objid = Object_ID(@.tblName)
if exists (select *
from sysdepends
where depid = @.objid)
begin
select distinct 'name' = (s.name + '.' + o.name), @.tblName as TableName,
type = substring(v.name, 5, 16)
from sysobjects o, master.dbo.spt_values v, sysdepends d,
sysusers s
where o.id = d.id
and o.xtype = substring(v.name,1,2) collate database_default
and v.type = 'O9T'
and d.depid = @.objid
and o.uid = s.uid
and deptype < 2
End
End
---
It's weird that this code works in some parts of the main report when I make
@.tblName = 'All Tables' in the main report, but then doesn't parse on other
parts of the main report. And I can't figure out how to do an ELSE clause
that still lists all table dependencies due to the whole Object_ID issue.
Any suggestions?
Thanks,Did a little more looking around. It appears that this error renders in the
Preview tab of Report Designer at Page 6 (and above) of 52 pages. The first
5 pages render correctly. So, I guess my question is whether or not the
Designer can handle all those re-renderings of the subreport.
On the first 5 pages, it doesn't matter if there's 1 dependency or many
dependencies, they all seem to render fine.
Thoughts?
Catadmin
--
MCDBA, MCSA
Random Thoughts: If a person is Microsoft Certified, does that mean that
Microsoft pays the bills for the funny white jackets that tie in the back?
@.=)
"Catadmin" wrote:
> I have a data dictionary report. It lists table & column definitions, then
> has a subreport in the group footer to pull up dependent objects (the only
> way I could get more than the first dependent object to list). The report
> has parameters where you can choose to look at All Tables or individual
> tables in the DB. It passes this param (@.tblName) to the subreport.
> When I preview individual tables, the subreport works great! When I preview
> "All Tables", the subreport works on some tables, and then has that error
> listed after other tables. Even tables that it works on fine individually
> can have this error message.
> The data set for the subreport is called TableDepends and uses the following
> code:
> ---
> Declare @.objid int
>
> If @.tblName <> 'All Tables'
> Begin
> Set @.objid = Object_ID(@.tblName)
> if exists (select *
> from sysdepends
> where depid = @.objid)
> begin
> select distinct 'name' = (s.name + '.' + o.name), @.tblName as TableName,
> type = substring(v.name, 5, 16)
> from sysobjects o, master.dbo.spt_values v, sysdepends d,
> sysusers s
> where o.id = d.id
> and o.xtype = substring(v.name,1,2) collate database_default
> and v.type = 'O9T'
> and d.depid = @.objid
> and o.uid = s.uid
> and deptype < 2
> End
> End
> ---
> It's weird that this code works in some parts of the main report when I make
> @.tblName = 'All Tables' in the main report, but then doesn't parse on other
> parts of the main report. And I can't figure out how to do an ELSE clause
> that still lists all table dependencies due to the whole Object_ID issue.
> Any suggestions?
> Thanks,
>|||Further information:
Finally found the ReportServer Error Logs. Here are the error messages I'm
getting:
----
aspnet_wp!processing!12f4!5/12/2005-10:30:34:: w WARN: Data source
'APACS_BASE': Report processing has been aborted.
aspnet_wp!processing!12f4!5/12/2005-10:30:34:: e ERROR: Throwing
Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An
error has occurred during report processing., ;
Info:
Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An
error has occurred during report processing. -->
System.InvalidOperationException: Invalid attempt to read when no data is
present.
at System.Data.SqlClient.SqlDataReader.GetOrdinal(String name)
at
Microsoft.ReportingServices.DataExtensions.DataReaderWrapper.GetOrdinal(String fieldName)
at
Microsoft.ReportingServices.DataExtensions.MappingDataReader..ctor(String
dataSetName, IDataReader sourceReader, String[] aliases, String[] fieldNames)
at Microsoft.ReportingServices.ReportProcessing.h..ctor(String A_0,
IDataReader A_1, String[] A_2, String[] A_3)
at Microsoft.ReportingServices.ReportProcessing.a1.v()
at Microsoft.ReportingServices.ReportProcessing.ax.c()
at Microsoft.ReportingServices.ReportProcessing.a1.a(Boolean& A_0)
at Microsoft.ReportingServices.ReportProcessing.ax.b()
at Microsoft.ReportingServices.ReportProcessing.a1.a(Object A_0)
-- End of inner exception stack trace --
----
This error comes up in the log for every time the subreport tries to print
and can't. Anyone have any ideas how to get around it?
Thanks!
--
MCDBA, MCSA
Random Thoughts: If a person is Microsoft Certified, does that mean that
Microsoft pays the bills for the funny white jackets that tie in the back?
@.=)
"Catadmin" wrote:
> I have a data dictionary report. It lists table & column definitions, then
> has a subreport in the group footer to pull up dependent objects (the only
> way I could get more than the first dependent object to list). The report
> has parameters where you can choose to look at All Tables or individual
> tables in the DB. It passes this param (@.tblName) to the subreport.
> When I preview individual tables, the subreport works great! When I preview
> "All Tables", the subreport works on some tables, and then has that error
> listed after other tables. Even tables that it works on fine individually
> can have this error message.
> The data set for the subreport is called TableDepends and uses the following
> code:
> ---
> Declare @.objid int
>
> If @.tblName <> 'All Tables'
> Begin
> Set @.objid = Object_ID(@.tblName)
> if exists (select *
> from sysdepends
> where depid = @.objid)
> begin
> select distinct 'name' = (s.name + '.' + o.name), @.tblName as TableName,
> type = substring(v.name, 5, 16)
> from sysobjects o, master.dbo.spt_values v, sysdepends d,
> sysusers s
> where o.id = d.id
> and o.xtype = substring(v.name,1,2) collate database_default
> and v.type = 'O9T'
> and d.depid = @.objid
> and o.uid = s.uid
> and deptype < 2
> End
> End
> ---
> It's weird that this code works in some parts of the main report when I make
> @.tblName = 'All Tables' in the main report, but then doesn't parse on other
> parts of the main report. And I can't figure out how to do an ELSE clause
> that still lists all table dependencies due to the whole Object_ID issue.
> Any suggestions?
> Thanks,
>