MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old August 18th, 2004, 05:02 AM
digglek digglek is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 37 digglek User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
SELECT Query Help

I want to reference the column header by whats stored in an array

ie

strArray(1) = Field1

SELECT strArray1 FROM Table1

how do i get this to work

Reply With Quote
  #2  
Old August 19th, 2004, 02:08 AM
brightlight brightlight is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 371 brightlight User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 h 32 m 27 sec
Reputation Power: 5
I don't think yours is a MS SQL question.

Anyhow, I think the following is what u require

Quote:
strSQL= "SELECT " & strArray(1) & " FROM Table1"
__________________
Regards,
Brightlight

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > SELECT Query Help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway