Showing posts with label Sql. Show all posts
Showing posts with label Sql. Show all posts

Mark the stored procedure to automatic execution?

Use the sp_procoption system stored procedure to mark the stored procedure to automatic execution when the SQL Server will start. Only objects in the master database owned by dbo can have the startup setting changed and this option is restricted to objects that have no parameters. USE master EXEC sp_procoption ‘indRebuild’, ’startup’, ‘true’)

What is the Difference between view and stored procedure?

Views can have only select statements (create, update, truncate, delete statements are not allowed) Views cannot have “select into”, “Group by” “Having”, ”Order by

Error In Sql Server | An object or column name is missing or empty

How to solve An object or column name is missing or empty errors.

3.1.An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Add a name or single space as the alias name.
This error comes during Execution of Sql-server queries.
it shows that there is error in query like double "" ''fieldname '' sometimes it need like 'fieldname'
only single ' or somewhere opening and closing parenthesis.
3.2.Incorrect syntax near ','

Msg 102, Level 15, State 1, Line 18
Just click on error line and check syntax

3.3The query uses non-ANSI outer join operators ("*=" or "=*"). To run this query without modification, please set the compatibility level for current database to 80 or lower, using stored procedure sp_dbcmptlevel. It is strongly recommended to rewrite the query using ANSI outer join operators (LEFT OUTER JOIN, RIGHT OUTER JOIN). In the future versions of SQL Server, non-ANSI join operators will not be supported even in backward-compatibility modes.