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 Wanet Telecoms Ltd 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: *

  • Users: bjr149
  • Content: Threads
  • Order by date
  1. bjr149

    Query for max record

    I have a list like this. RC1 RC1001 RC999 When i run a MAX function it returns me the RC999 record when it should be returning me the 1001 records. Is there a way to run the Max function and skip the first 2 letters of the record?
  2. bjr149

    Query Tables with Record Count

    I know this query is out there. Im looking to query a whole database and return a list of all tables with the count of records in each. Is this possible?
  3. bjr149

    Deleting old Records

    I need to have a method in place to delete old records off of a staging table. I have this code that works for records that are over 4 months old delete from vcsv_payment_stage where time_moved < dateadd(mm, -4, getdate()) I want to extend this to years.. Is it just yy instead of mm??
  4. bjr149

    Formatting a String

    I have a string thats 50 characters. If the length of the string is 14 then i can take the first 14 characters. Which works fine... set @InvoiceLength = LEN(@InvoiceNumber) If @InvoiceLength < 15 begin set @InvoiceNumberFormatted = SUBSTRING(@InvoiceNumber,1,14) End If the String...
  5. bjr149

    Leading Zeroes

    I have this command : convert(varchar(3),@Counter) As i do this i want to put leading zeroes on the string. So if counter is 5, i want it to print out 005. Thanks for the help
  6. bjr149

    BCP utility help

    bcp "select AssetLocations,SerialNumbers from AP_Payment_Push_Hold" queryout "D:\TEST.TXT" -f "D:\format.txt" -r "\n" -S ******* -U ***** -P ***** Im printing this to a text file, and on the SerialNumbers field for the field terminator i put a "\n". The problem is it actuall prints the end of...
  7. bjr149

    Cutting off text field

    In my table the field length is 6000. I take this data and dump it to a text file. The problem is when i dump the record to the table it cuts it off. It cuts off every record to this length and i cant figure out why. The destination fields are ok stating 6000 characters. Here is the field...
  8. bjr149

    IE Disable Buttons Through ASP

    Can you disable the back button on the internet explorer bar for a session through asp code?
  9. bjr149

    Deleting records that are 2 months old

    I have a table full of records with a datetime variable. I want to do maintenance on the table, and delete reocrds from that table that are 2 months old. i want to compare the field with the time the record was written (eg. 3/20/2006 7:56:29 AM), to the current time if its more than 2 months...
  10. bjr149

    VB.net Loop, Looking for a file

    Im trying to write a program that will continually look for a file every say 5 minutes. Once it finds the file it will do some sort of processing. I think im just having a brainfart. The way i do it now it endlessly loops to start and everything freezes lol. Here is how im thinking of hnadling...
  11. bjr149

    Formatting a String into a certain Datetime Format

    Im reading in a date from a table as a varchar (50) an example of the string is. Feb 7 2006 7:00PM I want to update the same field in the table with a new formatted date. One like 02/07/2006. Heres my code. The supplier formats correctly filling with zeros. But nothing happens with my date...
  12. bjr149

    Formatting a Datetime

    Im reading in a date from a table as a varchar (50) an example of the string is. Feb 7 2006 7:00PM I want to update the same field in the table with a new formatted date. One like 02/07/2006. Heres my code. The supplier formats correctly filling with zeros. But nothing happens with my date...
  13. bjr149

    DTS Export to CSV

    i have a sever connection and a text file destination. I double click on the black line to set up transformation. The options tab has so you can export to comma seperated columns. When i run it, it doesnt seperate the columns with a comma. Also i want my text qualified with double quotes, which...
  14. bjr149

    Reading a Stored Procedure back to Vb.net

    Ok my code works great, and it returns what it needs to. Except something weird is happening when i print out the table from vb.net. This is what the stored procedure give me when i run it with the params in SQL query analyzer. 1000.0000 1 1000.0000 1 1000.0000 1...
  15. bjr149

    executing a stored procedure

    When i exec my SQl server 2000 stored procedure in SQL server it gives me a table with like 10 entries. when i execute using datareader in VB, it gives me for Console.WriteLine(drAuthors.FieldCount) = 4 which is correct but when i try to loop through the record set there is not records? VB...
  16. bjr149

    About DTS

    1 question. Say if i create a text file with a record, can i use DTS to do this. 1) Get the file from the mainframe server, or on the actual server 2) loop while not eof in a txt file 3) use record 1 to run a UPDATE query on table 1 4) use record 1 to run a UPDATE query on table 2 5) use record...

Part and Inventory Search

Back
Top