I'm currently using SQL Server 2005. Sometimes, when I export a file in delimited format, there are trailing spaces included in some of the fields. Is that a bug? Doesn't exporting in delimited format normally trim the trailing spaces? If not, is there an easy way to trim every field without...
I found this macro on the internet that allows me to use interactive checkboxes in my Word document without having to protect the document. The only problem is that when I double-click on an unchecked box, it turns to a checked box but I can't double-click on it again to turn back to an...
I have a table called MASTER with 10K records:
id segment
123 A
346 B
478 B
316 A
I have another table called URLS_A with 6K records. This table has only one field "URL" -- every record has a unique URL value assigned to it.
I have another table called URLS_B...
Okay, I figured out the problem. The quotes within the quotes was the problem. Here is a total revised script in case anyone is interested.
Option Explicit
Dim strFileSourcePath, strFileTargetPath, objFSOSource, objFSOTarget, fso, objFilesSource, objFilesTarget, strCurrentLine
Const...
Thank you tsuji! I am getting a compilation error still. Any clue what's wrong? Also, should the "If" statement be based on "and" instead of "or"?
Dim fso As Object
Dim tsOld As Object
Dim tsNew As Object
Dim strLine As String
Const ForReading = 1
Const ForWriting = 2
Set fso =...
I don't know if VBScript is the best solution for my problem so feel free to suggest other options. I have a text file containing 100K+ records. I would like to delete all rows in the file that start with a space or double-quotes (") or the words "Grand Total". Would a VBScript be the best...
Here is what I'm starting with (which I copied from some other posting):
Sub Highlight1()
[G3].Activate
With Range([f1], [f65536].End(xlUp)).EntireRow
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$f1=""Full-Line"""...
I'm not sure if this is the right forum, but I need help with an Excel Macro. I'm interested in creating a macro that will go through column A of a spreadsheet. If the value in column A equals "Total" (not case-sensitive), then the macro will highlight the entire row in yellow. Could anyone...
I have a cross-tab SQL function that is dynamic -- the number of rows and columns can vary each time I run it. Is there a way to output the results to an excel or csv/txt file through DTS given the dynamic rows & columns?
I was wondering if anyone could be so kind to help me create a user-defined function that would do the following:
The function would take an input number from 1 to 9999999 and spit out every possible letter combination of these numbers based on the number-to-letter equivalents displayed on...
I have a DTS package that runs a query and creates an output file (with header). I'd like to know if there's a way to modify the package so that the output file is deleted if the query produces zero results.
The reason I'm trying to do this is because the output file gets e-mailed to me to...
I need help figuring out how to do the following:
I have a table that I want to remove duplicate records. However, my definition of a duplicate is any record that has the same Agent_ID and ANI values, but also have a Call_Date value that is within 1 hour of each other. (Call_Date is a...
I guess my definition of "running on its own" is that I've saved the project in Outlook and I have Outlook open running. Isn't the macro supposed to run automatically while I have Outlook open? Or is that a wrong assumption?
I am totally new to Visual Basic and VBA. I created a Sub in ThisOutlookSession that takes any unread messages in a particular folder in my Inbox and downloads the attachment to a couple of places on the network. When I run the macro manually, it runs fine. When I let it run on its own in...
In my DTS package, I have a step that zips a file in a certain directory and another step that places the zipped file on the ftp. The 2nd step occurs upon completion of the 1st step. When I run the package, it runs fine. However, when I download the file from the ftp site and try to unzip it...
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.