Wednesday, March 28, 2012
how to use word and pdf filter in full text search (SQLServer2k5)
Monday, March 26, 2012
How to use t-sql to email and attachment
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de|||I want to send an export via smtp using sql 2005. Is there a built-in stored procedure that will allow me to send an smtp message, and attach my export csv.|||You could use the new Database Mail feature. But for your needs it is easier to use a SSIS package since you can export the data from table(s) to file and email it using built-in tasks. You could do the same within SQL Server also but you have to xp_cmdshell to run BCP out and that poses security risks among other things.
Friday, March 23, 2012
How to use substring with starting point?
Hi all,
I want to select a column which is store email address. How to use the substring function from starting point'@.' to end of string?
Here is my syntax :
select substring(emailaddress, [what syntax] ,len(emailaddress)) from table
Thanks!
See CharIndex in Books on Line. It will give you that location of any string within a string.
CHARINDEX
Returns the starting position of the specified expression in a character string.
Syntax
CHARINDEX(expression1,expression2 [,start_location])
Arguments
expression1
Is an expression containing the sequence of characters to be found.expression1 is an expression of the short character data type category.
expression2
Is an expression, usually a column searched for the specified sequence.expression2is of the character string data type category.
start_location
Is the character position to start searching forexpression1 inexpression2. Ifstart_location is not given, is a negative number, or is zero, the search starts at the beginning ofexpression2.
|||Thanks!Monday, March 19, 2012
How to use row values from query
render a report from.
For example "select county name from COUNTYTABLE where COUNTYNUMBER IN
(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) ". This query return 1 column and 15
rows of county names. I need them to be in 1 row and 15 columns to make up
the data going accross the report. What is the best way to do this?
Thanks,
ShawnI you create a matrix report with County Name across the top of the matrix,
it will automatically generate the appropriate number of columns...
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"sysdesigner" <sysdesigner@.discussions.microsoft.com> wrote in message
news:55F38FB8-CBD1-4C1C-9611-8247A1A5C60E@.microsoft.com...
> Our database is normalized to the point that I need to build a dataset to
> render a report from.
> For example "select county name from COUNTYTABLE where COUNTYNUMBER IN
> (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) ". This query return 1 column and
15
> rows of county names. I need them to be in 1 row and 15 columns to make
up
> the data going accross the report. What is the best way to do this?
> Thanks,
> Shawn
>|||I need to make a report that looks like...
Statistic A Statistic B Statistic C Statistic D
----
99 07 102 91
It would be easy but the values are all in one column in the table, like...
KeyValue | StatisticCode | StatisticValue
001| A| 99
002| B| 07
003| D| 91
004| C| 102
Thanks,
Shawn
"Wayne Snyder" wrote:
> I you create a matrix report with County Name across the top of the matrix,
> it will automatically generate the appropriate number of columns...
> --
> Wayne Snyder MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> (Please respond only to the newsgroup.)
> I support the Professional Association for SQL Server ( PASS) and it's
> community of SQL Professionals.
> "sysdesigner" <sysdesigner@.discussions.microsoft.com> wrote in message
> news:55F38FB8-CBD1-4C1C-9611-8247A1A5C60E@.microsoft.com...
> > Our database is normalized to the point that I need to build a dataset to
> > render a report from.
> >
> > For example "select county name from COUNTYTABLE where COUNTYNUMBER IN
> > (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) ". This query return 1 column and
> 15
> > rows of county names. I need them to be in 1 row and 15 columns to make
> up
> > the data going accross the report. What is the best way to do this?
> >
> > Thanks,
> > Shawn
> >
>
>
Friday, March 9, 2012
how to use DtsLocalizableAttribute
I Have to set the display name and Description of DtsPipelineAttribute using DtsLocalizableAttribute.
Can anybody point to some example. MSDN Help is not much of use, it does not contain any example.
Dhamrbir
Can you please explain us more about what you are trying to do here?
|||
Hi Deniz
I have a custom component, whose name should be localized. For this I have to read the resource file and set the Display Name and Description of the DtsPipelineComponent attribute. As per the MSDN Documentation http://msdn2.microsoft.com/en-us/library/microsoft.sqlserver.dts.pipeline.localization.dtslocalizableattribute.aspx
We need to set the LocalizationType property of the DtsPipelineComponent attribute to the type of the resource class that contains the resources for the component. When ever I set this attribute to the Resource Type I get this Error
"Error 1 'ETI.HPC.Oracle.Dest.OracleDestinationResources' is a 'type', which is not valid in the given context. "
Do I have to inherit this resource class for some class. What I am doing wrong.
After that how do I use DtsLocalizableAttribute to set the Name and Description.
Thanks
Dharmbir