Column permissions of a Table
Hi,I want to know the column permissions of a table.Ex.we have a table employee with 2 columns empid and empnamei want to which of the columns have select permission, or any deny permissions.do we have...
View Articlefast way to join on "like" operator sql
i need to do join between to tables using "like" operator or any other way that gets the same result, So I tried the following:select* from tbl1leftjoin tbl2 on tbl1.X like'%'+tbl2.Y+'%'but the...
View Articletriggers
premises : i am more of a developer and planner than of a DBA i test stranger things in proceduresnow i have a situation in which 1 one temp table has the following schema (grouper int...
View ArticleDistributed Transactions for Microsoft.ACE.OLEDB 12.0
Hi Anyone,I am trying to import data from sql server to excel using microsoft.ace.oledb.12.0.insert into openrowset('Microsoft.ACE.OLEDB.12.0','Excel 12.0;Database=D:\\Testing.xlsx;','Select...
View ArticleGroup the application within the following time frames
UserName| Time Frame| No of Applications Daniel | Week to date| 3 Daniel | Month to date| 10 Daniel| Year to date|400Please help me get the above format, below is my...
View ArticleFormat sql query values
i have two database values 1. runs 2. overs e.g. runs have value 1 and overs have 3 i want sql query to display above two values in format 1/3 suggest me query , how to get this output. thanks jagbir
View ArticleINSERT STATEMENT QUERY
Hi All, I have 2 tables.1.MODIFICATION2.STEPMODIFICATIONMODIFICATION Table Structure:TABLE:ModificationStep 1 ABCStep 1 DEFStep 1 GHIStep 2 ABCStep 2 DEFStep 2...
View ArticleConvert String of ID's to a string of names
Thanks in advance for any help on this question...I have a string that contains ID's separated by a '/' character (e.g. '/12/1546/34/156/').I want a query that can look up each of these id values in a...
View ArticleI want to know will it increase the space of my index drive also?
If I index rebuild online then log file is growing...I want to know will it increase the space of my index drive also?Thanks
View ArticleNeed help writing a complex Stored Procedure
Hi, I am new to writing Stored Procedures, having never used them before. I have extensively been writing all my SQL code using parameterized queries, but have since been repentant having seen the...
View Articleopening & closing stock
i am using sql server 2008my table is CREATE TABLE [dbo].[tbl_enventry]([TransactionDate] [smalldatetime] NULL,[Item] [char](1) NULL,[RecQty] [int] NULL,[IssueQty] [int] NULL (i have written query...
View ArticleFind the View Dependencies
Folks,Please assist me to get the dependencies of a view which is using the different objects from different databases from the multiple instances (using linked server)?Regards Chenchi MSSQL Server DBA
View ArticleSQL JOINS causing too much overhead
I am running this query, I believe my SQL statement is causing to much overhead and causing the 'System.OutOfMemoryException'. Please advice what I could do instead of performing this complex lookup...
View Articlequery help
Hi All,I need a qry to return the customer information and details of the recent order placed by the customer. sud also include the customers who hasnt placed any order as well. Also, what indexes...
View ArticleQuotes in Alter Proc Script
Not sure if I am in the right place for this question. In all my installations of SQL Server, whether 2005 or 2008R2, when I script a stored proc as an ALTER TO the script SSMS produces always...
View Articleflexible table
how can define flexible table that use for any kind of structure we need?I have an sp that have different result with different parameters so I need put its on an tablethanks.
View ArticleT-sql Query to Pivot Data
Hi, I have data in the below format. ID Col_1 1 12341 23451 4567 I want to show it the below way: ID Col1 Col2 col3 1 1234 2345 4567 Please help me with the query Thanks
View ArticleWhat are the index designing recommendations in sql server ? Or What are the...
The main recommendation for index designing in SQL Server are as follows: 1. Analyze the where clause and sql join criteria columns in the query. 2. Use narrow indexes on the tables. 3. Analyze column...
View ArticleMSSQL - cyclomatic complexity of TSQL
Hi All, Please let me know if there is any tool / utility to calculate the complexity of TSQL ( Stored procedures, functions ) in MSSQL. Is there is any microsoft supplied solution for this ?--...
View ArticleWill we ever be able to directly ORDER BY @SortExpression ?
Without seeking promises or guarantees, what are the chances of being able to use a parameter directly in ORDER BY in some future version of SQL Server?Is it impossible due to the architecture of SQL...
View Article