Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

ODBC Field list

Posted on 2004-11-10
2
Medium Priority
?
293 Views
Last Modified: 2008-03-17
This is probably a very simple question. I have a linked server to my MS SQL 7.0 that is an AS400 system. How do I run a query through the sql to return fields only off the 400?  I run quires all the time through it to return rows and etc, but I lack the syntax to just get a field list. This is an ODBC connection via open query.

Thanks!!
0
Comment
Question by:Jojo1771
2 Comments
 
LVL 50

Accepted Solution

by:
Lowfatspread earned 2000 total points
ID: 12544211
select * from YourTable where 0=1

or via open query

you could try

( select * from yourtable fetch first 1 row only)  Db2/udb syntax
0
 
LVL 5

Author Comment

by:Jojo1771
ID: 12544820
Worked perfectly. Both answers that is.
THanks!!
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question