Discussion:
text numbers in a query
(too old to reply)
Eric Logan
2008-10-28 18:41:48 UTC
Permalink
possibly:
... and cast(textid as integer) between 200 and 300 ...
E.L.
How can I change this to get only the textid records between '200' and
'300' ?
Thanks
Larry Kinder
SELECT b.start, b.uid, a.textid, a.name ;
FROM cl_index A ;
JOIN call_identity B ON a.id = B.dbid ;
WHERE b.start between :DateTime1 and :DateTime2 ;
AND textid between '200' and '300' ;
ORDER BY b.start
start uid textid
10/27/2008 12:00:06 AM 3782305 203
10/27/2008 12:01:07 AM 3782312 213
10/27/2008 12:07:58 AM 3782328 257
10/27/2008 12:14:40 AM 3782345 257
10/27/2008 12:23:23 AM 3782356 213
10/27/2008 12:28:04 AM 3782357 273
10/27/2008 12:38:05 AM 3782360 2821
10/27/2008 03:14:21 AM 3782560 2869
10/27/2008 03:14:26 AM 3782561 2855
10/27/2008 03:36:03 AM 3782579 298
10/27/2008 03:36:58 AM 3782580 298
10/27/2008 03:37:26 AM 3782581 298
10/27/2008 05:00:19 AM 3782655 2819
10/27/2008 05:02:49 AM 3782666 233
10/27/2008 05:08:42 AM 3782669 2826
10/27/2008 05:19:49 AM 3782681 210
10/27/2008 05:36:58 AM 3782690 2816
10/27/2008 05:45:23 AM 3782699 290
10/27/2008 05:52:52 AM 3782708 225
--
270.843.4405
Larry Kinder
2008-10-28 22:21:52 UTC
Permalink
Thank you Eric,

I did not know I could that. Worked perfect.

Larry Kinder
Post by Eric Logan
... and cast(textid as integer) between 200 and 300 ...
E.L.
How can I change this to get only the textid records between '200' and
'300' ?
Thanks
Larry Kinder
SELECT b.start, b.uid, a.textid, a.name ;
FROM cl_index A ;
JOIN call_identity B ON a.id = B.dbid ;
WHERE b.start between :DateTime1 and :DateTime2 ;
AND textid between '200' and '300' ;
ORDER BY b.start
start uid textid
10/27/2008 12:00:06 AM 3782305 203
10/27/2008 12:01:07 AM 3782312 213
10/27/2008 12:07:58 AM 3782328 257
10/27/2008 12:14:40 AM 3782345 257
10/27/2008 12:23:23 AM 3782356 213
10/27/2008 12:28:04 AM 3782357 273
10/27/2008 12:38:05 AM 3782360 2821
10/27/2008 03:14:21 AM 3782560 2869
10/27/2008 03:14:26 AM 3782561 2855
10/27/2008 03:36:03 AM 3782579 298
10/27/2008 03:36:58 AM 3782580 298
10/27/2008 03:37:26 AM 3782581 298
10/27/2008 05:00:19 AM 3782655 2819
10/27/2008 05:02:49 AM 3782666 233
10/27/2008 05:08:42 AM 3782669 2826
10/27/2008 05:19:49 AM 3782681 210
10/27/2008 05:36:58 AM 3782690 2816
10/27/2008 05:45:23 AM 3782699 290
10/27/2008 05:52:52 AM 3782708 225
--
270.843.4405
Loading...