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

Its maximum row size exceeds the allowed maximum of 8060 bytes. INSERT or...

Hi,I have a table and its having 450 columns. i am using sql server 2008.Almost all the columns have datatype varchar(50),varchar(3000) and varchar(max).i am getting below error message, when i run the...

View Article


Find columns in select query

Hello,I don't know if this is the right place to ask this question but I thought it would be the best bet.I want to be able to detect the column names in any given select queries, I though using a...

View Article


Pivot Sum is blank

Hi All,I am pivoting on a balance amount and then trying to get the total of each row, but the total column is null.CLient-client code-gl account-division-client type-CA100- CA180-CA200-CA210-TotalAcme...

View Article

Nth Row to local variable

Hi,I am new this whole Database & SQL concept. And I come from a non IT background.I am supposed to write a procedure that is supposed to query a particular table and assign each cell of a...

View Article

get numeric and cahracter value from string

Hi I have one column that conatins value like belowaklsd%^&56789985454. '#(**&^hylf89889898%68878 -%@I need to get value of numeric(10 digit from right)  in one column and character in one...

View Article


Re: How to converting from PL/SQL query to T-SQL query

How to converting from PL/SQL query to T-SQL query... Its Urgent

View Article

How to use a value previously stored in a variable?

Hi, Can you pls advice how to achieve the below kind of scenario in T-SQL ? --------Initial_ValueUsed_ValueBalance20020119 (=20-1)118 (=19-1)216 (=18-2)As every time it calculates the "Balance" part...

View Article

How to make hierarchical structure for the table

I have a table with below fields and dataDocNo TransmittalNo TransmittaltoCon Doc-0001 tt-0002 con-0005 Doc-0005 tt-0002 con-0003 Doc-0001 tt-0002 con-0007Now I like to make a treeview with 3 level of...

View Article


how to transpose column into row

Hi,I need to transpose column into row anyone can help me.Eg: NameQuantityDateRM110020-06-2013RM215020-06-2013RM320020-06-2013RM414020-06-2013if i execute my SP i get data like the above but i need to...

View Article


When using REPLACE I'm getting an extra comma

My current SQL query using REPLACE yields the results I want but adds a "," in between spaces in the field for some reason.SELECTDISTINCT[Contract Number], REPLACE((SELECT[User Name]AS 'data()'...

View Article

error 802 severity 17 state 20

Hi,Our production servers gets this error message for the past few  weekserror 802 severity 17 state 20We are not sure what could be the problem. ANy open sessions or long running queries or huge...

View Article

Image may be NSFW.
Clik here to view.

Send email when certain Data is being inserted or changed in MS SQL Server table

I would like to know if possible and how I would achieve the following, whenever a new row is inserted into the following table (Contact) and the Confidential_flag Column has “Y” an email is generated...

View Article

ORDER BY where the order is contained in a string

HiI have a web application that offers the user the ability to sort items on the page using jQuery Sortable. This is useful because the data being sorted cannot easily be sorted on some aspect of the...

View Article


T-SQL query question

Hi, I came across a problem that I can't find a solution to and maybe one of you could help me with that.I have a table that records Inventory on a nightly basis across our locations and it records any...

View Article

Assistance with SQL Update

I am trying to run the below code to quickly update the order & order date on multiple items (the item list is larger than this, but cut it down for examples sake.)  When I try to run this SQL I...

View Article


Performance tuning a SQL query

Hello ,I have here t-SQL query  that is executed very frequently and taking long duration  I was asking what is place I have to hit to tune this queryUPDATE B SET B.ID = CASE ISNULL(CU.is_Status, 1)...

View Article

Correcting someone else's code

I have been a light user of SQL in the past and now I have inherited some code which is quite long and little untidy. I am using SQL Management Server Studio 2008R2 - which is completely new to me....

View Article


Filter doesn't work the same on a Query where field is on a different table

I have a query that works perfectly but when I try to query a field that's on a joined table it doesn't apply the same way? I have a quite a few joins and most just pull fields straightforwardly. Some...

View Article

Sql Dependent Queries Not Automatically Recompiled

Hi there,I am a simple guy, wondering what is going wrong:I make 2 TVF's the second depending on the first. If I alter the first, the second one still used the old version of the first TVF. It seems...

View Article

Average over the past 4 days of the week

Hi How can I take the day of the week and average it for the past 4 days of the week e.g. the average for the past 4 MondaysCREATETABLE dbo.average(first_date datetime,first_date_day...

View Article
Browsing all 23857 articles
Browse latest View live


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