Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to point to table column in sql server 1

Status
Not open for further replies.

suna

Programmer
Apr 16, 2001
5
MY
i have an input (say "P1T1") and I only need the last two letter (in this case "T1") to point to another column in another table..

supposedly, when the input is P1T1 then i'll have to go to column T1 to read the result. the same goes to P1T2, P1T3 and so on,..it will go to columns T2, T3 and so on respectively.

I am using
Function tanggagaji(tg)
tangga1 = Mid(tg, 3, 2)
End Function

to get the last two letters. but i don't know how to do the rest!

 
You could generate an SQL statement like this:

sqlStr="SELECT " & tanggal & " FROM tablename"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top