Column Size In Emails Generated Using XP Sendmail

Dec 14, 2007

Hi, with some help today I was able to get my stored procedure running
and have the results emailed to me. However, this is how its showing
up:
Accounting_Year WK_IN_FYEAR Location
GL_Account
Col Data Difference
--------------- ----------- ------------------------------------
----------
-------------------- -------------------- --------------------
2007 49 Test1
500-001
-2587872.0200 -2587872.0200 .0000
2007 49 Test2
500-001
-3344713.5000 -3344713.5000 .0000
2007 49 Test3
500-001

Is there anyway to line them up side by side properly? When i have two
colms selected the format comes out ok. Thanks for all the help
again!

Here is the sp:

CREATE PROCEDURE [dbo].[spEmailVariance]
(
@SubjectLine as varchar(500),
@EmailRecipient VARCHAR(100)
)
AS

DECLARE @strBody varchar(5000)
set @SubjectLine = 'Weekly Flash Update'
SET @strBody =

'Select statement'


exec master.dbo.xp_sendmail
@recipients= 'XX@XXXX.com',
@subject= @SubjectLine,
@query = @strbody

RETURN
GO

View 2 Replies


ADVERTISEMENT

Generated Column Not Found

Mar 12, 2008

I have this

use dbWebsiteLO
SELECT A.vehicleref,A.manufacturer,A.cvehicle_shortmodtext,A.derivative,min(a.ch) as price,A.capid,B.studioimages,(SELECT term FROM vwAllMatrixWithLombardAndShortModel WHERE vehicleref = a.vehicleref and ch = price) FROM vwAllMatrixWithLombardAndShortModel A
LEFT OUTER JOIN dbPubMatrix..tblCarImages B on A.capid = b.capid
WHERE a.source <> 'LOM' AND a.type = 'car' GROUP BY a.vehicleref,a.manufacturer,a.cvehicle_shortmodtext,a.derivative,a.capid,b.studioimages

I get Invalid column name 'price'. I'm trying to reference the "min(a.ch) as price"

Thanks

View 1 Replies View Related

Reusing A Generated Column To Avoid Over Processing

Oct 22, 2007

Hi,I'm constructing a query that will performs a lot o datetimecalculumns to generate columns.All that operations are dependent of a base calculum that is performedon the query and its result is stored in a columna returned.I wanna find a way of reusing this generated column, to avoidreprocessing that calculumn to perform the other operations, causethat query will be used in a critical application, and all saving isfew.Thanks a lot.

View 2 Replies View Related

SQL 2012 :: Drop All The Auto Generated Column Statistics?

Dec 29, 2014

My question: Is it okay to drop all the auto generated column statistics? (for the following scenario)

- I am cleaning up unnecessary objects (tables, unused indexes, overlapping statistics etc) from databases and found out there are more than 1400 auto generated column statistics on one database (lets call it A).
- Database A was used to be our reporting database but from last several years we are using database B for reporting. DB A has all the historical data while DB B only has valid records.
- We are updating all the column statistics with full scan nightly on database A and it is talking almost 2.5 hours to do that. Now I want to drop all the "unnecessary" statistics those were created when DB A was reporting database and they are no longer in use. There is no way to know the creation date of the column statistics that I know of. Statistics "last update date" is of no use because of our nightly job. So I was thinking of dropping all the auto generated column statistics and let the sql server create as it needs from now.

View 0 Replies View Related

Reporting Services :: Change Column Size Dynamically Depends On Content Of The Column?

Jun 4, 2015

How to change column size dynamically depends on content of the column.

View 2 Replies View Related

Entity Framework: No Support For Server-generated Keys And Server-generated Values

May 23, 2008

Hello

I tried the Beta 1 of the service pack 1 to .net 3.5. If I try to add an entity (and try to save this), I get the Exception "No support for server-generated keys and server-generated values".

How can I add entities to my Sqlce- database?

I tried to give the id- column (primary key) in the database an identity, another time without identity, only primary key --> none of them worked. I always get the same error.

What do I have to change to make successfully a SaveChanges()?

Thanks for your help,
Gerald

View 21 Replies View Related

