Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Query Sql Server tables and run code?
Message
 
 
To
08/05/2013 15:59:54
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01573064
Message ID:
01573072
Views:
51
Likes (1)
>Let say I have a database in Sql Server with about 20 tables in it, and that most of those tables have a field "qty".
>
>How could I write query that says
>
>" For each table in the database where the table has a column named 'qty'
> Select table_name, Max(qty) as max_qty "
>
>
>
>Basically, I need a cursor that shows the tablename and the Max(qty) from that table.
>
>BTW it doesn't matter to me whether this is code I from FoxPro or in Sql Server Mgmt Studio.

This is the blog post I meant

How to get information about all databases without a loop

It should give you the information you need.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform