Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Larrabbb

    exec cmdshell from sp

    One other thing, when you run the above SQL, it actually errors out, but it still writes the file to the location. Not for sure why it does that.
  2. Larrabbb

    exec cmdshell from sp

    I had a problem after this, and had to work with our IP engineer to figure out how I could do this. I got it to write a file using the SQL, but when I did it from a SP, it still wouldn't work. Evidently there is a bug in SQL server. Here is the workaround that I ended up using(although I am...
  3. Larrabbb

    exec cmdshell from sp

    I have dbname.dbo.contacts in my query and it still is giving me the same recordset without creating records. Here is the complete recordset that is labeled output: usage: bcp {dbtable | query} {in | out | queryout | format} datafile [-m maxerrors] [-f formatfile] [-e...
  4. Larrabbb

    exec cmdshell from sp

    I am trying to get the following sp to work: CREATE PROCEDURE BulkCopy AS declare @FileName varchar(100) declare @string varchar(1000) SET @filename = 'C:\test'+CONVERT(char(8),GETDATE(),10)+'.txt' SET @string='bcp "select name, count(recordid) as categorization from contacts where...
  5. Larrabbb

    trouble with non distinct records

    Thanks guys for your help. There are still a few records that are being returned that aren't unique(see my last post), but after some thought, I've decided that returning those records is OK for now. I may be back on here again in a month or two when I have to run some different queries using...
  6. Larrabbb

    trouble with non distinct records

    OK, that helped. Here is what I used: SELECT distinct(a.MessageID), b.ActionDateLast, a. etcetera FROM Actions a JOIN LatestActions b ON a.MessageID = b.MessageID now my problem is this...take a look back at the original record set. In that recordset, there is a field that is...
  7. Larrabbb

    trouble with non distinct records

    I am having some problems filtering some records that aren't distinct. Here is my scenario: Example record set in this format: MessageID, ReceiveDate, ActionDate1, ActionDate2, SendDate, Name, Code, Description Here is 6 records from the table I am pulling from. Notice some have same...
  8. Larrabbb

    I want to return a data set that co

    I am using SQL Server 2000, and I want to return a data set that consists of the following Chan1 Chan2 Apr 116 1 May 112 5 Here is the aggregate table that I am pulling from: CatID Channel mth Disp_mth yr vol 3502 Chan1 4 April 2003 116 3502 Chan2 4 April 2003 1 3502...
  9. Larrabbb

    Difficult record set return

    I want to return a data set that consists of the following Chan1 Chan2 Apr 116 1 May 112 5 Here is the data set that I am pulling from CatID Channel mth Disp_mth yr vol 3502 Chan1 4 April 2003 116 3502 Chan2 4 April 2003 1 3502 Chan1 4 May 2003 112...

Part and Inventory Search

Back
Top