Viewing 15 posts - 31 through 45 (of 51 total)
hey francisco,
can you please clarify the problem ...
what do you mean by "when the sproc ends it spits out both the @MyID (which I don't want...
July 19, 2004 at 4:20 pm
hey joe,
you are almost there ... to get rid of rows with any zeroes your query would have to be a subquery ...
so, the final SQL would...
July 19, 2004 at 4:06 pm
hi jim,
i updated the code in my previous post to do the CAST operation using sp_executesql. Refer to the post that has the CREATE PROCEDURE statement ...
JP
July 18, 2004 at 5:02 pm
hey jim,
i think this should do the trick:
CREATE PROCEDURE dbo.usp_dyna_cast(@ReturnValue sql_variant OUTPUT)
AS
BEGIN
SET NOCOUNT ON
DECLARE @DisplayValue AS VARCHAR(255), @ItemType AS VARCHAR(255)
SELECT @DisplayValue...
July 18, 2004 at 2:41 pm
hey, try this to see if that is what you are looking for:
CREATE FUNCTION dbo.fn_dyna_cast() RETURNS sql_variant
AS
BEGIN
SET NOCOUNT ON
DECLARE @DisplayValue AS VARCHAR(255), @ItemType AS VARCHAR(255)
...
July 18, 2004 at 10:33 am
hey,
SQL Server does not allow variables for table names in the FROM clause, except for table variables.
Try to do the queries without relying in a dynamic table...
July 18, 2004 at 9:52 am
Have you tried updating the statistics and recompiling the database object (i.e: view, stored proc, etc.) in which the query resides to see if that improves performance?
I'm thinking...
July 17, 2004 at 9:33 pm
Hey, just a heads up ... I modified the T-SQL code in my previous post (i.e. the post that creates the fn_get_measure(..) function) based on rockmoose's recommendation to convert...
July 17, 2004 at 10:42 am
One approach I originally thought about was a straightforward queued approached to sending e-mails:
1) Whenever a document is inserted or updated in the EDMS database, have the corresponding...
July 16, 2004 at 10:34 pm
hey R B
try one of the following:
(1) Add an emailID to the workgroup_user table which is the mailing list e-mail address containing the email addresses of all...
July 16, 2004 at 2:01 pm
hey cedar, try this link:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_tsqlcon_6lyk.asp
for your your case, you would first need to declare a table variable say like this:
DECLARE @tempTable TABLE (
...
July 16, 2004 at 12:22 pm
hey, try this to see if that is what you are looking for:
SELECT
startdate_from = t1.startdate,
enddate_from = t1.enddate,
startdate_to = t2.startdate,
enddate_to = t2.enddate,
potential_error_id =...
July 16, 2004 at 12:01 pm
hey,
i think you are looking for something like this:
-- [BEGIN CODE]
CREATE FUNCTION dbo.fn_to_inches(@feet AS INTEGER, @inches AS INTEGER) RETURNS INTEGER
AS
BEGIN
DECLARE @result AS INTEGER
...
July 16, 2004 at 10:06 am
hey scking,
jt-75 is right ...
here is the query that jt-75 is talking about:
SELECT
Calculated_Value =
CASE
WHEN MonthsOfStock < 1 THEN 10
WHEN MonthsOfStock >=...
July 16, 2004 at 8:44 am
hey,
i think this is what you are looking for:
SELECT
e.EmpId,
PhNo = '' + CASE WHEN e.PhNo IS NOT NULL THEN e.PhNo + ',' ELSE '' END
FROM
T1...
July 15, 2004 at 6:42 pm
Viewing 15 posts - 31 through 45 (of 51 total)