Query Problem

1. Member
Join Date
Dec 1969
Posts
33

Query Problem

I have data like this<BR>Table Name’s DATA<BR>Data type int<BR><BR>FromNode ToNode Volume<BR>10011 10010 1353<BR>10011 10012 47<BR>10012 10018 243<BR>10011 10012 50<BR>10015 10014 377<BR>10011 10016 976<BR>10011 10018 0 <BR>10012 2755 1586<BR>………… and so on……….. thousand of records in sql server table<BR><BR>How can retrieve the data from the above table <BR>if last character of FROMNODE column is 1 and last character of TONODE column is 0 to display 1353.<BR><BR>If last character of FROMNODE column is 1 and last character of TONODE column is 2 to display 47<BR><BR>If last character of FROMNODE column is 2 and last character of TONODE column is 8 to display 243<BR><BR>If last character of FROMNODE column is 1 and last character of TONODE column is 2 to display 50 and so on……<BR><BR>What programming query, function will use to retrieve the data from the above table ?<BR>Last value of FROMNODE and TONODE column always between 1,2,3,4,5,6,7 or 8.<BR><BR>Please help<BR><BR>Mateen<BR><BR>

2. Senior Member
Join Date
Dec 1969
Posts
96,118

You make NO SENSE at all...

Look at what you wrote:<BR><BR>THINK about what you wrote:<BR><BR>...<BR><BR>If last character of FROMNODE column is 1 and last character of TONODE column is 2 to display 47<BR><BR>If last character of FROMNODE column is 1 and last character of TONODE column is 2 to display 50<BR>...<BR><BR>To summarize:<BR><BR>Last characters of<BR>FROMNODE TONODE display<BR> 1 2 47<BR> 1 2 50<BR><BR>So what do you want to happen? For the query to randomly choose either 47 or 50 when it gets 1 and 2 for those characters?<BR><BR>

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•