SQL2005 Data Import Error, Unicode Data Is Odd Byte Size For Column &&<n&&>. Should Be Even Byte Size

Aug 23, 2006

Hi, I have a problem importing data from SQL Server 2000 'text' columns to SQL Server 2005 nvarchar(max) columns. I get the following error when encountering a transfer of any column that matches the above.
The error is copied below,

Any help on this greatly appreciated...

ERROR : errorCode=-1071636471 description=An OLE DB error has occurred. Error code: 0x80004005.An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Unicode data is odd byte size for column 3. Should be even byte size.". helpFile=dtsmsg.rll helpContext=0 idofInterfaceWithError={8BDFE893-E9D8-4D23-9739-DA807BCDC2AC} (Microsoft.SqlServer.DtsTransferProvider)


Many thanks

View 5 Replies View Related

Sendmail...Urgent Please!!

Jul 21, 2000

When I am executing the following sendmail code,it is apending the results to the mail.But I want the results to be sent as attachment,in .txt format.


exec master..xp_sendmail
@recipients='Tpolasp@hotmail.com',
@query='c2usa..sp_report_daily_pc',
@attach_results='true',
@subject='Daily fastquotes'


Interestingly,even if I use @attachments option by giving a specific file name,then also it is sending the mail in which the contents of the attached file are appended to the mail!
Is there anything that I shall configure somewhere to make it behave properly?
I am using 7.0 standard edition with no SP.Any help is greatly appreciated.

Thanks.

View 2 Replies View Related

SendMail Task

Nov 3, 1999

Hi

I'd like to access to a SendMail object with an ActiveXScript.
I access it by the Tasks property of the package object.
I can retrieve the name or the description but I cannot access to the specific properties of the SendMail object (fileAttachments, ccline, ...)
How can I do it ?

THanks

View 1 Replies View Related

Sendmail In Sql2000

May 2, 2008

hi
how to sendmail in sql2000

View 2 Replies View Related

SQL 2005 Resize Initial Log Size: MODIFY FILE Failed. Specified Size Is Less Than Current Size.

Sep 4, 2007


I am trying to resize a database initial log file from 500M to 2M. I€™m using€?

ALTER DATABASE <DBNAME> MODIFY FILE ( NAME = <DBLOGFILENAME, SIZE = 2 ) "



And I'm getting "MODIFY FILE failed. Specified size is less than current size." I tried going into the database properties and setting the log file to 2M, but it doesn€™t keep the changes.



Any help with this process?

View 1 Replies View Related

Sendmail Error: Urgent!

Aug 29, 2001

--------------------------------------------
Declare @filename char(22)
Declare @cmd char(100)

Select @filename = '"' + 'D:Feedsest_' + substring(convert(char(12), getdate(), 12), 3, 4) + substring(convert(char(12), getdate(), 12), 1, 2) + '"'

Select @cmd = "xp_sendmail @recipients = 'test@test.com'

, @attachments = " + @filename + " "

exec(@cmd)

Go
--------------------------------------------


Above T-SQL step is causing the following error:

Server: Msg 103, Level 15, State 7, Line 6
The identifier that starts with 'xp_sendmail @recipients = 'test@test.com'
is too long. Maximum length is 128.

Any help??Thanks.

View 2 Replies View Related

Sendmail Question...URGENT!!

Jul 18, 2000

When I am executing the following sendmail code,it is apending the results to the mail.Actually, I want the results to be sent as attachment,in .txt format.
Any help is greatly appreciated.



exec master..xp_sendmail
@recipients='Tpolasp@hotmail.com',
@query='c2usa..sp_report_daily_pc',
@attach_results='true',
@subject='Daily fastquotes'


Thanks.

View 3 Replies View Related

Sendmail Task &> Where User And Pwd ?

May 3, 2007

hi,

