Viewing 15 posts - 1,381 through 1,395 (of 1,491 total)
How long did the select statement take and how long did the SP take?
October 23, 2006 at 10:32 am
OK. Does running the following SP run like
EXEC dbo.Test @pShipmentStatus = 'Live'
still take 22 secs?
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE dbo.Test
@pOrderStatus VARCHAR(10) = ''
,@pShipmentStatus VARCHAR(10) = ''
AS
SET NOCOUNT...
October 23, 2006 at 8:58 am
In QA, if
select * from v_ORder where ShipmentStatus = 'Live'
takes 2 secs to run, how long does:
DECLARE @test-2 varchar(10)
SET @test-2 = 'Live'
SELECT *
FROM v_ORder
WHERE ShipmentStatus = @test-2
take to run?
October 23, 2006 at 7:28 am
You will get a quicker response in the T-Sql forum.
This should work but probably can be optimized.
I do not have time to look at it further.
-- Test Data
DECLARE @Rate TABLE
(
DialCode...
October 20, 2006 at 4:05 pm
Sreejith is pointing out that DATETIME is just a number and how you see it formatted depends on a number of settings.
To explicitly format the DATETIME in US format, you...
October 20, 2006 at 12:27 pm
You keep posting this code, which does not make much sense. Try starting with something like:
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE dbo.TestProc
@quiz NVARCHAR(25)
AS
SET NOCOUNT ON
CREATE TABLE #tmpTrained
(EmplID CHAR(30)...
October 20, 2006 at 10:45 am
Following David’s suggestion, which will require your TEXT column to always be <= 8000 characters and to be converted to VARCHAR, try this:
-- Test Data
DECLARE @t TABLE
(
TID INT not null
,TText...
October 20, 2006 at 8:19 am
Sergiy was asking for the datatypes, and lengths, of the ShipmentStatus and OrderStatus columns in the table/tables that lie beneath the view.
October 20, 2006 at 7:29 am
I missed one of your dates in my previous post. Now corrected:
-- Test Data
DECLARE @t TABLE
(
TID INT not null
,TText TEXT null
)
INSERT @t
SELECT 1, 'Rental No. 00088 Items: GIZMO (CW105715) Rental...
October 20, 2006 at 7:15 am
If the date you are looking for always terminates with 'PATIENT NAME:', why bother with a function? eg:
-- Test Data
DECLARE @t TABLE
(
TID INT not null
,TText TEXT null
)
INSERT @t
SELECT 1, 'Rental...
October 20, 2006 at 7:03 am
With the =* and *= notation, I find it best to think of the * being against the table where every row is displayed.
eg. Assuming AID does not allow nulls:
SELECT col1...
October 20, 2006 at 2:09 am
I have not used old style outer joins for some time, so maybe I am missing something, but I think:
SELECT f.hz, f.amp
FROM freq f (NOLOCK)
,outcome o (NOLOCK)
,flip fl1 (NOLOCK)
WHERE o.id...
October 19, 2006 at 11:44 am
Try something like:
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE dbo.s_Status_View
@Status VARCHAR(10)
AS
SET NOCOUNT ON
DECLARE @translate TABLE
(
Status VARCHAR(10) COLLATE DATABASE_DEFAULT NOT NULL PRIMARY KEY
,Order_Status INT NOT NULL
)
INSERT @translate
SELECT 'New', 88 UNION...
October 19, 2006 at 10:55 am
Thinking about it, the second example will neither rollback nor commit. This means that when the session finishes, the INSERTs to the first table should be rolled back unless they...
October 19, 2006 at 10:33 am
Viewing 15 posts - 1,381 through 1,395 (of 1,491 total)