I have a site that I have no access to the DB from work (SQL Server).I am getting an error with one of my queries.It looks as if the field is either not there or spelled wrong.Can anyone tell me how I can tell what fields I have for a table?
Thanks,
Brian Yager
President - North Alabama
Cold
: How do I tell what fields are in my tables...
I have a site that I have no access to the DB from work (SQL Server).I am
getting an error with one of my queries.It looks as if the field is either
not there or spelled wrong.Can anyone tell me how I can tell what fields I
have for a table?
Thanks
I have a site that I have no access to the DB from work (SQL Server).
I am getting an error with one of my queries.It looks as if the
field is either not there or spelled wrong.Can anyone tell me how
I can tell what fields I have for a table?
Select column_name
From
oi cf!!
select top 10 * from table
cfdump var=#query#
or output query.columnlist
--
Thursday, October 2, 2003, 10:09:51 AM, you wrote:
ct I have a site that I have no access to the DB from work (SQL Server).I am getting an
ct error with one of my
Where'd you find that out?
I've been looking through CFWACK for the CFQUERY tag, and I can't find
anything that mentions the columnlist variable for CFQuery.
Is there also some other variable that stores field type?
-Gel
-Original Message-
From: Shawn Regan [mailto:[EMAIL
a query, the row currently being output.
charlie
- Original Message -
From: Angel Stewart
To: CF-Talk
Sent: Thursday, October 02, 2003 7:47 AM
Subject: RE: How do I tell what fields are in my tables...
Where'd you find that out?
I've been looking through CFWACK for the CFQUERY tag
Stewart [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 02, 2003 9:47 AM
To: CF-Talk
Subject: RE: How do I tell what fields are in my tables...
Where'd you find that out?
I've been looking through CFWACK for the CFQUERY tag, and I can't find
anything that mentions the columnlist variable for CFQuery
Hmm..
So how would you determine the field type of the underlying table for a
query?
Manually test each field with IsNumber,IsDate,IsBoolean etc. etc. ?
-Gel
-Original Message-
From: Charlie Griefer [mailto:[EMAIL PROTECTED]
nothing that returns field type.
cfquery returns 3
Angel Stewart wrote:
So how would you determine the field type of the underlying table for a
query?
Manually test each field with IsNumber,IsDate,IsBoolean etc. etc. ?
That is why you should use the INFORMATION_SCHEMA. Just try
cfquery datasource= name=qColumns
SELECT *
FROM
and the datatype as the value (?)
charlie
- Original Message -
From: Angel Stewart
To: CF-Talk
Sent: Thursday, October 02, 2003 8:09 AM
Subject: RE: How do I tell what fields are in my tables...
Hmm..
So how would you determine the field type of the underlying table for a
query
Thanks Critz!
This worked like a charm.
I'm alos going to look at what you recomended Philip.
Thanks to all!
Brian
oi cf!!
select top 10 * from table
cfdump var=#query#
or output query.columnlist
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
Manually test each field with IsNumber,IsDate,IsBoolean etc. etc. ?
Nope, this will only test for the CF variables containing values returned by a query, which is quite fuzzy.
For instance 1234 stored as a text field in the database will be declared numeric by CF.
[Todays Threads]
[This
Is there also some other variable that stores field type?
There is a CFX that does this (and much more): see CFX_ODBCinfo at
http://www.contentbox.com/claude/customtags/tagstore.cfm?p=hf
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
I haven't been following this discussion so far, but this is a useful little
snippet for checking out your user tables from CF:
cfquery name=GetSQLInfo
datasource=#YourDSN#
SELECT objs.Name AS TableName, cols.Name AS ColumnName, cols.Length,
typs.Name as DataType
FROM sysobjects objs,
14 matches
Mail list logo