Viewing 15 posts - 9,436 through 9,450 (of 10,144 total)
pramod.chauhan (11/5/2008)
@ab will have the all employeeid selected in reporting service interface.
and then i want to pass the @ab to stored procedure to give employee details.
there...
November 5, 2008 at 8:09 am
pramod.chauhan (11/5/2008)
firstly set @ab='''483503''' is creating a variable who value is '483503'
Why do you want to store that extra pair of single quotes as part of the variable?
The value...
November 5, 2008 at 7:10 am
Eswar, you code is close:
UPDATE t SET disabled = 1
FROM tasks AS t, milestones AS m
WHERE t.milestoneid = m.milestoneid
AND m.projectid=15
Using proper join syntax this is
UPDATE t SET disabled =...
October 30, 2008 at 2:06 am
Hi Sudhakara
The problem is this: you think your statement should be operating on a row-by-row basis.
Look at a row; if name <> 'name1' and age <> 25 then keep for...
October 28, 2008 at 2:51 am
Hi Debbie
With a clustered index on your table...
DROP TABLE dbo.ECAFALL
CREATE TABLE dbo.ECAFALL(
[Person] [int] NULL,
[TYPE]...
October 21, 2008 at 3:42 am
This should do it...
SELECT TOP 1 d.[ID], d.INFO
FROM (
SELECT TOP 2 s.[ID], p.INFO, p.[DATE]
FROM PRODUCTS p
INNER JOIN SALES s ON s.[ID] = p.[ID]
WHERE p.[DESC] LIKE 'FLAG SET TO%'
AND...
October 20, 2008 at 9:25 am
Hi Buzz
The short answer is Yes, they can: it's called Server Linking in BOL. It can be fiddly and may not work depending upon the csv format of the files....
October 20, 2008 at 7:39 am
This should do the trick:
SELECT TOP 1 * FROM (
SELECT TOP 2 *
FROM PRODUCTS
WHERE ID = 'A1425' AND DESC LIKE 'FLAG SET TO%'
ORDER BY DATE DESC
) d...
October 20, 2008 at 7:30 am
EdVassie (10/20/2008)
Although it can be done in SQL Server, application code does this task far...
October 20, 2008 at 6:33 am
Try this, then.
DROP TABLE #employee
DROP TABLE #employee1
Create Table #employee
(
Empid int,
Employee varchar(20)
)
Create Table #employee1
(
Empid int,
Employee varchar(20)
)
Insert into #Employee values('1','Sirish')
Insert into #Employee values('2','Sateesh')
Declare @Strquery varchar(100)
SET @StrQuery='Select Empid,Employee from #Employee'
EXEC(@StrQuery)
SET @StrQuery='INSERT INTO #employee1...
October 17, 2008 at 9:21 am
Yes it is, provided that the temp table exists from the calling session (of the dynamic statement). You can also use
EXEC('INSERT INTO #Temp (columnlist) SELECT...')
Cheers
ChrisM
October 17, 2008 at 9:07 am
It's a long shot, but is there any difference if you use the alias in the UPDATE? I know it can, under some circumstances, make a substantial difference to performance.
update...
October 17, 2008 at 8:45 am
Try this...
[font="Courier New"]DECLARE @passval DATETIME, @sql NVARCHAR(1000)
SET @passval = (SELECT DATEADD(DAY, -1, GETDATE()))
SELECT @sql = N'declare cursearch cursor for select * from openquery(dbssqts1,
''Select convert(varchar(100), name) as accname,
convert(datetime, loginproperty(name, ''''PasswordLastSetTime'''')) as...
October 17, 2008 at 8:31 am
Viewing 15 posts - 9,436 through 9,450 (of 10,144 total)