Viewing 9 posts - 1 through 9 (of 9 total)
Doing what Andy did, I first got:
Server: Msg 209, Level 16, State 1, Line 1
Ambiguous column name 'Val'.
Server: Msg 209, Level 16, State 1, Line 1
Ambiguous column name 'Val'.
Then changed this:
SELECT...
September 30, 2005 at 12:28 am
Try this:
drop procedure dbo.ClntExport
go
create procedure dbo.ClntExport (@par1 varchar(50)) as
--do some stuff
select 'The parameter is: ' as MyDesc,@par1 as MyPar union
select 'Dummy record is : ','Dummy'
go
drop procedure dbo.ClntImport
go
create...
August 5, 2005 at 3:43 am
You would have to Cut-n-paste a lot, but maybe this helps:
create table #t1 (pk_id int,col1 varchar(5), col2 varchar(5), col3 varchar(5))
create table #t2 (pk_id int,col1 int, col2 int, col3 int)
insert #t1...
June 28, 2005 at 5:52 am
3RD time lucky
declare @v1 int
set @v1 = 105000
update a
set @v1 = @v1+1,
a.attribute_id = @v1
from YourTable a
where isnull(a.attribute_id,0) = 0
June 28, 2005 at 5:02 am
Sorry !!
where isnull(a.attribute_id,0) = 0
June 28, 2005 at 4:52 am
What about:
declare @v1 int
set @v1 = 105002
update a
set a.attribute_id = @v1 = @v1+1
from YourTable a
where isnull(a.Prop_ID,0) = 0
June 28, 2005 at 3:41 am
Try using charindex() eg:
declare @v1 varchar(100)
set @v1 = '1,2,3,4,5' --your incoming list
set @v1 = ','+@v1+','
select * from YourTable where charindex(','+YourField+',',@v1) > 0
April 6, 2005 at 12:36 am
Hi,
Veteran might have overlooked something. Try:
SELECT A.Dept_ID,
A.Dept_Name,
A.Date_Stamp
FROM Departments A
WHERE A.Date_Stamp = (SELECT MAX(Date_Stamp)
FROM Departments B
WHERE A.Dept_ID = B.Dept_ID)
AND
A.Time_Stamp = (SELECT MAX(Time_Stamp)
FROM Departments C
WHERE A.Dept_ID = C.Dept_ID AND
A.Date_Stamp = C.Date_Stamp)
October 11, 2004 at 12:41 am
Use a SP with "output" ?
drop table ##employee
go
select 'AA' as code,123 as employee_id into ##employee
go
drop procedure p1
go
create procedure p1 @Code varchar(10),@@employee_id int output as
SELECT @@employee_id = employee_id
FROM ##employee
WHERE code =...
August 27, 2004 at 1:11 am
Viewing 9 posts - 1 through 9 (of 9 total)