How to make a view in SQL Server? [closed] - sql

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I have more tables and I want to merge that some table for getting result.....
How can I do?

Views is just some sort of "stored query". It can be defined as:
CREATE VIEW viewname AS SELECT <the rest of select query here>
More details at msdn:
http://msdn.microsoft.com/en-us/library/ms187956.aspx
http://msdn.microsoft.com/en-us/library/aa214068(SQL.80).aspx

CEATE VIEW.
The rest of teh syntax is in ..... the documentation.
And this question is neither related to C# nor C++. It also does not care what you ate for breakfast. SQL works with strings the server interprets, and the langauge has no matter how the server does that.

Related

Does a view capture only a query, or also the data behind that query? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Does a view capture only a query, or also the data behind that query?
A view is just a stored query.
A view is simply stored T-SQL unless if it is an indexed view in which case it must have at least a unique clustered index and will therefore be stored in the same way as a table with a clustered index.

SQL does replace and CAST on select affect the Database? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am creating a view and I was asked to do a 'replace' and a 'cast', so as an example:
SELECT CAST(qtyshipped AS INT) AS 'QTYShipped', REPLACE(itemval,'.','')
FROM Database
Within the view, should not actually change the information in the database but just in the query correct? (It works perfectly in my sandbox server but i just want to confirm)
Not a dumb question at all. And the answer is yes, it only changes the result of the query, the underlying data will remain the same.
That is already a good query. But I need to tell some points with you.
REPLACE function is case-sensitive. Although I've seen in your code that you are only replacing period.
Why is your column qtyshipped is not in numeric type? You should have change that into numeric. So you won't need casting which may lower the performance.
It will not affect your database since your are only executing SELECT not UPDATE.

SQL Fiddle moved to SO Data? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
This question is totally unacceptable and will be closed but...
Has SQL Fiddle been amalgameted into Stack Exchange? For example in HERE
Also - THIS is crazy - Am I correct in saying this is sql that is querying SO itself?
(... can't wait to play.)
First, such questions should rather be in meta.
Second, the data explorer has been around for some time now; it's not about executing arbitrary SQL code but for queries against the SO database.
See meta for more questions around the data explorer: https://meta.stackexchange.com/questions/tagged/data-explorer

Dynamic code generation and execution without writing code to database [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Is it possible to generate ABAP code and execute it in memory without writing code to DB?
Yes. Use Google. Use Google. Use Google. Use Google. Use Google. (I have to write at least 30 characters although I really don't have anything else to say besides that wanting to generate code dynamically is usually a sign you're on the wrong track.)

What is User define function and how to execute that? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
What is user define function in sql server 2005.How Can I see them from design point of view.
I wanted to create and execute the function.Can anybody explain me.I have not done it before.
User-Defined Functions from MSDN Books Online