Quantcast
Channel: Transact-SQL forum
Browsing all 23857 articles
Browse latest View live

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 Article


fast 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 Article


triggers

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 Article

Distributed 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 Article

Group 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 Article


Format 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 Article

INSERT 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 Article

Convert 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 Article


I 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 Article


Need 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 Article

opening & 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 Article

Find 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 Article

SQL 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 Article


query 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 Article

Quotes 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 Article


flexible 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 Article

T-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 Article


What 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 Article

MSSQL - 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 Article

Will 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
Browsing all 23857 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>