Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 bizarre error in select, group by query. help?

Author  Topic 

arpoodle
Starting Member

3 Posts

Posted - 2005-08-23 : 05:52:10
I'm running the following query against a log table...

select max(id) from log_table where (timestamp > '2005-08-15' and timestamp < '2005-08-19') and (source=12345 or source =67890) group by anotherid order by anotherid

but I get the following error returned...

Server: Msg 248, Level 16, State 1, Line 1
The conversion of the varchar value '+441234567890' overflowed an int column. Maximum integer value exceeded.

this value that's overfowing an int column is in a column that I'm not selecting, not putting conditions on, nor am I asking it to convert anything to Int... I just want the maximum ID value, so why is it returning this error? (incidentally, the "timestamp" column is of the datetime datatype.. it's just been badly named; not by me I might add)

I'm a tad confused to say the least.

Regards

Andrew

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-08-23 : 06:12:27
Post the table structures and some sample data

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

arpoodle
Starting Member

3 Posts

Posted - 2005-08-23 : 06:37:54
I've obfusticated some of the data, but see below.

the "destination" column is phonenumbers, and it's this one that seems to be trying to be converted to INT

thanks

a

Table structure as follows:

[id] [int] NOT NULL
[messageId] [varchar] (34) NULL
[entryState] [varchar] (8) NULL
[source] [varchar] (15) NULL
[destination] [varchar] (15) NULL
[content] [varchar] (254) NULL
[networkId] [varchar] (11) NULL
[timestamp] [datetime] NULL
[gatewayId] [varchar] (26) NULL
[correlationId] [varchar] (23) NULL
[gatewayTransactionValue] [varchar] (12) NULL
[contentType] [varchar] (22) NULL
[userField1] [varchar] (7) NULL
[userField2] [varchar] (3) NULL
[userField3] [varchar] (3) NULL
[retry] [int] NULL
[application] [varchar] (10) NULL
[receiptstatus] [varchar] (255) NULL

create table here:

CREATE TABLE [dbo].[transaction_log] (
[id] [int] NOT NULL ,
[messageId] [varchar] (34) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[entryState] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[source] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[destination] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[content] [varchar] (254) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[networkId] [varchar] (11) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[timestamp] [datetime] NULL ,
[gatewayId] [varchar] (26) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[correlationId] [varchar] (23) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[gatewayTransactionValue] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[contentType] [varchar] (22) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[userField1] [varchar] (7) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[userField2] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[userField3] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[retry] [int] NULL ,
[application] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[receiptstatus] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO


sample data in CSV format

6797301,"00000105cbb34a3183c0a80c162be30f57","failed",12345,"YYX9Z13X6Z2Y","2/4 @ 1.50 (23:33 18/08/2005) Ring this number for service list","TMOBILEUK",23/08/2005 06:29:07,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",11,"Fireback","NULL"
6797302,"00000105959fb02a15c0a80c167d0a7ceb","failed",12345,"YYX98ZZ9396Y","4/4 @ 1.50 (11:32 08/08/2005) Access media on your phone","TMOBILEUK",23/08/2005 06:29:07,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",32,"Fireback","NULL"
6797303,"00000105cbb34dd588c0a80c162be30f57","failed",12345,"YYX9Z13X6Z2Y","3/4 @ 1.50 (23:33 18/08/2005) Send sms to number now for live chat","TMOBILEUK",23/08/2005 06:29:08,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",11,"Fireback","NULL"
6797304,"00000105959fa8580fc0a80c167d0a7ceb","failed",12345,"YYX98ZZ9396Y","2/4 @ 1.50 (11:32 08/08/2005) Ring this number for service list","TMOBILEUK",23/08/2005 06:29:08,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",32,"Fireback","NULL"
6797305,"00000105959fa46e0cc0a80c167d0a7ceb","failed",12345,"YYX98ZZ9396Y","Thank u 4 using our netrwork msg billed @ 1.50 1/4 (11:32 08/08/2005) No1 of 4 payment msgs 4 services requested.1 2 1 phone service descriptiuon","TMOBILEUK",23/08/2005 06:29:09,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",32,"Fireback","NULL"
6797306,"00000105959fac4212c0a80c167d0a7ceb","failed",12345,"YYX98ZZ9396Y","3/4 @ 1.50 (11:32 08/08/2005) Send sms to number now for live chat","TMOBILEUK",23/08/2005 06:29:09,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",32,"Fireback","NULL"
6797307,"00000105cbb351bf8dc0a80c162be30f57","failed",12345,"YYX9Z13X6Z2Y","4/4 @ 1.50 (23:33 18/08/2005) Access media on your phone","TMOBILEUK",23/08/2005 06:29:09,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",11,"Fireback","NULL"
6797308,"00000105db26e52797c0a80c1679bd0630","failed",12345,"YYX8X16X8902","Hi there","BTCELLNETUK",23/08/2005 06:29:14,"O2_LIVE_SEND",,"O2_SEND","text/plain",2,150,,5,"ChatClient","NULL"
6797309,"00000105d0d9f2bc01c0a80c1679bd0630","failed",12345,"YYX9132Y2963","2/4 @ 1.50 (23:34 19/08/2005) Ring this number for service list","TMOBILEUK",23/08/2005 06:29:15,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",9,"Fireback","NULL"
6797310,"00000105d0d9fa9007c0a80c1679bd0630","failed",12345,"YYX9132Y2963","4/4 @ 1.50 (23:34 19/08/2005) Access media on your phone","TMOBILEUK",23/08/2005 06:29:16,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",9,"Fireback","NULL"
6797311,"00000105b4868c3295c0a80c162be30f57","failed",67890,"YYX9Z0X206Y3","Hope you are enjoying your subscription","TMOBILEUK",23/08/2005 06:29:16,"TMobile",,"TMobile","text/plain",4,500,,20,"Prime","NULL"
6797312,"00000105d0d9eed2fec0a80c1679bd0630","failed",12345,"YYX9132Y2963","Thank u 4 using our netrwork msg billed @ 1.50 1/4 (23:34 19/08/2005) No1 of 4 payment msgs 4 services requested.1 2 1 phone service descriptiuon","TMOBILEUK",23/08/2005 06:29:17,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",9,"Fireback","NULL"
6797313,"00000105bc4030ce9bc0a80c162be30f57","failed",12345,"YYX903X12136","Thank u 4 using our netrwork msg billed @ 1.50 1/4 (23:33 15/08/2005) No1 of 4 payment msgs 4 services requested.1 2 1 phone service descriptiuon","TMOBILEUK",23/08/2005 06:29:17,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",17,"Fireback","NULL"
6797314,"00000105db26e21892c0a80c1679bd0630","failed",12345,"YYX9ZX6Y1836","2/4 @ 1.50 (23:34 21/08/2005) Ring this number for service list","TMOBILEUK",23/08/2005 06:29:18,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",5,"Fireback","NULL"
6797315,"00000105db26de348fc0a80c1679bd0630","failed",12345,"YYX9ZX6Y1836","Thank u 4 using our netrwork msg billed @ 1.50 1/4 (23:34 21/08/2005) No1 of 4 payment msgs 4 services requested.1 2 1 phone service descriptiuon","TMOBILEUK",23/08/2005 06:29:18,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",5,"Fireback","NULL"
6797316,"00000105db26e9ea9dc0a80c1679bd0630","failed",12345,"YYX9ZX6Y1836","4/4 @ 1.50 (23:34 21/08/2005) Access media on your phone","TMOBILEUK",23/08/2005 06:29:19,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",5,"Fireback","NULL"
6797317,"00000105cbb36d4ca2c0a80c162be30f57","failed",12345,"YYXXY2X62Y8Y","Thank u 4 using our netrwork msg billed @ 1.50 1/4 (23:33 18/08/2005) No1 of 4 payment msgs 4 services requested.1 2 1 phone service descriptiuon","BTCELLNETUK",23/08/2005 06:29:19,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",11,"Fireback","NULL"
6797318,"00000105cbb37131aac0a80c162be30f57","failed",12345,"YYXXY2X62Y8Y","2/4 @ 1.50 (23:33 18/08/2005) Ring this number for service list","BTCELLNETUK",23/08/2005 06:29:21,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",11,"Fireback","NULL"
6797319,"00000105cbb3751ab0c0a80c162be30f57","failed",12345,"YYXXY2X62Y8Y","3/4 @ 1.50 (23:33 18/08/2005) Send sms to number now for live chat","BTCELLNETUK",23/08/2005 06:29:21,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",11,"Fireback","NULL"
6797320,"00000105c68d28442fc0a80c162be30f57","failed",12345,"YYXXY33Y068X","2/4 @ 1.50 (23:33 17/08/2005) Ring this number for service list","BTCELLNETUK",23/08/2005 06:29:21,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",13,"Fireback","NULL"
6797321,"00000105c68d306137c0a80c162be30f57","failed",12345,"YYXXY33Y068X","4/4 @ 1.50 (23:33 17/08/2005) Access media on your phone","BTCELLNETUK",23/08/2005 06:29:22,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",13,"Fireback","NULL"
6797322,"00000105cbb37903b3c0a80c162be30f57","failed",12345,"YYXXY2X62Y8Y","4/4 @ 1.50 (23:33 18/08/2005) Access media on your phone","BTCELLNETUK",23/08/2005 06:29:23,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",11,"Fireback","NULL"
6797323,"00000105cbb37165acc0a80c162be30f57","failed",12345,"YYXX3298809Z","4/4 @ 1.50 (23:33 18/08/2005) Access media on your phone","BTCELLNETUK",23/08/2005 06:29:24,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",11,"Fireback","NULL"
6797324,"00000105c68d24642cc0a80c162be30f57","failed",12345,"YYXXY33Y068X","Thank u 4 using our service","BTCELLNETUK",23/08/2005 06:29:24,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",13,"Fireback","NULL"
6797325,"00000105bc403c8ba4c0a80c162be30f57","failed",12345,"YYX903X12136","4/4 @ 1.50 (23:33 15/08/2005) Access media on your phone","TMOBILEUK",23/08/2005 06:29:24,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",17,"Fireback","NULL"
6797326,"00000105bc4038a0a1c0a80c162be30f57","failed",12345,"YYX903X12136","3/4 @ 1.50 (23:33 15/08/2005) Send sms to number now for live chat","TMOBILEUK",23/08/2005 06:29:25,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",17,"Fireback","NULL"
6797327,"00000105c68d2c6e32c0a80c162be30f57","failed",12345,"YYXXY33Y068X","3/4 @ 1.50 (23:33 17/08/2005) Send sms to number now for live chat","BTCELLNETUK",23/08/2005 06:29:25,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",13,"Fireback","NULL"
6797328,"00000105db26e60099c0a80c1679bd0630","failed",12345,"YYX9ZX6Y1836","3/4 @ 1.50 (23:34 21/08/2005) Send sms to number now for live chat","TMOBILEUK",23/08/2005 06:29:25,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",5,"Fireback","NULL"
6797329,"00000105d0d9f6a504c0a80c1679bd0630","failed",12345,"YYX9132Y2963","3/4 @ 1.50 (23:34 19/08/2005) Send sms to number now for live chat","TMOBILEUK",23/08/2005 06:29:26,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",9,"Fireback","NULL"
6797330,"00000105d0da0c2013c0a80c1679bd0630","failed",12345,"YYX9810Y1829","3/4 @ 1.50 (23:34 19/08/2005) Send sms to number now for live chat","TMOBILEUK",23/08/2005 06:29:26,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",9,"Fireback","NULL"
6797331,"00000105d0da08370ec0a80c1679bd0630","failed",12345,"YYX9810Y1829","2/4 @ 1.50 (23:34 19/08/2005) Ring this number for service list","TMOBILEUK",23/08/2005 06:29:26,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",9,"Fireback","NULL"
6797332,"00000105d600732478c0a80c1679bd0630","failed",12345,"YYX9Z292X3X3","tell me what services you require","TMOBILEUK",23/08/2005 06:29:27,"TMobile",,"TMobile","text/plain",4,150,,7,"ChatClient","NULL"
6797333,"00000105bc4034b79ec0a80c162be30f57","failed",12345,"YYX903X12136","2/4 @ 1.50 (23:33 15/08/2005) Ring this number for service list","TMOBILEUK",23/08/2005 06:29:27,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",17,"Fireback","NULL"
6797334,"00000105aa397ab488c0a80c16129f9e2f","failed",12345,"YYXX63XYZ8ZZ","2/4 @ 1.50 (11:33 12/08/2005) Ring this number for service list","BTCELLNETUK",23/08/2005 06:29:30,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",24,"Fireback","NULL"
6797335,"00000105aa397e9c8bc0a80c16129f9e2f","failed",12345,"YYXX63XYZ8ZZ","3/4 @ 1.50 (11:33 12/08/2005) Send sms to number now for live chat","BTCELLNETUK",23/08/2005 06:29:31,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",24,"Fireback","NULL"
6797336,"00000105aa3976cf83c0a80c16129f9e2f","failed",12345,"YYXX63XYZ8ZZ","Thank u 4 using our netrwork msg billed @ 1.50 1/4 (11:33 12/08/2005) No1 of 4 payment msgs 4 services requested.1 2 1 phone service descriptiuon","BTCELLNETUK",23/08/2005 06:29:31,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",24,"Fireback","NULL"
6797337,"00000105b719f07e90c0a80c162be30f57","failed",12345,"YYXXY9269918","2/4 @ 1.50 (23:34 14/08/2005) Ring this number for service list","BTCELLNETUK",23/08/2005 06:29:32,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",19,"Fireback","NULL"
6797338,"00000105b719f47b93c0a80c162be30f57","failed",12345,"YYXXY9269918","3/4 @ 1.50 (23:34 14/08/2005) Send sms to number now for live chat","BTCELLNETUK",23/08/2005 06:29:32,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",19,"Fireback","NULL"
6797339,"00000105d0da100f1ec0a80c1679bd0630","failed",12345,"YYX9810Y1829","4/4 @ 1.50 (23:34 19/08/2005) Access media on your phone","TMOBILEUK",23/08/2005 06:29:33,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",9,"Fireback","NULL"
6797340,"00000105b719f85c96c0a80c162be30f57","failed",12345,"YYXXY9269918","4/4 @ 1.50 (23:34 14/08/2005) Access media on your phone","BTCELLNETUK",23/08/2005 06:29:33,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",19,"Fireback","NULL"
6797341,"00000105d0da266723c0a80c1679bd0630","failed",67890,"YYXX09Z9Z222","Hope you are enjoying your subscription","BTCELLNETUK",23/08/2005 06:29:33,"O2_LIVE_SEND",,"O2_SEND","text/plain",2,500,,9,"Prime","NULL"
6797342,"00000105c68d732b4cc0a80c162be30f57","failed",12345,"YYXX062Z920Z","4/4 @ 1.50 (23:34 17/08/2005) Access media on your phone","BTCELLNETUK",23/08/2005 06:29:34,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",13,"Fireback","NULL"
6797343,"00000105aa39828f8dc0a80c16129f9e2f","failed",12345,"YYXX63XYZ8ZZ","4/4 @ 1.50 (11:33 12/08/2005) Access media on your phone","BTCELLNETUK",23/08/2005 06:29:35,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",24,"Fireback","NULL"
6797344,"00000105e04dac60cfc0a80c1679bd0630","failed",12345,"YYXX06X00X33","2/4 @ 1.50 (23:35 22/08/2005) Ring this number for service list","BTCELLNETUK",23/08/2005 06:29:36,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",3,"Fireback","NULL"
6797345,"00000105930cee40e2c0a80c167d0a7ceb","failed",12345,"YYX98Y96X38X","Thank u 4 using our netrwork msg billed @ 1.50 1/4 (23:33 07/08/2005) No1 of 4 payment msgs 4 services requested.1 2 1 phone service descriptiuon","TMOBILEUK",23/08/2005 06:29:38,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",33,"Fireback","NULL"
6797346,"00000105e04db43ed9c0a80c1679bd0630","failed",12345,"YYXX06X00X33","4/4 @ 1.50 (23:35 22/08/2005) Access media on your phone","BTCELLNETUK",23/08/2005 06:29:41,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",3,"Fireback","NULL"
6797347,"00000105c68d6f4349c0a80c162be30f57","failed",12345,"YYXX062Z920Z","3/4 @ 1.50 (23:34 17/08/2005) Send sms to number now for live chat","BTCELLNETUK",23/08/2005 06:29:41,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",13,"Fireback","NULL"
6797348,"00000105c68d6b5b46c0a80c162be30f57","failed",12345,"YYXX062Z920Z","2/4 @ 1.50 (23:34 17/08/2005) Ring this number for service list","BTCELLNETUK",23/08/2005 06:29:42,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",13,"Fireback","NULL"
6797349,"00000105d8940761a5c0a80c1679bd0630","failed",12345,"YYX8X1Y98XY3","3/4 @ 1.50 (11:34 21/08/2005) Send sms to number now for live chat","BTCELLNETUK",23/08/2005 06:29:42,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",6,"Fireback","NULL"
6797350,"00000105d8941c63b3c0a80c1679bd0630","failed",12345,"YYXX069X68Z6","4/4 @ 1.50 (11:35 21/08/2005) Access media on your phone","BTCELLNETUK",23/08/2005 06:29:43,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",6,"Fireback","NULL"
6797351,"00000105d894037aa2c0a80c1679bd0630","failed",12345,"YYX8X1Y98XY3","2/4 @ 1.50 (11:34 21/08/2005) Ring this number for service list","BTCELLNETUK",23/08/2005 06:29:43,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",6,"Fireback","NULL"
6797352,"00000105d8941879b0c0a80c1679bd0630","failed",12345,"YYXX069X68Z6","3/4 @ 1.50 (11:35 21/08/2005) Send sms to number now for live chat","BTCELLNETUK",23/08/2005 06:29:44,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",6,"Fireback","NULL"
6797353,"00000105d8940b4aa8c0a80c1679bd0630","failed",12345,"YYX8X1Y98XY3","4/4 @ 1.50 (11:34 21/08/2005) Access media on your phone","BTCELLNETUK",23/08/2005 06:29:44,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",6,"Fireback","NULL"
6797354,"00000105930cf614f1c0a80c167d0a7ceb","failed",12345,"YYX98Y96X38X","3/4 @ 1.50 (23:33 07/08/2005) Send sms to number now for live chat","TMOBILEUK",23/08/2005 06:29:44,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",33,"Fireback","NULL"
6797355,"00000105930cf9fdf8c0a80c167d0a7ceb","failed",12345,"YYX98Y96X38X","4/4 @ 1.50 (23:33 07/08/2005) Access media on your phone","TMOBILEUK",23/08/2005 06:29:49,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",33,"Fireback","NULL"
6797356,"00000105e04ddb82f1c0a80c1679bd0630","failed",12345,"YYXXY6013383","3/4 @ 1.50 (23:35 22/08/2005) Send sms to number now for live chat","BTCELLNETUK",23/08/2005 06:29:50,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",3,"Fireback","NULL"
6797357,"00000105907a188654c0a80c167d0a7ceb","failed",67890,"YYX9Z0X206Y3","Hope you are enjoying your subscription","TMOBILEUK",23/08/2005 06:29:50,"TMobile",,"TMobile","text/plain",4,500,,34,"Prime","NULL"
6797358,"00000105e04ddf6bf6c0a80c1679bd0630","failed",12345,"YYXXY6013383","4/4 @ 1.50 (23:35 22/08/2005) Access media on your phone","BTCELLNETUK",23/08/2005 06:29:50,"O2_LIVE_SEND","NULL","O2_SEND","text/plain",2,"NULL","NULL",3,"Fireback","NULL"
6797359,"00000105930cf22aeac0a80c167d0a7ceb","failed",12345,"YYX98Y96X38X","2/4 @ 1.50 (23:33 07/08/2005) Ring this number for service list","TMOBILEUK",23/08/2005 06:29:50,"TMobile","NULL","TMobile","text/plain",4,"NULL","NULL",33,"Fireback","NULL"
6797360,"NULL","received","ZZ79X4ZZ86Y84","NULL","NULL","TMOBILEUK",23/08/2005 06:29:52,"TMobile","NULL","TMobile","text/vnd.ncl.receipt","NULL","NULL","NULL",0,"NULL","NULL"
6797361,"00000105c92115f03dc0a80c162be30f57","failed",12345,"YYXXYZ20288Y",".","BTCELLNETUK",23/08/2005 06:29:56,"O2_LIVE_SEND",,"O2_SEND","text/plain",2,150,,12,"ChatClient","NULL"
Go to Top of Page

arpoodle
Starting Member

3 Posts

Posted - 2005-08-23 : 10:32:47
Oh my dear god I'm an idiot!

I forgot to single quote the source values, so it was treating the full length phone numbers (eg +441234567890) as an integer, not a string, so was summing the varchar, and in doing so converting it to INT.

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-08-23 : 10:39:30
Well. Nice to know you solved the problem

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -