Viewing 15 posts - 436 through 450 (of 454 total)
Use the same table with Alias for each field like employees mgr on mgr.id=a.mgr_id , employees emp1 on emp1.id=a.emp1_id so on..
March 9, 2004 at 8:43 am
I tried this but got an error:-
Error: Incorrect syntax near the keyword 'CASE'. (State:37000, Native Code: 9C)
Any ideas why?
The syntax should be pretty fine unless you forgot to...
March 4, 2004 at 2:52 am
Well what is the format in which the dated field is saved in present context.
March 4, 2004 at 2:49 am
Yeah should absolutely solve it without any issues whatsoever.
March 3, 2004 at 8:56 am
Well can we directly execute a Stored Procedure inside a Cursor and Loop over the results returned by the executed Stored Procedure.
I don't know if this question is related in...
March 3, 2004 at 8:48 am
I believe this should help:
CREATE PROCEDURE USP_RULE
AS
CREATE TABLE #TABLE1
(
SlNo int identity(1,1), EqNum varchar(25),Pointnum varchar(25)
)
declare @EqNum varchar(25),@Pointnum varchar(25)
DECLARE @STRDBNAME VARCHAR(50)
SET @STRDBNAME = 'DB1'
EXEC('insert into #TABLE1 select EQNUM,POINTNUM from
March 3, 2004 at 8:41 am
How about this, we can get rid of the substring as well.
select ''''+convert(varchar(10),convert(datetime,'1 Feb 1990'),120)+''''
Or say for current day
select ''''+convert(varchar(10),convert(datetime,GETDATE()),120)+''''
March 2, 2004 at 4:09 am
I hope this helps you
CREATE PROCEDURE GetFacilities
@userID NVARCHAR(100),
@language NVARCHAR(100)
AS
DECLARE @sql_str VARCHAR(1000)
SET @sql_str = 'SELECT Name,
(SELECT ' + @language + ' FROM lkpfacilitytype WHERE ID = Type) AS Type,
Address1,
Address2,
City,
State,
ZIP,
Country,
Phone,
Fax,
WebSite
FROM tblFacilities
WHERE...
February 28, 2004 at 6:15 am
Using is as good as passing the input parameters to SQL Query used in the cursor :
In Oracle in the example that you sited basically SQLVAL should have been a Dynamic SQL framed on some...
February 28, 2004 at 2:01 am
When the two tables are residing on two different databases is it not a must to prefix the database name to the table name like
UPDATE database1.dbo.TableA Set ValueToBeReplaced =...
February 28, 2004 at 1:53 am
Well is there anyway that we can get the last modified date too like if we are adding some constraints from Enterprise Manager then basically it is going to dump...
February 28, 2004 at 1:41 am
I am wondering if the SP works at all with the syntax that it is written with currently , I believe the variables should not be included inside the...
February 27, 2004 at 4:30 am
Well I found the problem with my code, basically I am calling the execute with a wrong syntax as
exec @query1
and then it is displaying an error
Server: Msg 203, Level...
February 27, 2004 at 4:07 am
Actually I never had a problem executing this query but my very issue was that when I keep the total query in a single variable say @query1 and execute @query1...
February 27, 2004 at 3:29 am
Viewing 15 posts - 436 through 450 (of 454 total)