Showing posts with label word. Show all posts
Showing posts with label word. Show all posts

Wednesday, March 21, 2012

Reserved Words

Is there a method or procedure name that will let me know if a word is a sql
server reserved word?
i.e.
sp_isReservedWord 'Null' --returns true
sp_isReservedWord 'Count' --returns true
sp_isReservedWord 'OrderNumber' --returns falseJI,
If you trust the list in SQL Server 2005 Books Online, this will work.
It may not be what you had in mind, but I hope it helps.
create function usp_reserved(
@.w nvarchar(128)
) returns bit as begin
set @.w = '|'+UPPER(REPLACE(@.w,'|',''))+'|'
if len(@.w) = 0 return 0
return
cast(charindex(@.w,
'|ADD|EXCEPT|PERCENT|ALL|EXEC|PLAN|ALTER
'+
'|EXECUTE|PRECISION|AND|EXISTS|PRIMARY|A
NY'+
'|EXIT|PRINT|AS|FETCH|PROC|ASC|FILE|PROC
EDURE'+
'|AUTHORIZATION|FILLFACTOR|PUBLIC|BACKUP
|FOR'+
'|RAISERROR|BEGIN|FOREIGN|READ|BETWEEN|F
REETEXT'+
'|READTEXT|BREAK|FREETEXTTABLE|RECONFIGU
RE'+
'|BROWSE|FROM|REFERENCES|BULK|FULL|REPLI
CATION'+
'|BY|FUNCTION|RESTORE|CASCADE|GOTO|RESTR
ICT'+
'|CASE|GRANT|RETURN|CHECK|GROUP|REVOKE'+
'|CHECKPOINT|HAVING|RIGHT|CLOSE|HOLDLOCK
'+
'|ROLLBACK|CLUSTERED|IDENTITY|ROWCOUNT|C
OALESCE'+
'|IDENTITY_INSERT|ROWGUIDCOL|COLLATE|IDE
NTITYCOL'+
'|RULE|COLUMN|IF|SAVE|COMMIT|IN|SCHEMA|C
OMPUTE'+
'|INDEX|SELECT|CONSTRAINT|INNER|SESSION_
USER'+
'|CONTAINS|INSERT|SET|CONTAINSTABLE|INTE
RSECT'+
'|SETUSER|CONTINUE|INTO|SHUTDOWN|CONVERT
|IS'+
'|SOME|CREATE|JOIN|STATISTICS|CROSS|KEY'
+
'|SYSTEM_USER|CURRENT|KILL|TABLE|CURRENT
_DATE'+
'|LEFT|TEXTSIZE|CURRENT_TIME|LIKE|THEN'+
'|CURRENT_TIMESTAMP|LINENO|TO|CURRENT_US
ER'+
'|LOAD|TOP|CURSOR|NATIONAL||TRAN|DATABAS
E'+
'|NOCHECK|TRANSACTION|DBCC|NONCLUSTERED'
+
'|TRIGGER|DEALLOCATE|NOT|TRUNCATE|DECLAR
E'+
'|NULL|TSEQUAL|DEFAULT|NULLIF|UNION|DELE
TE'+
'|OF|UNIQUE|DENY|OFF|UPDATE|DESC|OFFSETS
'+
'|UPDATETEXT|DISK|ON|USE|DISTINCT|OPEN|U
SER'+
'|DISTRIBUTED|OPENDATASOURCE|VALUES|DOUB
LE'+
'|OPENQUERY|VARYING|DROP|OPENROWSET|VIEW
|DUMMY'+
'|OPENXML|WAITFOR|DUMP|OPTION|WHEN|ELSE|
OR'+
'|WHERE|END|ORDER|WHILE|ERRLVL|OUTER|WIT
H'+
'|ESCAPE|OVER|WRITETEXT|') as bit)
end
go
select dbo.usp_reserved('ESCAPE')
select dbo.usp_reserved('AD')
select dbo.usp_reserved('ADD')
select dbo.usp_reserved('ADD|EXCEPT')
go
-- drop function usp_reserved
-- Steve Kass
-- Drew University
JI wrote:

