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

SP with output paramter

please anybody please give Stored procedure with output parameter and how to execute sp with output paramter.it will bw very helpful for me.Thanks.

View Article


Multiple Aggregate Functions On One Table

I have a table called Transactions with these columns : TransactionDate, DRCR,TransactionValue,AccountNumberTransactionDate - Date on which a transaction was doneDRCR - Shows whether the transaction...

View Article


T-SQl query for Excel Goal Seek function

Hi,I have  a requirement to write a t-sql query to mimic the logic of excel goal seek function. In Excel for that particular cell we have a formula through which we are making that cell to 0. The...

View Article

Get Merge Statement Progress when running?

Is there any way to get the "percent complete" or "current row count" when a Merge command is running on the server.sp_who, sp_who2 and sys.dm_exec_requests isnt helping me here !!!Any suggestions...

View Article

Copying 'semanticsdb' (SQL semantic language statistics database) between...

Dear all,Microsoft SQL 2012 comes with semantic search features. In order to use them, one must attach a separate database called 'semanticsdb' to SQL server, containing semantic language statistics...

View Article


how to bulk insert a table to csv file

how to bulk insert a stored procedure to csv file.. from inside isql to produce a csv file

View Article

Image may be NSFW.
Clik here to view.

Use Computed Column as Primary Key

I am trying to make my computed column (QuoteID) the primary key.  QuoteID is a concatenation of two fields as you can see below.  Below is how SQL Server 2008 scripts the CREATE TABLE without QuoteID...

View Article

Which SSIS 2008R2 BIDS transform(s) appropriate to create multiple...

I don't know whether to use some combination of data flow transformations or resort instead to a Script Component to accomplish my goal.  I am receiving electric usage odometer-type meter readings,...

View Article


Problem writing to a .csv file using a stored procedure

Currently I have a stored procedure which takes information from my tables stores it in a temp table then writes that information to a dummy file and that file creates the final file. When I run the...

View Article


check whether a series is valid or not

Hi, I have a scenario in which I have to check that whether I am correct no of series or not...Createtable tbl( ID intidentity,number varchar(10),numstatus varchar(10))INSERTINTO...

View Article

script to find the previous dates on which sql server got recycled

HI All,Is there any script to find the dates on which server got recycled previously.

View Article

buffer cache hit ratio

Hi,How can I check the following in SQL serverBuffer cache hit ratio in percentageMissing indexesDead locksSQL Error logs

View Article

Query user logins using distinct and report back daily, weekly and monthly usage

I have a simple SQL Query, that I'm looking to report back site usage hourly, daily, weekly and monthly. I require the query to use Distinct as the nature of the application will create several entries...

View Article


Default Value For Field Not Populating

I'm a newbie. My Create Table query had this field:LockdUntil DateTime Not NULL Default '01/01/1900',The SP that adds a record doesn't populate this field, so the default value is supposed to populate...

View Article

JOIN ROWS

Hi, I need help on the below pleaseDECLARE @t TABLE ( ID int, Color1 int, Color2 int, Color3 int )INSERT INTO @t VALUES (1, NULL, NULL, 5) , (1, NULL, 10, NULL) ,(1, 0, NULL, NULL) ,(2, NULL, NULL, 54)...

View Article


Inserting million of rows with help of while loop

In a table with 10 rows of data and five columns i need to insert a millions of rows repeating first 10 rows using while loop in sql server My code is: DECLARE @x int,              @y int,...

View Article

Parsing error with a special character

I have a stored procedure that I am passing in to it a parameter that has a "special" character; in this case the character is the degree sign °, but in another case I received the same error when...

View Article


tsql to parse/separate/split a decimal (float) column into two Int columns -...

MyDecVal    LeftSideVal    RightSideVal   10.4               10                  4How do I split 10.4  into 10   and   4   with tSql?   (on Sql Server 2008 Express) Thanks in advance for any...

View Article

Alert gets error

I have create alert in SQL server 2008 r2 (*64).But it gives me a error like below.SQLServer Error: 512, Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=,...

View Article

FIFO Cost of Goods Sold

I thought I had this problem solved already, but turned out my solution returned wrong info and also I can not figure out what that solution is doing by looking at it. So I'll present the problem again...

View Article
Browsing all 23857 articles
Browse latest View live


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