Thread: Query Problem
View Single Post
  #1 (permalink)  
Old October 19th, 2003, 01:35 AM
mateenmohd mateenmohd is offline
Friend of Wrox
 
Join Date: Jun 2003
Location: abu dbabi, , United Arab Emirates.
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default Query Problem

I have data like this
Table Name’s DATA
data type is int

FromNode ToNode Volume
10011 10010 1353
10011 10012 47
10012 10018 243
10011 10012 50
10015 10014 377
10011 10016 976
10011 10018 0
10012 2755 1586
………… and so on……….. thousand of records in sql server table

How can retrieve the data from the above table
if last character of FROMNODE column is 1 and last character of TONODE column is 0 to display value 1353.

If last character of FROMNODE column is 1 and last character of TONODE column is 2 to display 47

If last character of FROMNODE column is 2 and last character of TONODE column is 8 to display 243

If last character of FROMNODE column is 1 and last character of TONODE column is 2 to display 50 and so on……

What programming query, function will use to retrieve the data from the above table ?
Last value of FROMNODE and TONODE column always between 1,2,3,4,5,6,7 or 8.

Please help

Mateen
Reply With Quote