>Is there a method or procedure name that will let me know if a word is a sq
l
>server reserved word?
>i.e.
>sp_isReservedWord 'Null' --returns true
>sp_isReservedWord 'Count' --returns true
>sp_isReservedWord 'OrderNumber' --returns false
>
>|||Thanks Steve...That saved me some cut and pasting from the BOL.
It would be a nice feature for the SQL team to write, simply to have them
maintain the list.
Thanks again,
ji
"Steve Kass" <skass@.drew.edu> wrote in message
news:%236tHIeaaGHA.3612@.TK2MSFTNGP03.phx.gbl...
> JI,
> If you trust the list in SQL Server 2005 Books Online, this will work.
> It may not be what you had in mind, but I hope it helps.
> create function usp_reserved(
> @.w nvarchar(128)
> ) returns bit as begin
> set @.w = '|'+UPPER(REPLACE(@.w,'|',''))+'|'
> if len(@.w) = 0 return 0
> return
> cast(charindex(@.w,
> '|ADD|EXCEPT|PERCENT|ALL|EXEC|PLAN|ALTER
'+
> '|EXECUTE|PRECISION|AND|EXISTS|PRIMARY|A
NY'+
> '|EXIT|PRINT|AS|FETCH|PROC|ASC|FILE|PROC
EDURE'+
> '|AUTHORIZATION|FILLFACTOR|PUBLIC|BACKUP
|FOR'+
> '|RAISERROR|BEGIN|FOREIGN|READ|BETWEEN|F
REETEXT'+
> '|READTEXT|BREAK|FREETEXTTABLE|RECONFIGU
RE'+
> '|BROWSE|FROM|REFERENCES|BULK|FULL|REPLI
CATION'+
> '|BY|FUNCTION|RESTORE|CASCADE|GOTO|RESTR
ICT'+
> '|CASE|GRANT|RETURN|CHECK|GROUP|REVOKE'+
> '|CHECKPOINT|HAVING|RIGHT|CLOSE|HOLDLOCK
'+
> '|ROLLBACK|CLUSTERED|IDENTITY|ROWCOUNT|C
OALESCE'+
> '|IDENTITY_INSERT|ROWGUIDCOL|COLLATE|IDE
NTITYCOL'+
> '|RULE|COLUMN|IF|SAVE|COMMIT|IN|SCHEMA|C
OMPUTE'+
> '|INDEX|SELECT|CONSTRAINT|INNER|SESSION_
USER'+
> '|CONTAINS|INSERT|SET|CONTAINSTABLE|INTE
RSECT'+
> '|SETUSER|CONTINUE|INTO|SHUTDOWN|CONVERT
|IS'+
> '|SOME|CREATE|JOIN|STATISTICS|CROSS|KEY'
+
> '|SYSTEM_USER|CURRENT|KILL|TABLE|CURRENT
_DATE'+
> '|LEFT|TEXTSIZE|CURRENT_TIME|LIKE|THEN'+
> '|CURRENT_TIMESTAMP|LINENO|TO|CURRENT_US
ER'+
> '|LOAD|TOP|CURSOR|NATIONAL||TRAN|DATABAS
E'+
> '|NOCHECK|TRANSACTION|DBCC|NONCLUSTERED'
+
> '|TRIGGER|DEALLOCATE|NOT|TRUNCATE|DECLAR
E'+
> '|NULL|TSEQUAL|DEFAULT|NULLIF|UNION|DELE
TE'+
> '|OF|UNIQUE|DENY|OFF|UPDATE|DESC|OFFSETS
'+
> '|UPDATETEXT|DISK|ON|USE|DISTINCT|OPEN|U
SER'+
> '|DISTRIBUTED|OPENDATASOURCE|VALUES|DOUB
LE'+
> '|OPENQUERY|VARYING|DROP|OPENROWSET|VIEW
|DUMMY'+
> '|OPENXML|WAITFOR|DUMP|OPTION|WHEN|ELSE|
OR'+
> '|WHERE|END|ORDER|WHILE|ERRLVL|OUTER|WIT
H'+
> '|ESCAPE|OVER|WRITETEXT|') as bit)
> end
> go
> select dbo.usp_reserved('ESCAPE')
> select dbo.usp_reserved('AD')
> select dbo.usp_reserved('ADD')
> select dbo.usp_reserved('ADD|EXCEPT')
> go
> -- drop function usp_reserved
> -- Steve Kass
> -- Drew University
> JI wrote:
>

Tuesday, February 21, 2012

ReportWriter - Soft Artisans

