Hi AceMan,
I tried those changes and it works perfectly, can't believe I forgot about the Nz function! Thank you very much for all of your help, it is greatly appreciated!
Ok, I'm back with my ugly stored procedure. The looping problem has been solved, but I've ran into another roadblock. As I loop incrementally through records in a temp table, I insert new records to fill in the gaps. Here's that snippet of code:
INSERT INTO #TEMP1...
Found the problem - forgot the return statement at the end of the loops!
I'd still be interested in hearing of alternatives ways to do this, but I think I'm stuck with it for a while!
On a post at http://www.tek-tips.com/viewthread.cfm?qid=926902, DSect pasted some code to loop through a recordset. I understand that looping tends to be pretty hard on the server, but so far this is the only solution I've been able to identify. Unfortunately (and, of course), I have a problem...
True. In this case, security isn't an issue as the file will be mailed out to a distribution.
I changed the output destination to the network, and now sendmail picks it up.
Thanks for your help!
Woops, that would explain it. Well, the file is on my local machine. Is there any way to use sendmail to attach a file from my PC?
Otherwise, I'm thinking I could load it to a server, something like @attachments = '\\Servername\Director\File.snp'
Having trouble sending an attachment from the query analyzer using xp_sendmail. Here's my code:
EXEC master..xp_sendmail @recipients = 'me@mymail.com',
@subject = 'Snapshot',
@attachments = 'c:\Off-Line\Snapshot\rpt_Snapshot.snp'
I receive the error "xp_sendmail: failed with mail error...
Make sure you keep your server admin nearby. We didn't set up the eadmin LAN account as an administrator, so we had to pull the admin in several times to grant full control rights to the eadmin log-in on several occasions.
Hopefully you've sent someone to Georgia for the four-day training...
Just for fits and giggles, I modified my where clause to the following:
WHERE DATE_TIME >= '2005-10-01'
This query pulled 438,372 records in 18 minutes and 26 seconds.
I'm now not so sure that indexing is the primary problem here.
At any rate, while this solution isn't ideal in my...
And that, I'm afraid, is the problem. I haven't been able to find an alternative to DATEADD or DATEPART.
All I've been able to find so far is the CURDATE() function.
Thanks for the feedback, though.
Be interested in hearing from anyone out there's who run into similar problems using Simba SQL.
SQLDenis,
I apologize, I left the underscore in the DATEADD function. I am attempting to use
WHERE DATE_TIME >= DATEADD(d, -1, GETDATE())
when receiving that error. I know the syntax is correct because I've used such queries elsewhere (plus, they appropriate keywords change color).
I...
Hi all,
I have a DTS package pulling data from TotalView's IEX database. While I haven't been able to get a straight answer on the type of database IEX uses, I can tell you that my DSN uses the Simba Client driver.
I am having a problem querying records by date. Specifically, I am pulling...
Well, it's official: I'm an idiot. In the DTS file properties I was misreading "row delimiter" as "column delimiter," and changing it to "|" instead of leaving it defaulted to CRLF.
<SIGH>
Thanks for making me think! I think it's time to go home...
Denis,
I'm not quite sure what the row terminator is. I'm exporting from Avaya's Site Administration utility to a text file. Avaya does prompt for field delimiters and text qualifiers, and also allows exporting of column heads, but does not prompt for a row terminator.
Interestingly enough...
Afternoon,
Having a problem importing a text file using DTS. I have not run into this before.
My source is a pipe-delimited file with no text qualifiers. Sample of the data:
Extension|Name|Vector Number|Measured|Acceptable Service Level|BSR Application|BSR Agent Strategy...
Thanks for your replies. I think you're right, I'll have to do it this way. I guess I just hate the fact that I can't reduce the primary table to all numeric values!
I am creating a database that will outline call routing for thousands of toll-free numbers. My data looks like this:
Policy # Account Name Toll Free Number
11111 ABC Company 800-111-2222
22222 DEF Corp 805-111-3333
Of course, there are about 40 additional columns of data...
Ok, now I'm even more confused... and getting rather irritated. Decided to get rid of this and go back to my earlier transform, as follows:
' Copy each source column to the destination column
Function Main()
DTSDestination("numSite_fk") = 5
Main = DTSTransformStat_OK
End Function
Saved...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.