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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by stapet

  1. stapet

    Query help?

    I found it....thanks anyway everybody. I had to change my select statement to.. SELECT Prdctnentry.WorkOrderNo, Prdctnentry.MachineAmount AS MAmount, GRASSLAND_dbo_PT_CaseLot.LotSize, Prdctnentry.Date FROM Prdctnentry LEFT JOIN GRASSLAND_dbo_PT_CaseLot ON Prdctnentry.WorkOrderNo =...
  2. stapet

    Query help?

    Can someone please help with what I am doing wrong here? I'm not an expert programmer, but do try hard... :) SELECT Prdctnentry.WorkOrderNo, Prdctnentry.MachineAmount, GRASSLAND_dbo_PT_CaseLot.LotSize, Prdctnentry.Date FROM Prdctnentry LEFT JOIN GRASSLAND_dbo_PT_CaseLot ON...
  3. stapet

    Passing parameter values to a SQL 2005 where statement

    Never mind.... I had forgot a ). This seems to work great! But could you still explain what is happening on that line of code? Thanks a bunch!!!
  4. stapet

    Passing parameter values to a SQL 2005 where statement

    Yes, It was working in 2000. Can you explain this part of the query for me? (@begInvDate IS NULL OR @endInvDate IS NULL) Is that checking to see if @begInvDate and @endInvDate is null? I'm not understanding the purpose of that statement. When I changed this I get data with invoice dates...
  5. stapet

    Passing parameter values to a SQL 2005 where statement

    Hello all....I am stumped! I recently upgraded from SQL Ser ver 2000 to SQL Server 2005. I change to some code in one of my Stored Procedures after the upgrade and found that passing a parameter value to a WHERE statement no longer works. I have been researching this for 2 days, and not sure how...
  6. stapet

    Problem with newline character in SP.

    Thanks BlueStringPudding! It worked great! I'm not really sure if a DTS package would work or not. I haven't worked with them enough, but I will look in to it. I appreciate the suggestion.
  7. stapet

    bcp creating a file with one query not with other?

    sorry , i did not mean to post the previous message here.
  8. stapet

    Problem with newline character in SP.

    SET @UploadDir = ‘\\MyServer\data\’ SET @UploadFileName = ‘test.txt’ SET @UploadData = ' echo ' + @HoldRecNo + ',' + @Name + ',' + @Terms + ',' + @Description + ',' + CONVERT(char(8), @DueDate,1) + ',' + CONVERT(char(8), @PayDate,1) + ',' + CONVERT(varchar(15), @Amount) + ',' + @InvoiceNo + ','...
  9. stapet

    bcp creating a file with one query not with other?

    Problem with newline character in SP. SET @UploadDir = ‘\\MyServer\data\’ SET @UploadFileName = ‘test.txt’ SET @UploadData = ' echo ' + @HoldRecNo + ',' + @Name + ',' + @Terms + ',' + @Description + ',' + CONVERT(char(8), @DueDate,1) + ',' + CONVERT(char(8), @PayDate,1) + ',' +...
  10. stapet

    Check if text file is empty

    Thanks donutman. That worked great. Here's a star!
  11. stapet

    Check if text file is empty

    I'm a newbie. Maybe I need to be more clear, sorry about that. I am using SQL Server 2000. This is what my SP looks like: CREATE PROCEDURE [dbo].[USP_Advances]@Name varchar(100), @No varchar(50), @DueDate datetime, @PayDate datetime, @Amount numeric...
  12. stapet

    Check if text file is empty

    Does anyone know how to check a text file to see if contains data. I am currently writing to a text file, but everytime I write I overwrite what is in the file all ready. Thanks
  13. stapet

    Saving SP Query results to a text file

    Thanks for taking a look. I changed the SP to just output the variables I'm passing, instead of saving them to a temp table and then outputting. I appreciate the help.
  14. stapet

    Saving SP Query results to a text file

    Hello, I am having trouble with my stored procedure. Any help would be appreciated. I am passing parameters to a SP, inserting them into a temp table and then selecting all from the temp table to save to a text file. Here is my code: SET @UploadDir = '\\MyServer\testdata\' SET @UploadFileName...
  15. stapet

    Create trigger to write to text file

    Could you please explain the following part of the command: 'osql -S(local) -dclaire -Q"select @ from testa" -E >C:\text.txt' I do understand the "select @ from testa". I have tried to play with this command(in the Query Analyzer), but I can't get anything to show up in my text file. I am...

Part and Inventory Search

Back
Top