Anyone have any comments on using SoftArtisans ReportWriter that allows
Word/Excel users to write reports and publish to Reporting Services?
Is it very expensive?
is it worth it?"dm1608" wrote:
> Anyone have any comments on using SoftArtisans ReportWriter that allows
> Word/Excel users to write reports and publish to Reporting Services?
Ha! Funny, see a few subject headings down from this post regarding "Excel
reports to RS."
> Is it very expensive?
>
Yes.
> is it worth it?
>
Not really sure yet. I'm asking the same question, although in finer
granularity.
All the best!
Greg--|||"dm1608" wrote:
> Anyone have any comments on using SoftArtisans ReportWriter that allows
> Word/Excel users to write reports and publish to Reporting Services?
> Is it very expensive?
yes, it is expensive.. 7.500 Euro per cpu
> is it worth it?
no, you must redesign all your reports using ms word with the softartisans
addin, if you want to export the reports to word...
And by the Way, i mean the Support by softartisans ist very bad|||So we have SQL Reporting Services in SQL 2000 and 2005. The feature matrix
on SQL 2005 says rendering formats for output are the same: Excel, PDF,
DHTML, images... but still no support for Word.
Does this mean Microsoft itself is shying away from its own product, Word,
by not offering native support within SQL RS? Is there a new industry
standard in word processing that I need to be looking at?
I find it truly mind-boggling for Microsoft to not export to Excel, XML,
even Adobe's PDF (hello MDI?) - but not Word. And for OfficeWriter to be the
only tool available... ?
Any other products out there?
Thanks,
Andrew Puente
"cwalloch" wrote:
>
> "dm1608" wrote:
> > Anyone have any comments on using SoftArtisans ReportWriter that allows
> > Word/Excel users to write reports and publish to Reporting Services?
> >
> > Is it very expensive?
> yes, it is expensive.. 7.500 Euro per cpu
> >
> > is it worth it?
> no, you must redesign all your reports using ms word with the softartisans
> addin, if you want to export the reports to word...
> And by the Way, i mean the Support by softartisans ist very bad|||And before I get crucified, let me revise my last paragraph:
I find it truly mind-boggling for Microsoft to export to Excel, XML,
even Adobe's PDF (hello MDI?) - but not Word. And for OfficeWriter to be the
only tool available... ?
It's called Proofreading 101. I failed that course, apparently. :-)
Cheers,
Andrew Puente
"Andrew Puente" wrote:
> So we have SQL Reporting Services in SQL 2000 and 2005. The feature matrix
> on SQL 2005 says rendering formats for output are the same: Excel, PDF,
> DHTML, images... but still no support for Word.
> Does this mean Microsoft itself is shying away from its own product, Word,
> by not offering native support within SQL RS? Is there a new industry
> standard in word processing that I need to be looking at?
> I find it truly mind-boggling for Microsoft to not export to Excel, XML,
> even Adobe's PDF (hello MDI?) - but not Word. And for OfficeWriter to be the
> only tool available... ?
> Any other products out there?
> Thanks,
> Andrew Puente
> "cwalloch" wrote:
> >
> >
> > "dm1608" wrote:
> >
> > > Anyone have any comments on using SoftArtisans ReportWriter that allows
> > > Word/Excel users to write reports and publish to Reporting Services?
> > >
> > > Is it very expensive?
> > yes, it is expensive.. 7.500 Euro per cpu
> >
> > >
> > > is it worth it?
> > no, you must redesign all your reports using ms word with the softartisans
> > addin, if you want to export the reports to word...
> > And by the Way, i mean the Support by softartisans ist very bad|||I suspect that XPS format and office 12 xml formats will be supported when
released.
--
William Stacey [MVP]
"Andrew Puente" <AndrewPuente@.discussions.microsoft.com> wrote in message
news:1B3A18C9-17C9-4135-B367-5E05253C067A@.microsoft.com...
> And before I get crucified, let me revise my last paragraph:
> I find it truly mind-boggling for Microsoft to export to Excel, XML,
> even Adobe's PDF (hello MDI?) - but not Word. And for OfficeWriter to be
> the
> only tool available... ?
> It's called Proofreading 101. I failed that course, apparently. :-)
> Cheers,
> Andrew Puente
>
> "Andrew Puente" wrote:
>> So we have SQL Reporting Services in SQL 2000 and 2005. The feature
>> matrix
>> on SQL 2005 says rendering formats for output are the same: Excel, PDF,
>> DHTML, images... but still no support for Word.
>> Does this mean Microsoft itself is shying away from its own product,
>> Word,
>> by not offering native support within SQL RS? Is there a new industry
>> standard in word processing that I need to be looking at?
>> I find it truly mind-boggling for Microsoft to not export to Excel, XML,
>> even Adobe's PDF (hello MDI?) - but not Word. And for OfficeWriter to be
>> the
>> only tool available... ?
>> Any other products out there?
>> Thanks,
>> Andrew Puente
>> "cwalloch" wrote:
>> >
>> >
>> > "dm1608" wrote:
>> >
>> > > Anyone have any comments on using SoftArtisans ReportWriter that
>> > > allows
>> > > Word/Excel users to write reports and publish to Reporting Services?
>> > >
>> > > Is it very expensive?
>> > yes, it is expensive.. 7.500 Euro per cpu
>> >
>> > >
>> > > is it worth it?
>> > no, you must redesign all your reports using ms word with the
>> > softartisans
>> > addin, if you want to export the reports to word...
>> > And by the Way, i mean the Support by softartisans ist very bad