Ask a Question related to Coldfusion Database Access, Design and Development.
-
ftroute #1
Query Drop View
I have a programs that creates (and uses) 3 query VIEWs. Currently I have to go
into the database and delete the views before I can re-run the program. Access
supports the Query DROP VIEW <i>viewname</i> syntax.
The code:
<cfquery name="dropview" datasource=#dbsource# username=#dbuser#
password=#dbpass#>
DROP VIEW devsused
</cfquery>
The above results in the following error:
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft
Access Driver] Syntax error in DROP TABLE or DROP INDEX.
Can somebody point me in the right direction?
ftroute Guest
-
Rendering a derived drop down list in VS2005 designer view
Hi I have a control derived from a drop down list written in VB.NET (ASP.NET 2.0) that dynamically displays listitems retrieved from an SQL... -
drop down db query error
I am new to coldfusion so please bare with me. I found a tutorial on how to create dynamic drop down boxes. It almost works fine except the first dd... -
Query, view join question.
Hi Tom, I could give you access to the database itself if needed. But these are the actual tables and view. I hope I will never make any tpo's... -
Drop view if it already exists
What about something like IF (select COUNT(*) from information_schema.views WHERE TABLE_NAME = 'Your view') <> 0 Begin DROP VIEW 'Your view'... -
Access query Sql View
I'm trying to create a sql view with sytax created in a microsoft access97 query The problem I'm having is with " IIf( Is Null,Null,"Yes") AS... -
ftroute #2
Re: Query Drop View
Don't think that using 3 queries and Q of Q is a viable option. Already doing Q
of Q on the views. Will look at it again.
Although Access supports the DROP VIEW syntax, it appears that CF does not. I
have used DROP TABLE and DROP INDEX in the past with no problem.
ftroute Guest
-
Dan Bracuk #3
Re: Query Drop View
Regarding q of q from 3 queries. It takes a bit of work, but you can get
results.
3 real queries
<cfquery name="a" datasource="dw">
select event_code, event_name from event
</cfquery>
<cfquery name="b" datasource="dw">
select event_code, event_name from event
</cfquery>
<cfquery name="c" datasource="dw">
select event_code, event_name from event
</cfquery>
*****************************
Q of Q
<cfquery name="d" dbtype="query">
select a.event_code as event_code, b.event_name as event_name
from a, b
where a.event_code = b.event_code
</cfquery>
<cfquery name="e" dbtype="query">
select a.event_name as aa
from a, d
where a.event_code = d.event_code
</cfquery>
Notice in the 2nd one, that one of my queries, d, was a q of q.
Dan Bracuk Guest
-
ftroute #4
Re: Query Drop View
Got me really thinking and stepping back to look at the whole picture. Realized
that what I was doing in the first place could be modified and eliminate a
whole step deleted by doing so. My new approach will use 1 query and two Q of
Q. Thanks for forcing me to open my eyes.
ftroute Guest



Reply With Quote

