How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask Aitizaz Your Own Question

Aitizaz
Aitizaz, Software Engineer
Category: Programming
Satisfied Customers: 1289
Experience:  2 Years of experience with VC#,VC++,C,C++
17531195
Type Your Programming Question Here...
Aitizaz is online now
A new question is answered every 9 seconds

How to order based on their value c1 c2 c3 c4 6 5 1 2 9 3 2

Customer Question

how to order based on their value
c1 c2 c3 c4
6 5 1 2
9 3 2 5
8 2 7 3
how to get this results
c1 c2 c3 c4 results
6 5 1 2 1-2-5-6
9 3 2 5 2-3-5-9
8 2 7 3 2-3-7-9
Submitted: 1 year ago.
Category: Programming
Expert:  Aitizaz replied 1 year ago.

Hello and welcome to Just Answer! I am Aitizaz and i will assist you today.

can you tell me the criteria for ordering these values? Also, do you want the result in plain SQL or you are using some software like SQL server etc.?

Customer: replied 1 year ago.
well i have gridview where this will be as part of the columns that gets displayed
so i want that under query select statment
here the question again
column1 column2 column3 column4
8 7 9 1
6 3 1 2
5 2 4 3
8 6 3 1
so the answer should be
column1 column2 column3 column4 column5
8 7 9 1 1-7-8-9
6 3 1 2 1-2-3-6
5 2 4 3 2-3-4-5
8 6 3 1 1-3-6-8
Customer: replied 1 year ago.
column1 column2 column3 column4
8 7 9 1
6 3 1 2
5 2 4 3
8 6 3 1so the answer should be
column1 column2 column3 column4 column5
8 7 9 1 1-7-8-9
6 3 1 2 1-2-3-6
5 2 4 3 2-3-4-5
8 6 3 1 1-3-6-8
Customer: replied 1 year ago.
column 5 will order each row from minimum value to max and concatenate them
Expert:  Aitizaz replied 1 year ago.

minimum value in this case is -9 but you have started off with the value of 8

can you please put these columns in tabular form here so that i may understand it more easily?

Customer: replied 1 year ago.
im using c# ***** i want this to be displayed undergridview
Expert:  Aitizaz replied 1 year ago.

can you put these values in a table ( may be in MS word) and upload the file here so that i have a clear understanding of the situation

Customer: replied 1 year ago.
dash doesnt count the columns have integer values so order columns5 is having a concatenation for this columns reflecting
these columns value orders
Expert:  Aitizaz replied 1 year ago.

with your permission, i will re-iterate that kindly provide me the values in tabular form in an MS WORD or MS EXCEL format along with column5 and the logic with each row

Customer: replied 1 year ago.
i attached the question,sorry i couldnt accpt the call becuase it gonna be pricy for me
Expert:  Aitizaz replied 1 year ago.

no problem. let me check and i will get back to you in a while

Expert:  Aitizaz replied 1 year ago.

Right. so now i understand the query. This basically needs to be implemented row wise. can you hand over the C# ***** so that i may have a look at it to get the exact idea of data handling?

Expert:  Aitizaz replied 1 year ago.

or you just want me to write the query / SQL statement for column5 which you will incorporate yourself?

Customer: replied 1 year ago.
u look at column1 ,column2,column3 ,column4 and then order them and concatenate them(so column 5 have concatention not minus sign)
its as Atizaz-software not atizaz minus software
Expert:  Aitizaz replied 1 year ago.

i understand that

Expert:  Aitizaz replied 1 year ago.

please give me some time to work on it.

Expert:  Aitizaz replied 1 year ago.

do we have 2-3 hours?

Customer: replied 1 year ago.
u have till monday 5 am ,but try before that
Expert:  Aitizaz replied 1 year ago.

thank you very much. i will get back to you soon with a solution.

Customer: replied 1 year ago.
thank u
Expert:  Aitizaz replied 1 year ago.

Pleasure!

Expert:  Aitizaz replied 1 year ago.

hello! is the data stored in database or it in only available in datagrid (static values) ?

Customer: replied 1 year ago.
the data is stored in a database ,the data grid is just to display the data ,the grid will not be used to do functionality as sort or anything
Customer: replied 1 year ago.
email me at***@******.***
if u have any question
Customer: replied 1 year ago.
do think pivot can solve it
by finding minimum
select case
when a<=b and b<=c and c<=d then a
when b<=c and c<=d then b
when c<=d then c
else d
end as min_n
Pivot on that to get
minco1 micol2 and concatenate them
i dont know i asked you this could be solution if u couldnt find any ,hopefully u found solution ,still pivot style didnt work with me thats y i told u
Customer: replied 1 year ago.
its past 5 am.
are u close to anything
Customer: replied 1 year ago.
hay i got funny guy who respond use when case as a reply
no more than that ,
Expert:  Aitizaz replied 1 year ago.

Hello! do you still want me to work on it please?

Expert:  Aitizaz replied 1 year ago.

actually i did not work on it, waiting for your reply

Expert:  Aitizaz replied 1 year ago.

now as the requirement is clear, i will take not much time to develope it. can you share the database with me so that i may work directly on it?

Customer: replied 1 year ago.
oh sir someone from differnet site replied
i waited for u but i understand im programmer too and poor like hill.
thanks again

Related Programming Questions