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

Difference between IN function and INNER JOIN funtion

Hi All,What is the difference between IN function and INNER JOIN ? How does it work in behind scenes of SQL Server engine ? Please let me know, thanks in advance :)Maruthi...

View Article


some sql-server express question

hii have some sql-server 2008 r2  express question1. can i install it to my customer (Is it legal) ?2. Does it support connection of 200 concurrent users ?3. What is the size of tables limit and rows...

View Article


Avoid duplicate entries in a SQL join query

Hi, Am using this query for PO purchase requisition. I am using joins in the query and it is retrieving duplicate records and it takes 2 hrs to complete the query. Is there any way to avoid the...

View Article

Partitioning Question

PartitioningIf I partition a table based an int column using standard range values, when selecting from that table specifying that column, the query will only hit the partition(s) that contain the data...

View Article

suggest me a query to produce a result that shows sum of total due amount for...

the result is i am getting is cuatomer name |  due amount ---------------------------------------user 1 |        21user1 |24user 1| 26uerr 2| 23customer details stored in customer table and due amount...

View Article


Image may be NSFW.
Clik here to view.

Are you a technology guru? Show us your solutions, win awards, become Guru of...

Starting this month, TechNet Wiki is looking for and celebrating the best of the best!Is that you? Do you consider yourself an expert, or authority on Transact SQL? Show us your forum solutions and...

View Article

Improving the performance of a select query with some joins - SQL Server 2012

Hi,I've a T-SQL query with 5-6 joins (left, inner) that reads from tables with more 500.000 rows. I'd like to improve the performance of this query and for now without creating any indexes. I've...

View Article

Image may be NSFW.
Clik here to view.

SET ANSI_PADDING setting

Hi everybody,I am wondering if this is wrong setting on the database level (this is what we have in our database, we also had compatibility level 100 which I just changed to 110): I am wondering if...

View Article


Are you a technology guru? Show us your solutions and become the T-SQL Guru...

TechNet Wiki is looking for and celebrating the best of the best!Is that you? Do you consider yourself an expert, or authority on T-SQL?Show us your forum solutions and become MICROSOFT TECHNOLOGY GURU...

View Article


Script loading Diagram Support

Hi,I am trying to Copy my Database to a new database along with the diagrams.The problem I am facing is that when a new database is created, it does not have the required objects to support the  MS SQL...

View Article

Image may be NSFW.
Clik here to view.

How to generate a xml doc using from database using T-sql

Hello all,I have an xml file stored in my database as shown below:Above screenshot is for exampleI want to write a t-sql which use this data and create and xml file which is saved in this column.So at...

View Article

How to alter column to identity(1,1)

I tried Alter table table1 alter column column1 Identity(1,1);Alter table table1 ADD CONSTRAINT column1_def Identity(1,1) FOR column1 they all can not work,any idea about this? thanks 

View Article

is there any way to get all primary key and foreign key with below strucure...

Hi Friends, i am in the need of below list of entire database (in below format)DROP PK DROP FKCREATE PKCREATE FKThanks in Advance. Parixit

View Article


Image may be NSFW.
Clik here to view.

Get to the Children from a Parent Record

Here is the scenario:Is it possible to get to the relevant child records (which are in multiple child tables) from a "parent" record? Please share the techniques to do it.Regards,V

View Article

sys.dm_exec_query_stats and sys.dm_exec_sql_text not giving correct query text

When I execute the following query, I see that some of the rows show create function definition instead of the code that called the functions. for e.g I would like to know what parameters were used...

View Article


High Plan count & locking on a simple update query

Hi all, I am trying to understand why the below query shows a very high plan count (around 700) on our sql server, I also suspect that it is locking the table during the update. I assume that it has...

View Article

How to split string into row's data?

I have data like :col1  col21      ab2      ba3      bcI want to put these data into rows like:col1 col21      a1      b2      b2      a3      b3      cThanks in advance. I am using SQL server 2005.

View Article


ANSI_NULLS configuration

Hi Team,Is there any way if we can set "ANSI_NULLS" to OFF at database level? I tried changing configuration from database property however I am still getting 0 rows in result when I run query with...

View Article

How to compare Month '01/2013' to 2013-05-22 00:00:00.000

How to cast/convert these 2 time colums so that I can compare them? Following statement causes error: SELECT     DISTINCT Month FROM         Calender WHERE Month (SELECT DISTINCT CAST(modify_time AS...

View Article

Insert from tabbed file with a conditional and table lookup

I need help with a stored procedure.I have two tablesCRIS_USER and CRIS_USER_ LOCATION. CREATETABLE[dbo].[CRIS_USER]...

View Article
Browsing all 23857 articles
Browse latest View live


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