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:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old February 26th, 2004, 04:56 PM
dirtyirishhooer dirtyirishhooer is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 13 dirtyirishhooer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 6 sec
Reputation Power: 0
SELECT FROM wildcard?

Hi,

I'm trying to get a search page to search all tables in my database, but when I use * and % I get an SQL syntax error. Basically I want the SQL to be like this:

SELECT * FROM * WHERE fnCat = var

I'd rather not write a loop that fills in all the table names delimited with commas using the MSys table listing feature, but if its necessary I will.

Thanks!

Scott

Reply With Quote
  #2  
Old February 27th, 2004, 02:55 PM
sypher sypher is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Montreal
Posts: 92 sypher User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 10 sec
Reputation Power: 5
you could build a view from your list of tables
so this way you will get a dynamic search of all your tables

if some tables have less fields than the others, just make some fields up (in the select for the view)

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > SELECT FROM wildcard?


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 4 hosted by Hostway