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?
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?
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??
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...
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
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...
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...
The reason why i need to disable the back button is because it screws up the application were running. All the navigation is supposed to be done within the UI screens. The problem is sometimes users accidentally hit the IE back button and it messes up their current session. Then they have to...
I noticed he said he liked this idea. "client-side JavaScript code to open a new window that doesn't have the toolbar."
I'd like to give this option a shot. How do i remove the toolbar for a new opened window?
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...
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...
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...
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.