mssql_query("CREATE VIEW dbo.my_view
AS
SELECT *
FROM something
WHERE date > $sdate and date < $edate";
// then I run my query
mssql_query("SELECT SUM(x) FROM my_view");
//Then I drop the view
mssql_query("DROP VIEW dbo.my_view");
The queries I'm doing are actually more complex than in my example, but
that's not the important thing. I'm convinced I gotta use views, and I'm
asking that is this a good way to dynamically create and drop views for the
purpouse. Does it work like that?
--
Welcome to Usenet! Please leave tolerance, understanding
and intelligence at the door. They aren't welcome here.
eternal piste erection miuku gmail piste com
Answering to mysqlf: at least it seems to work as intended. Now the question
remains: is there a better way to accomplish it?
Now here's an appropriate typo... :)
Berislav
Oh my.. That must've been a Freudian penis, I mean slip... :)