curiouswebster
asked on
Creating a View from a CTE
I have a working Common Table Expression and would like to make it into a View.
How do I do that?
Thanks
How do I do that?
Thanks
The body of a CTE is a query. Take that query and use it to define the view.
ASKER
Yes, that is the question. Can you give me a little example?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have a compile error as I am not sure about parens.
Can you please complete your design with an ultra simple query?
Thanks.
Can you please complete your design with an ultra simple query?
Thanks.
Shoot me a sample CTE and I will rearrange it into a CREATE VIEW.
ASKER
Here's the query I took FROM a CTE....
SELECT JobType, Timestamp, CallingFunction, My_ID, Status, Error
FROM MyTable
SELECT JobType, Timestamp, CallingFunction, My_ID, Status, Error
FROM MyTable
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Is that considered a CTE inside? Or would a CTE use the WITH statement inside the CREATE VIEW?
If so, please provide that too, since that was my question ;)
If so, please provide that too, since that was my question ;)
I don't understand what you are asking for. You asked to make a CTE into a view. What are you actually trying to accomplish, in greater detail?
ASKER
I was expecting to see both the VIEW and the CTE in one statement. Is that possible?
Thanks for the help thus far. I will close it and assign you the points after your next answer .
Thanks for the help thus far. I will close it and assign you the points after your next answer .
I have a working Common Table Expression
first show what it is...
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks