Viewing 15 posts - 571 through 585 (of 1,347 total)
Your "fix with a single quote" is not a fix and introduces another bug.
The root problem is this line:
@moduleName ='Part I'
It should be
SET @moduleName ='Part I'
February 17, 2006 at 9:20 am
You are missing parentheses around the parameters:
CREATE PROCEDURE [dbo].[get_phy_list] (
@DateFrom datetime,
@DateTo datetime,
@mName varchar(50) =null
)
AS
February 17, 2006 at 9:06 am
I agree, the answer is technically incorrect without the cast.
The syntax with the cast is below. This runs in my Northwind with no errors:
SELECT
ProductName,
UnitsInStock,
CASE...
February 16, 2006 at 4:27 pm
As long as there is no WHERE clause on your query, then all 4 should produce the same execution plan and execute in the same time.
The plan will most likely...
February 16, 2006 at 4:24 pm
ReorderLevel =
CASE
WHEN ReorderLevel IS NOT NULL THEN ReorderLevel
ELSE 'Not Specified'
END
The "Reorderlevel" in red font is the alias. This is old-style...
February 16, 2006 at 4:17 pm
What was the question ?
Technically it is incorrect and needs to CAST() the ReOrderLevel so that the same column can hold numbers and 'Not Specified'.
Depends on what the question was...
February 16, 2006 at 3:52 pm
Write SQL to generate SQL:
SELECT 'SELECT * INTO ' + name + '_Copy FROM ' + name + ' WHERE 0 = 1'
FROM sysobjects
WHERE type = 'U'
Take the output of...
February 16, 2006 at 11:27 am
You need to join to the table twice, assigning aliases to differentiate each instance of the table:
Select
Contact.FirstName AS 'PersonCalling',
[Case].CreatedById,
[UserC].FirstName as 'OpenedBy',
[Case].OwnerId,
[UserA].FirstName as 'AssignedTo'
FROM [Case]
INNER...
February 16, 2006 at 11:24 am
The date was your clue that it was the table containing the date that you should look at.
The date column in the resultset was pd.OnHold
If you are still joining to...
February 16, 2006 at 9:23 am
Do you have an Oracle DBA that can help you ?
I've only worked with Oracle 7 & 8 connected to Sql Server, but I don't even try any SQL connectivity...
February 15, 2006 at 11:58 pm
What have you tried so far ?
Can you TNSPing the Oracle instance you're trying to connect to ?
Have you read the BOL example code under the sp_addlinkedserver topic:
February 15, 2006 at 11:35 pm
Behind the scenes, any table prefixed with '#' is decorated with additional connection /session data to make it unique.
If you are concerned about scope, you could also use a table-type...
February 15, 2006 at 3:05 pm
Insufficient info, based on your sample data.
eg: Data value 'AFGBS004SA55'
Is that the number 4 ? Or 55 ? or 455 ? What are the requirements/rules for parsing a value with...
February 15, 2006 at 2:46 pm
You have to declare a table or temp table that matches the columns in the resultset, then use INSERT INTO.
eg:
CREATE TABLE #Temp ( {Your column list goes here} )
INSERT INTO...
February 15, 2006 at 2:39 pm
>>Do you have a recomendation on how to do pagination in a stored proc.
It depends on what you have available, in terms of data and version of Sql Server.
If you're...
February 15, 2006 at 2:13 pm
Viewing 15 posts - 571 through 585 (of 1,347 total)