Viewing 15 posts - 7,696 through 7,710 (of 10,143 total)
"There's nowt so queer as folk".
How many of us can remember as far back as our first four or five years? Do you remember that kid who used to experiment...
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
July 8, 2010 at 2:49 am
Lynn Pettis (7/7/2010)
Alvin Ramard (7/7/2010)
CirquedeSQLeil (7/7/2010)
Alvin Ramard (7/7/2010)
CirquedeSQLeil (7/7/2010)
Alvin Ramard (7/7/2010)
Jeff Moden (7/7/2010)
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
July 8, 2010 at 2:24 am
Cenote
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
July 8, 2010 at 2:09 am
Tom.Thomson (7/7/2010)
retirement is even busier, I understand.
Keep it that way! Blokes who retire in the common sense seldom last the year.
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
July 8, 2010 at 2:08 am
No worries.
Grab yourself a beginners' TSQL book, there are loads on Amazon - and get to know BOL, the SQL Server on-line help guide. Basic TSQL is quick to pick...
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
July 7, 2010 at 10:03 am
Ok...let's get started then. When scripting an UPDATE, always start with a SELECT. Something like this:
SELECT TOP 100 [disabled], [date created]
FROM MyTable
WHERE [date created] < '2005-06-01 00:00:00.000'
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
July 7, 2010 at 8:44 am
omd (7/7/2010)
Chris Morris-439714 (7/7/2010)
UPDATE MyTable SET [disabled] = MyNewValue
WHERE [date created] < 'June 2005'
Edit: This is a basic UPDATE statement, it doesn't get any easier - except you will...
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
July 7, 2010 at 8:28 am
espanolanthony (7/7/2010)
still no comments. 17 views
Plenty of comments!
What have you tried so 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
July 7, 2010 at 8:07 am
omd (7/7/2010)
Chris Morris-439714 (6/21/2010)
Looks like an UPDATE to me.
UPDATE docsadm.shellorganisationSET [disabled] = 'y'
WHERE docsadm.shellorganisation.org_name LIKE 'do not use%'
Sorry to drag an old thread back up to the top, however...
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
July 7, 2010 at 8:04 am
You could split it into two possible options like this:
IF @VarCourse_Name IS NULL
BEGIN
SELECT *
FROM Course
WHERE freetext(Course_Name, @VarCourse_Name)
AND Course_Id = COALESCE(Course_Id, NULLIF(@VarCourse_Id, 0))
AND ...
END
ELSE
BEGIN
SELECT *
FROM Course
WHERE 1 = 1
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
July 5, 2010 at 6:28 am
nazaninahmady_sh (7/5/2010)
ok, Course_Name if column name , so i wroteit correctly:Else (freetext(Course_Name,@VarCourse_Name))
but there is syntax error
As Eugene points out, this won't work because you're attempting to compare
Course_Name with...
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
July 5, 2010 at 6:02 am
nazaninahmady_sh (7/5/2010)
thank you for your notification but again i have that message:Incorrect syntax near the keyword 'freetext'.
Sorry, my mistake. This is a component of full-text searching. Is full-text search enabled?...
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
July 5, 2010 at 5:40 am
Assuming 'freetext' is a UDF then you need to qualify it with the schema name to which it belongs, typically like this:
(Course_Name = Case when ((@VarCourse_Name='') or (@VarCourse_Name is null))...
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
July 5, 2010 at 5:33 am
Femidom
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
July 2, 2010 at 9:12 am
espanolanthony (7/2/2010)
please see the attache3d excel file for details
Anthony, anybody wishing to get involved with this thread will need to convert your spreadsheet data into statements which can be interpreted...
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
July 2, 2010 at 9:11 am
Viewing 15 posts - 7,696 through 7,710 (of 10,143 total)