Viewing 12 posts - 1 through 12 (of 12 total)
Why not just insert the row into the audit table first from SP directly and delete the actual table since you have all the needed info within SP itself? Using...
June 9, 2010 at 10:26 am
Hi Mahesh,
Context_info is unique per session. So, when multiple users are working on product, system will create separate session for each session. So there is no any issue.
Thanks,
Tejas
SQLYoga.com
June 9, 2010 at 10:19 am
Hi,
You can achieve the same by this query.
DECLARE @t TABLE( ID INT IDENTITY, data VARCHAR(100))
INSERT INTO @t(data) SELECT 'tejas@tejas.com;tejas@shah.com;tejas@SQLY@oga.com'
INSERT INTO @t(data) SELECT 'tejas@tejas.com;tejas@shah.com;'
;WITH CTE AS(
SELECT ID,
SUBSTRING(data,0, LEN(data)+1) AS Data,
LEN(data)...
September 9, 2009 at 7:29 am
Hi Lynn,
I am totally agreed with you. Jeff answer is correct, as OP wants this for reporting purpose.
SQL Reporting services, gives the facility to sort column. It is using...
August 1, 2009 at 6:46 am
Hi,
Its better to use DATEADD(dd,0, DATEDIFF(dd,0,GETDATE())) instead of the conversion.
Because when you use this syntax fro order by, it will order t by date, while in VARCHAR, it will make...
August 1, 2009 at 4:56 am
July 30, 2009 at 7:43 am
Hi,
You can write query as:
SELECT Col1, Col2, Col3, Col4
FROM table
WHERE (@db IS NULL OR Col1 = @Db)
AND (@month IS NULL OR...
May 28, 2009 at 4:15 am
Hi,
Updates in batch will lock whole table, if half of the data from table is being updated.
its better to use update one by one or in small batch, I preferred...
May 28, 2009 at 4:10 am
Hi,
We met again 🙂
Update your Procedure as:
CREATE PROC dbo.testingloop
(
DECLARE @testid varchar(max)
)
AS
BEGIN
SET NOCOUNT ON
DECLARE @sql varchar(600)
SET @testvalue = CURSOR FOR
SELECT [test ID]) FROM Data42 where [test ID]...
April 24, 2009 at 1:58 am
Hi,
My Query is:
DECLARE @t TABLE (ID INT IDENTITY, StartDate DATETIME, EndDate DATETIME)
INSERT INTO @t (StartDate, EndDate) SELECT '3/2/2009 8:00AM',...
April 21, 2009 at 1:55 am
Hi,
It is something same like this:
Sometime ago Mr.Jacob Sebastian (MVP, SQL SERVER) given TSQL Challenge.
Please refer that link. I solved that Challenge and also Topper in it. You can find...
April 21, 2009 at 1:35 am
Hi,
You can use OpenRowSet/OpenQuery to get data from different database located on different server.
You can write query as:
SELECTa.*
FROMa
INNER JOIN OPENROWSET('SQLOLEDB','ServerAddress';'UserName';'Password',
'select * from Table
') b
ON a.ID =...
April 20, 2009 at 11:10 pm
Viewing 12 posts - 1 through 12 (of 12 total)