Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
ugpjava
Starting Member
4 Posts |
Posted - 2005-09-07 : 05:14:00
|
| combine colums when retrieving the rows...i.e: To get something like this... A101 A102 A103 ... ..i create a DB (autoTest) with 2-columns (Symbol & Value)Value field use identity...//// ResultSet r=s.executeQuery("select *from autoTest"); while(r.next()){ String symbol=r.getString(4); String num=r.getString(2); txt1.setText(?????); //here i need to set the output to a textfield.like A100 } |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-09-07 : 07:02:43
|
| SELECT Symbol + CAST(Value as varchar(20)) FROM autoTestIf either is NULL then the result for that row will be NULLKristen |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-09-08 : 02:07:09
|
| You can also do the same in your application using Str(or equivalent) functiontxt1.setText(symbol+num)ortxt1.setText(symbol+str(num))Because you have assigned those two to string data types, you can combine themMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|