Re: Meta data of query?
From: LCaffrey (lxc_at_eosys.ie)
Date: 07/11/04
- Next message: Aaron [SQL Server MVP]: "Re: SQL Server 2005 Express Beta messes up your SQL Server 2000, BEWARE"
- Previous message: Gnum: "Re: Row number - simply?!"
- In reply to: Dan Guzman: "Re: Meta data of query?"
- Next in thread: Aaron [SQL Server MVP]: "Re: Meta data of query?"
- Reply: Aaron [SQL Server MVP]: "Re: Meta data of query?"
- Reply: Dan Guzman: "Re: Meta data of query?"
- Reply: Dan Guzman: "Re: Meta data of query?"
- Messages sorted by: [ date ] [ thread ]
Date: 11 Jul 2004 13:59:58 -0700
Thanks guys, this is very nice...
A few points...
I find that ...
SELECT (col_list) from personal_details where 1 = 0
... is a much more effective way of getting the query description.
Dan, some points w.r.t. your suggestion...
1. > WHERE
> OBJECT_ID(QUOTENAME('dbo') + '.' + QUOTENAME(TABLE_NAME)) =
> OBJECT_ID('tempdb.dbo.#MetaData')
...I presume that this is a typo and that you meant...
> OBJECT_ID(QUOTENAME('dbo') + '.' + QUOTENAME(#MetaData)) =
However, this is not possible because '#MetaData' is not the actual
name of the temp table.
The only way I can get around this is to use '... LIKE '#MetaData%'
which works fine.
2. Each column must be named explicitly or resolve to a proper name
(e.g. aggregate columns must have a name - I haven't tried complex
queries with inline views and group by, etc...
3. Embedded strings must be gsub'ed.
Thanks for your help
Dynamically generated web pages based on user queries, here we go....
Liam Caffrey
- Next message: Aaron [SQL Server MVP]: "Re: SQL Server 2005 Express Beta messes up your SQL Server 2000, BEWARE"
- Previous message: Gnum: "Re: Row number - simply?!"
- In reply to: Dan Guzman: "Re: Meta data of query?"
- Next in thread: Aaron [SQL Server MVP]: "Re: Meta data of query?"
- Reply: Aaron [SQL Server MVP]: "Re: Meta data of query?"
- Reply: Dan Guzman: "Re: Meta data of query?"
- Reply: Dan Guzman: "Re: Meta data of query?"
- Messages sorted by: [ date ] [ thread ]