Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I would like to Load the Tables from a program and List all the columns in the Tables. I know How to list the Columns from all the Tables Loaded in the View but what I would like to do is load the Tables with no Data so I just have the Column Names.
Is this possible.
Hi @RichardLee
If you are getting this directly from a DB you will need to find the appropriate syntax, for example, for SQL Server that uses Transact SQL it would be
SELECT TOP 0 * From dbo.tablename
And there are similar depending of what data source you are getting the information from, so you could search fro the equivalent.
By any chance is there any reason that you are trying to get this? Maybe if we get more details about the business need we could provide other ideas/options.
Hope it helps!
to only load empty tables you can do something like this: then just add this to a loop and make sure that you don't concatenate the tables if the header(column) names are the same.
TMP:
first 1
LOAD *
FROM [lib://(storeageandfilename).qvd](qvd)
where 1 = 0
;
Thanks for the reply but its not QVD files I will need to pull thins from its Direct from the dbo of the programs I will be using.
Hi @RichardLee
If you are getting this directly from a DB you will need to find the appropriate syntax, for example, for SQL Server that uses Transact SQL it would be
SELECT TOP 0 * From dbo.tablename
And there are similar depending of what data source you are getting the information from, so you could search fro the equivalent.
By any chance is there any reason that you are trying to get this? Maybe if we get more details about the business need we could provide other ideas/options.
Hope it helps!
This is perfect.
The reason I need this is to build Database Schema for multiple Systems from our new company acquisitions.
Each has a different software but I need to build an all in one report. So understanding each of them and how to pull the data is needed.
Hi @RichardLee
If you just need to get table definition, the sys tables can be used, there are sys.tables and sys.columns tables for SQL, there are similar for other data sources, there are also pre defined Views and Stored Procedures that provide that information.
Hope it helps!
Is there any other way to do this as I've hit a stumbling block with Salesforce?