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

Stored Procedures VS Indexed Views - Performance?

Hey folks,In the past, one of the factors I'd consider when choosing to use a Stored Procedure over a View was the fact that the Stored Procedure would get optimized by storing the query execution path...

View Article


what happens inside ...... when fired Index Reorganize

Hi all,what happens inside ...... when fired Index Reorganize Thanksvijay

View Article


Include table to aggregated update statement

I want to include receipt_link_id table to the below statement how can I achieve it???UPDATE#arr SET rec_id =(SELECT max(dbo.recpt_status.recpt_id)AS aggr$1FROM dbo.recpt_status WHERE...

View Article

T-sql Query Help

Delete Questin due to security

View Article

How to create a function to output Any recordset into JSON format?

I want to create a T-SQL function,to output "ANY" recordset into JSON format.That means,this function needs two parameters,the first is the recordset and the second is output json parametername.For...

View Article


Help needed on Equi join?

I have 3 views and in that common column datatype is varchar. I have to use equi join to get the data from 3 view.In 3 views total records are 23668,111,3033when i wrote the join i am getting the...

View Article

Inconsistent Resultset from the Stored procedure

Hi All,           I am getting inconsistent resultset when i run the Stored Procedure. Can anyone please suggest how to fix this issue.Regards,Puneeth

View Article

storing pdf file in sql database

currently i am working on my last semester project.I am using visual studio 2010 to design front end and sql server 2008 for database. I that case i want to store the pdf file in sql server 2008...

View Article


add approve data column in sp

i want to add approve date from approval table i tried but it not worksspALTER procedure [dbo].[spdocuments] as SELECT dbo.DocumentInfo.DocID as DocumentID, dbo.DocumentInfo.DocName as DocumentName,...

View Article


how to simulate blocking ?

how to simulate blocking.?can any one provide script ..

View Article

Format number with comma and 1 decimal point

How can I format a number like this 1,234.5 even if the number is 1,234.50 or 1,234.56 ?  

View Article

How to run trigger for each affected row in delete query

Hello every body, can anyone help me ?I will describe my problem. First, i have 2 table name tbStock andtbSalesDetail. Column in tbStock and tbSalesDetail is like this :CREATE TABLE tbStock ( idStock...

View Article

Is 'YYYY-MM-DD' not valid for SQL Server?

'YYYYMMDD' and 'YYYY-MM-DD' are valid ANSI date strings.BOL: "date                    YYYY-MM-DD 0001-01-01 through 9999-12-311 day3NoNo"LINK: http://technet.microsoft.com/en-us/library/ms186724.aspxI...

View Article


How to use IF-ElSE in 'WITH' clause

Hi,  I wonder if i can use IF-ELSE in 'With' clause; as follows;WITH TEST       AS(       --my select statement    )    IF parameter >0        BEGIN                  --select statement on TEST with...

View Article

locking

I am inserting 5000 rows from working table to main table?will the sql server lock my main table row by row and or page level or table level?how do i know what factor determine what level locking does...

View Article


Pivot issues

Happy holidays!I am having issues using PIVOT. I have never seemed to truly understand the syntax behind it and I know this is a simple question.... I have a simple table that has 3 columns: DayofWeek...

View Article

Image may be NSFW.
Clik here to view.

SQL PIVOT with Matrix

Hi - I would like to create a SSRS Matrix report. I have some SQL (see below) and understand I may need to update it using TSQL Pivot to allow me to create a SSRS matrix that would give me the...

View Article


Image may be NSFW.
Clik here to view.

tunning simple query with full-text

I would like tuning my query with full-text searching. I have two tables: 1. artaolInventTable a) IT_NAMEIDIDX (Unique, Non-clustered)   - itemId   - itemName   (include column b) IT_IMPORTIDX...

View Article

SQL Timeouts

I am on SQL server 2008 R2. I have a monthly process that inserts and updates 50,000 records.The process make take 4 minutes or it may time out. If I delete the data and rerun the process it runs in 30...

View Article

selected aggregate values from stored procedure always zero

I am trying to create a report in an ASP VB .Net application. My stored procedure tallies results from a survey which our website members fill out. It returns multiple result sets. The first is a...

View Article
Browsing all 23857 articles
Browse latest View live


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