Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi ,

i want a create a qry for this

PART    SRNO    New_SRNO
64  3   1
64  4A  2A
64  4B  2B
64  5A  3A
64  5B  3B
66  1   1
66  2   2
66  3   3
66  4   4
66  5A  5A
66  5B  5B
68  1   1
68  3A  2A
68  3B  2B
68  4   3


out put like NEW_SRNO.
I have different part of seq nob. that have assign a sr no but i want outout like to show u on new_srno like.

[edit]SHOUTING removed, Code block added - OriginalGriff[/edit]
Posted
Updated 2-Jan-14 9:43am
v3
Comments
OriginalGriff 2-Jan-14 6:43am    
DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalisation if you want to be taken seriously.
Kornfeld Eliyahu Peter 2-Jan-14 6:43am    
1. Don't SHOUT AT US
2. Improve your question - it's not clear at all
W Balboos, GHB 2-Jan-14 10:27am    
Also, consider using real words: you not u or did you mean 'up' ?; query not qry
You're neither texting a buddy nor tweeting.

As for your question: when you say you want to create output to show 'u on new_SRNO like' - do you mean the format (left justified) ? Perhaps if you supplied your original SQL query it would clarify things.

1 solution

If your numbers are multi part in the DB, you can join them, as in select 'S' + id as NewSRNO, or, select id + letter as NewSRNO.

Beyond that, your question is nonsensical. For it to make sense, you need to tell us the data in your DB, and the result you want, including the table structure you're starting with, and if it's not immediately apparent, how the end result relates to the data. I can't see any relation ship between SRNO and New_SRNO in what you posted.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900