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 |
knockyo
Yak Posting Veteran
83 Posts |
Posted - 2007-06-03 : 14:05:27
|
Below is my TableA, but i dont want show the P001, P002, ...... for the my datagrid headerbecause i need to link below TableB,so, finally my datagrid header, P001 with replace with Vlow, P002 --> VHigh........is that possible? |
|
pootle_flump
1064 Posts |
Posted - 2007-06-03 : 16:35:45
|
quote: Originally posted by knockyo so, finally my datagrid header, P001 with replace with Vlow, P002 --> VHigh........
SELECT P001 AS Vlow, P002 AS VHighFROM MyTable ???? |
|
|
knockyo
Yak Posting Veteran
83 Posts |
Posted - 2007-06-04 : 00:51:56
|
Hi,Thanks your reply.At your statement, i notice that it is Hard Code at my program to generate the field name i want.But in my situation, I need to use SQL or coding to link between above 2 tables TableA and TableB. This is because each of the data is different. Eg: (1) will happen P008, P009, P010........ (2) sometimes P001 will represent another value, Eg: "Contact"So I cannot hard code it.Thanks |
|
|
pbguy
Constraint Violating Yak Guru
319 Posts |
Posted - 2007-06-04 : 01:13:53
|
Please do it in the front end which is better..--------------------------------------------------S.Ahamed |
|
|
knockyo
Yak Posting Veteran
83 Posts |
Posted - 2007-06-04 : 02:04:15
|
Meaning that is? |
|
|
pbguy
Constraint Violating Yak Guru
319 Posts |
Posted - 2007-06-04 : 02:14:02
|
I do not know what is your front end...take the column name of tableA(P001,P002..) in the front end and get the corresponding description of that column from the tableB and replace it.--------------------------------------------------S.Ahamed |
|
|
pootle_flump
1064 Posts |
Posted - 2007-06-04 : 04:25:10
|
Just stepping back a pace or two - why name your fields P001 -> P007 in the first place? Why not name them as you want to display them in the first place? |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|
|