at the end of my ssis package flow, i want to invoke a sendmail task.
now, when configuring the sendmail service, i see i can only enter the name of my smtpserver. however, i see the task fails, probably because a user and a password is missing (i have it, but don't see where to type it in the SSIS).

(i want to use the smtp server of my internet provider)

anyone can help?

View 1 Replies View Related

Sendmail Task - How To Customize ?

May 15, 2007

I have a sendmail task following a data flow task. How can I set "To" attribute on the sendmail task before running it ? for example, read a config table and detemrine who the mail should be sent to...

View 1 Replies View Related

Sendmail With Parameters Problem...URGENT!!

Aug 30, 2001

I have a step like this: I am getting the following error:How to code @attachments in quotes?? thanks.

The name specified is not recognized as an
internal or external command, operable program or batch file.

(2 row(s) affected)

Here is my T_SQL step:


Declare @filename char(22)
Declare @cmd char(100)

Select @filename = 'D:Feedsest_' + substring(convert(char(12), getdate(), 12), 3, 4) + substring(convert(char(12), getdate(), 12), 1, 2)

EXEC xp_cmdshell @recipients = 'test@test.com'
, @attachments = @FileName

View 2 Replies View Related

Xp Sendmail Says 'mail Sent' But No Email Arrives

Sep 14, 2004

I have setup SQL Mail on a SQL Server 2000 (service pk 3a) with outlook 2002.

SQL Mail give me the success message when I test the profile.

When I send a test message to an operator from SQL Agent it works fine.

When I send a message from the Outlook 2002 client (logged in as the Service-SQL domain account), I can send a message without a problem.

However, when I send an xp_sendmail message (xp_sendmail @recipients='email@address',@message='test',@subje ct='test') it tells me 'Mail Sent' in the result window, but the email never arrives or shows up in the 'sent items' folder in outlook 2002.

Anyone else have this issue.

Thanks - Rick

View 1 Replies View Related

How Do You Send The Result Of A Query By SendMail?

Apr 19, 2007

For example the result of an Execute T-SQL Statement task.

This task does not have a hook-up for variable assignment, the SendMail can take in a variable. How do you pass the result of EXEC T-SQL statement be assigned to the variable in the SendMail task?

View 9 Replies View Related

Execute SendMail Depending On A Condition

Apr 17, 2008



Hello All,

I have an Execute SQL Task and a SendMail in the control flow of my package.

If the Execute SQL Task inserts records in the Database, I want the SendMail task to be executed.

But if Execute SQL Task does not inserts even a single record in the Database, I dont want the SendMail task to be executed.

How can I achieve this...

Thanks,
Kapadia Shalin P.

View 1 Replies View Related

Does ExchangeServer Accept In SendMail Task?

Jun 20, 2007

Does exchangeServer accept in SendMail task?

only SMTP?





who knows?

For internal mail server , it's only via exchange server.

View 1 Replies View Related

How Do I Convey Information With SSIS SendMail Notification

May 24, 2007

How do I Convey Information using Notification - can someone please explain?

View 4 Replies View Related

Column Max Size For String

Nov 13, 2003

Hello I currently am using the nvarchar type which has a maximum size of 4000 char's. Is there any other type that I can use which can store a greater amount of char's ?

Many thanks

Grant

View 2 Replies View Related

Column Size Question

Sep 19, 2000

Is it posible to find out the size of data in a column?

View 1 Replies View Related

Increasing Column Size

May 12, 2000

Hello,

Does anyone know of a good process to increase a Column size of type char, that already had data in it, without losing the data you already have?

Thanks,

Kevin

View 1 Replies View Related

Column Size For Ntext

Aug 11, 2005

Hi,

Please help me to find out the ntext column size in a table.

Thanks in advance

Regards

Karthik

View 2 Replies View Related

Modify PK Column Size

Jun 20, 2008

Hi,

Is it possible to increase the primary column size..?

The PK data type is Varchar (8). Now I want to increase to varchar (12).


Thanks
Lakshmi.S

View 4 Replies View Related

HOW TO INCREASE THE COLUMN SIZE

Feb 23, 2007

Dear friends,

i've a column with nvarchar type. how can i increase the size of the column?

Vinod

View 5 Replies View Related

Cant Increase Column Size

Jul 9, 2007

hey

i've a db running sql server express sp2. the db size now is 1.1 gb
i've a table with a varchar column of size 20 . when i try to increase the column size to 50 i get a
timeout exception, and the the cloumn size is unchanged. this table has 2.5 million records

i use sql server management studio express to do the changes

is there a way to increase this timeout or whtever i can do to update this column size?

thx in advance

View 4 Replies View Related

Change Column Size

Jul 1, 2006

Hi

I am using one Publisher with many subscribers for Merge replication of a database.
I wanted to change size one column in a table. So I added a dummy column (through Filter column).
Copied data, dropped old column (through Filter column), added new column, copied data, and dropped dummy column.
On subscriber A, replication is OK. On subscriber B, I get the following message.
--------------------
Initializing
Connecting to Publisher 'REPLIC'
Retrieving publication information
Retrieving subscription information
A column was added to or dropped from the replicated table.
The schema script 'exec sp_repladdcolumn '[dbo].[Items]','C1',[NVARCHAR(1000) NULL], '%', 1' could not be propagated to the subscriber.
The schema script 'exec sp_repladdcolumn '[dbo].[Items]','C1',[NVARCHAR(1000) NULL], '%', 1' could not be propagated to the subscriber.
A column was added to or dropped from the replicated table.
--------------------

I made a new snapshot, reintialized subscription with upload, and tried to sychronize again.
But same message.

Question 1. Is there anyway to make replication?
Question 2. If not, can I at least upload data changes before dropping and making new publication?

Imtaar

View 1 Replies View Related

How To Pass In The Current Database, Server Name To A Sendmail Task

Sep 28, 2006

Hi all--I am writing a DTS package looking to back up all databases in sequence from a specific instance of SQL Server. I am calling CDOSYS in a stored procedure from support.microsoft.com to send email upon failure. I have two types of SQL tasks I am writing into the DTS package:

1. backup database <database> to disk = '<drive>:<path>.bak' with init

2. Upon failure of a particular database to back up to file, execute the following SQL task:

declare @srvname varchar(128),
@db_name varchar(128),
@msg nvarchar(4000)

SELECT @srvname = @@servername
select @db_name = db_name()
set @msg = 'Hi--check your database backups. The ' + @db_name + ' database backup on ' + @srvname + ' has failed.
Thanks--SQL Server';

SELECT @srvname, @db_name, @msg

(Many thanks to Whitney Weaver and SQL_Menace for help with sections of this code)

Upon success of #1 and/or #2, go on to the next database, repeating cycle of the SQL tasks above for the next database in the task. For example, this logic goes like:

1. Back up master database; if fails, send email in SQL task; if either task is successful, goto database #2;

2. Back up model database; ...<etc>.

My problem is the current database set in @db_name. I apparently need to reset this variable for each database that gets backed up, and I can't seem to get these set as values to be passed from SQL Task #1 to SQL Task #2. Any suggestions on how I might achieve this?

- Jonathan

View 1 Replies View Related

Sendmail Task From Address From A Database In SSIS Package.

Apr 16, 2008

Hi,
I have a sendmail task in my ssis package. In the From field, if i hardcode my from and to address as user@company.com it works fine and mail is sent. But i want to read the from and to values from a database table. SO i defined the package level variables and getting the values into the variables. SO at From if i specify the variable name it gives a compiel time error"the address in th from line is mal formed. it is either missing @ character or not valid".
how do i specify teh variable for from address? I feel, may be i can use expression, but i don't know how to do that.
Can anyone help me with this?

Thanks in advance,

View 7 Replies View Related

How Can I Find A Column's DataType And Size.

Jan 21, 2007

hi ,How can I find  sql Datatype (like NVARCHAR , DESIMAL & .. ) and size of columns  and  also is it Identity or not in a Table of SQl server?

View 4 Replies View Related

Changing Table Column Size

Mar 2, 2004

I'm new to mssql.

I need to change the size of a column of a table from char(255) to char(500). I used the line:

alter table table_name alter column column_name char(500)

When I run that command, I get a message that it was sucessful. However, when I try to enter data into the changed column, the number of characters I can enter is still 255. I check the information schema for the column and the 'character_maximum_length' field is 500.

What is the problem here? Is the maximum allowable length for char 255? How can I get a column to have 500 characters?

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved