Viewing 15 posts - 1,036 through 1,050 (of 1,085 total)
This may work for you:
CREATE TABLE #tbl1( VoucherNum varchar(10),
PaymentDate smalldatetime)
INSERT INTO #tbl1( VoucherNum, PaymentDate)
SELECT 'ABC123', '12/31/2004'
INSERT INTO #tbl1( VoucherNum, PaymentDate)
SELECT 'ABC123', '12/25/2003'
INSERT INTO...
December 22, 2004 at 11:58 am
It looks like every three records comprise the one record you want. If that is not true, you will probably need to create some vicious flow control, (i.e., IF... BEGIN/END ...
December 17, 2004 at 6:43 pm
I believe the mixing of varchar with integer in the first case is your problem. If you try this with @ID as a varchar, it should work.
December 17, 2004 at 6:26 pm
Try this, (I used your data):
CREATE TABLE #Account( AccountNum int,
EffEndDate datetime,
EffBeginDate datetime)
INSERT INTO #Account
SELECT 4000331, '8/1/2004', '7/31/2005'
INSERT INTO #Account
SELECT 4000331, '8/1/2003', '7/31/2004'
INSERT...
December 14, 2004 at 9:13 am
This may be a better solution since you only want to convert those records that aren't already UPPER case. I am assuming the first character may be UPPER case, but...
December 13, 2004 at 11:43 am
I just checked this again and the WHERE statement may prevent Updating
December 13, 2004 at 11:38 am
Here is a script to look for and potentially update all fields which meet your needs.
I have commented out the Execute statement so you can see what will happen. ...
December 13, 2004 at 11:19 am
I will look this weekend, but I have a dynamic SQL script that includes an ALTER TABLE and loops through a table, (or two) to generate something like what I...
December 10, 2004 at 3:57 pm
I live in Maryland near Washington, DC. I don't ski anymore - back surgery (don't ask... it was crappy). I have been to Whistler though. BEAUTIFUL!
Hopefully with three airports...
December 8, 2004 at 11:13 am
I know.., I know. But I am contracting and did not expect to get the time off. Oil well. Maybe the lust for money will get some travel agency to...
December 7, 2004 at 5:21 pm
Try this:
SELECT SerialNumber, PassFail,
CASE
WHEN [PassFail] = 1
THE 'Pass'
ELSE 'Fail'
END AS Expr1
FROM TestLog
(Note, this does not include any test for a NULL or...
December 6, 2004 at 12:32 pm
I am sorry. You did say it was a char(10) field.
I tried this with a char(10) and it worked fine.
November 23, 2004 at 1:02 pm
It looks like you are trying to insert into a char or varchar field from the code, but I am guessing this is actually a numeric field.
try multiplying Longitude...
November 23, 2004 at 12:57 pm
I had a great deal of difficulty with this; I was trying to populate variables in which the name would change dynamic (via a loop) and hence the value would...
November 22, 2004 at 4:09 pm
If the Project Number will "always" contain this format, then you should be able to use the following within your nested SELECT (Q1)
WHERE SUBSTRING( Col004, 5, 1) = '-'...
November 17, 2004 at 4:15 pm
Viewing 15 posts - 1,036 through 1,050 (of 1,085 total)