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

Accessing temp tables created in Stored Procedure through SSRS

Hi experts,I have two temp tables#Client_Transactions#Client_Transaction_Summary (Summary of the above detailed report)How do I access the 2 temp tables separately through SSRS please??Thanks in advance !

View Article


Image may be NSFW.
Clik here to view.

Maximum stored procedure, function, trigger, or view nesting level exceeded...

hi...Msg 50000, Level 16, State 1, Line 18Error 217, Line 9, Message: Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32).i am getting error this error when run the...

View Article


How to eliminate ASCII values from a table and contain ONLY alpha numeric...

Hi,   I have a table which has 10 columns and these 10 columns has alpha numeric and special characters (ascii values) - My client said all the column should have ONLY alpha numeric values.Can you...

View Article

Proper Error Handling in Transaction when including DDL

Hi All,When creating a new table in SQL Server 2008 R2, I receive the following DDL (edited for readability):IF OBJECT_ID('dbo.TestA', 'U') IS NULL DROP TABLE [dbo].[TestA] GO SET ANSI_NULLS ON GO SET...

View Article

Need to figure out the syntax on a trigger when a new record is inserted

I have a table in SQL Server.  That contains 2 fields the Diagnosis code and the HCC Code.  The HCC Code is based on the Diagnosis Code and I have another database on the same server that has a lookup...

View Article


Values as column names

It's a little difficult to explain but here goes nothing... I am dynamically generating SQL and executing using sp_ExecuteSql.  When the query is built it comes from values in a configuration table and...

View Article

Converting date field defined as char(8) to date bypassing invalid values

I'm converting a date field to date using date fields defined as char(8) with some values that are invalid such as "011 1212".With this code: "min(convert(date, F6))"I'm getting this error...

View Article

SQL Select statement Running very slow

HiI have a select statement that runs forever because of 'Select Distinct' and it makes tempdb grow very large due to sorting. Does anyone have suggestions on how to improve this select statement?...

View Article


insert Dynamic columns and its values into Database

I have a csv file containing firstname,lastname,emailid columns and values.And i have a table with column names firstname,lastname,emailid,phonenumber [table name cust_details]Now i need to read the...

View Article


Windows 8.1 System Memory Dump Files

When I run disk cleanup, I get hung on the system memory dump files (over 400MB) and can't delete them. When I try I get an error code Bad Pool Caller. Please help, this is a new computer and is...

View Article

T-SQL Query help

select top 100 COUNT(Categorydelta)as hits,Categorydelta from Category WITH (NOLOCK) where Product like '%/_api/search%' and DATEDIFF(MINUTE,CONVERT(datetime, SWITCHOFFSET(CONVERT(datetimeoffset,...

View Article

Huge sql server database with varbinary entries

We have to design an SQL Server 2008 R2 database storing many varbinary blobs. Each blob will have around 40K and there will be around 700.000 additional entries a day. The maximum size of the database...

View Article

Pass int[] myIntArray to Sproc

Hello,  I need to pass an array of values e.g, 1,2,3,4,5 to a stored procedure.Thanks

View Article


Performance tuning advice required

Hi Experts,I am using the following queryupdate ABC set  abc.col1=xyz.col1from abc,xyz where abc.col2=xyz.col2 and xyz.col1 in (select min(xyz.col1)from xyz group by col2)The sub query will return 1.5...

View Article

How to "see" the selection script for a view in SQL SERVER 2008?

Back "in the day", all I need to do was look at the properties of a view, and I could see what the selection criteria was.  Obviously that is no longer the case.  How can I see this information in the...

View Article


sql query assistance on merge

MERGE tb1 AS Target USING  (select f1,f2 from tb2) AS Source ON (Target.[CAS_ID] = Source.f1 =target.f1 ) WHEN MATCHED THEN       UPDATE SET                  Target.f2 = Source.f2                  THEN...

View Article

Group & Sum

Experts:  I have data that looks a little like this:NAMEINVOICEDATEBALANCEIDFEESCOMMENTFEES2FEES3 COMMENT2bob123 1/1/1210.00 15.00 good1.00 2.50betterbob 123 1/2/13 10.00 2 2.50 best 0.75 3.22 good...

View Article


Date periods

Hello all,I need a help with one sql query, please.I have table with dates and descriptions.for example [Date]            [Description] 2013-01-01    description1 2013-01-02    description1 2013-01-03...

View Article

Sum not working with Cross Join as I need

So, the query I'm sharing here is not working the way I expect it to, and I'm just not sure why. I have a table of 6 different user roles, and a table of 4 different product versions, and a table of...

View Article

TSQL:

Hi Friends,Could you please provide a query, that will find whether blocking is monitored and deadlocks are monitored in my server.Thanks In advanceParixitsinh

View Article
Browsing all 23857 articles
Browse latest View live


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