Viewing 15 posts - 9,436 through 9,450 (of 10,143 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...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
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...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
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 =...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
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...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
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]...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
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...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
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....
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
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...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
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...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
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...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
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
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
October 17, 2008 at 9:07 am
Cool, many thanks for the feedback.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
October 17, 2008 at 8:53 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...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
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...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
October 17, 2008 at 8:31 am
Heh heh! It doesn't have a profanity checker. At least two of my colleagues have something along the lines of "FindTheF****r"!
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
October 17, 2008 at 8:08 am
Viewing 15 posts - 9,436 through 9,450 (of 10,143 total)