Viewing 15 posts - 2,281 through 2,295 (of 6,036 total)
Ray Waldron (6/29/2005)
I know this is because the Table jobs contains datatypes of CHAR,DATE,INTEGER,TIME and to start with I know the date datatype must be casing problems....
If those are only...
December 8, 2011 at 7:01 pm
Write a scalar function implementing the conversion rules.
Something like this:
SET @Result = convert(numeric, 18,2), -- change to the data type you actually need in your target table
CASE
WHEN RIGHT(@InputStr,...
December 8, 2011 at 6:54 pm
DECLARE @NeededDW tinyint, @AfterDate datetime
SET @NeededDW = 5
SET @AfterDate = GETDATE()
select MIN(Date)
from Tally
WHERE Date > @AfterDate
AND DayOfWeek = @NeededDW
December 8, 2011 at 6:38 pm
Create "sp_" procedure in master database.
Put your code in there.
Then use handkot's approach to execute that procedure for each database.
October 21, 2011 at 2:34 am
There are some questions about your original example.
1. SELECT goes like this:
select r.Request, r.city, ...
from request r ...
which means these 2 values come from the same record.
But in your data...
October 21, 2011 at 2:24 am
You use RTRIM + ' ' only if 2 or more last characters in the 1st column are spaces.
If LEN >=19 then just concatenate as it is, do not change...
October 14, 2011 at 4:20 am
iposner (9/19/2011)
September 19, 2011 at 3:37 pm
ispooner,
Does anything from your post make the approach less wrong?
If not, then what was that about?
I'm aware of the common practices.
Cursors, loops, denormalized tables, etc. - used as common practices...
September 19, 2011 at 5:04 am
What about this scenario:
Site A is functioning well and persists orders 1 to 10
Site B is passive but kept up-to-date so effectively it has copies of orders 1 to 10.
Lightning...
September 18, 2011 at 9:25 pm
JBANKO (9/5/2011)
Two things kinda negate that. The tables are inviolate. They are what they are and can't be changed, been there since the 5th day of creation.
I doubt it....
September 6, 2011 at 8:13 am
Normalize your data and all your problems will go away.
🙂
Put the data into:
(
TermID,
StudentID,
CourseID
)
Then you're not gonna have a problem running queries for:
- list of courses for any student on any...
August 31, 2011 at 4:01 pm
Yeah, that's what you get whet you try to sort out French...
🙂
If seriously,
in your data sample:
10, 11 are "students",
Col1, Col2, Col3 contain list of courses taken.
Where are terms?
August 31, 2011 at 4:49 am
Hi JBANKO,
I'm afraid your description is quite messy and inconclusive.
It does not explain the logic whaich must be used to get the desired set.
You say:
What I NEED to show is...
August 29, 2011 at 6:54 pm
Let's clear with this first:
doug 40899 (8/19/2011)
Jeff,... there were a few missing lines of data, when I ran it with the union, all of it is there.
Apparently, it's not quite...
August 22, 2011 at 3:18 pm
doug 40899 (8/19/2011)
I've tried that and didn't get back all of the correct results. I did a line by line comparison for running my query with everything after the union...
August 21, 2011 at 5:52 am
Viewing 15 posts - 2,281 through 2,295 (of 6,036 total)