Viewing 15 posts - 946 through 960 (of 1,228 total)
Ringo-394296 (4/18/2011)
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 18, 2011 at 9:38 am
Phineas Gage (4/18/2011)
ChrisM@home (4/18/2011)
declare @Last7Days CHAR(8)
SELECT @Last7Days = CAST(YEAR(CURRENT_TIMESTAMP - 7) * 10000 + MONTH(CURRENT_TIMESTAMP - 7) * 100 + DAY(CURRENT_TIMESTAMP - 7) AS CHAR(8))
SELECT...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 18, 2011 at 9:16 am
Is there any advantage in includeing all of the columns in that index? Have you tried the same index with no included columns?
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 18, 2011 at 9:10 am
Plan B, using Lowell's code:
declare @Last7Days CHAR(8)
SELECT @Last7Days = CAST(YEAR(CURRENT_TIMESTAMP - 7) * 10000 + MONTH(CURRENT_TIMESTAMP - 7) * 100 + DAY(CURRENT_TIMESTAMP - 7) AS CHAR(8))
SELECT ...
WHERE table-name-removed >=...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 18, 2011 at 9:01 am
Double check the datatype of that INT date column. I reckon it's a text type, not an INT.
@ninja - good spot, mate - you saw this coming 🙂
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 18, 2011 at 8:55 am
Try it with the quotes.
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 18, 2011 at 8:49 am
You're nearly there...check out RANK() and DENSE_RANK().
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 18, 2011 at 8:46 am
Phineas Gage (4/18/2011)
ChrisM@home (4/18/2011)
How long does it take to run this:
WHERE table-name-removed >= '20110411'1 second...see comments above
Did you include the single quotes around the number?
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 18, 2011 at 8:44 am
How long does it take to run this:
WHERE table-name-removed >= '20110411'
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 18, 2011 at 8:37 am
Ryan Keast (4/18/2011)
I am importing the following example of data into a SQL 2000 database -
01|171|Fri|A0277730|.03|1|.0333|JOBS|03/12/10||
01|171|Fri|A0277742|.03|2|.0333|JOBS|03/12/10||
01|193|Mon|A0277843|1.45|1|1.4499|JOBS|06/12/10||
01|193|Mon|A0278032|.03|2|.0333|JOBS|06/12/10||
01|193|Mon|A0278054|.23|3|.2333|JOBS|06/12/10||
01|193|Mon|A0278256|1.48|4|1.4833|JOBS|06/12/10||
When imported the data is being held as .03 and .23 as examples.
How...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 18, 2011 at 8:17 am
Jeff Moden (4/18/2011)
ChrisM@home (4/18/2011)
nikplic (4/17/2011)
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 18, 2011 at 7:58 am
nikplic (4/17/2011)
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 18, 2011 at 6:22 am
sunnymalhotra (4/18/2011)
If exists (select idbatch from jbjob inner join insts_temp on insts_temp.inst = jbjob.idInst and insts_temp.BusDate = jbjob.BusinessDate and jbjob.idbatch=40)
Begin
...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 18, 2011 at 3:50 am
Hi Sunny
Posting your solution may help others with a similar problem - also, it would allow the community to verify your solution and if necessary make further recommendations.
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 18, 2011 at 1:59 am
carlos 5652 (4/15/2011)
Are you still in the job market?
With those credentials my friend he will have been snapped up in 21 minutes, not months 😀
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 15, 2011 at 12:39 pm
Viewing 15 posts - 946 through 960 (of 1,228 total)