Viewing 15 posts - 1,696 through 1,710 (of 2,171 total)
Ahhh! You put numeric data in the BETWEEN? Then SQL Server tries to convert the base data to the datatype in the BETWEENS.
I use Developer Edition of SQL Server 2005...
N 56°04'39.16"
E 12°55'05.25"
April 8, 2007 at 10:00 am
How can this error occur?
I don't do any type of conversion here!
The only reason for this, is that you don't post the full query. You must use this and put...
N 56°04'39.16"
E 12°55'05.25"
April 8, 2007 at 9:20 am
SELECT
*
FROM qSoldier
WHERE regNo NOT LIKE '%[^0-9]%'
AND regNo...
N 56°04'39.16"
E 12°55'05.25"
April 7, 2007 at 2:23 pm
I think some sample data and expected output would be nice.
N 56°04'39.16"
E 12°55'05.25"
April 7, 2007 at 2:18 pm
Yes, the last part posted above
SELECT
s.EmpID,
s.ManagerID
FROM @Sample AS N 56°04'39.16"
E 12°55'05.25"
April 7, 2007 at 7:39 am
Try something like this!
-- Prepare sample data
DECLARE @Sample TABLE (EmpID VARCHAR(4 N 56°04'39.16"
E 12°55'05.25"
April 7, 2007 at 7:03 am
You also need to check, for example
Employee A reports to Employee B.
Employee B reports to Employee A.
or
Employee A reports to Employee B.
Employee B reports to Employee C.
Employee C reports to Employee...
N 56°04'39.16"
E 12°55'05.25"
April 7, 2007 at 6:48 am
Check for CIRCULAR REFERENCE!!!
Either an employee who has herself/himself as manager, or a larger chain fo managers that creates a "circle".
N 56°04'39.16"
E 12°55'05.25"
April 7, 2007 at 6:16 am
???
Where is the difference, Jeff?
"Employe" or "Employee"?
N 56°04'39.16"
E 12°55'05.25"
April 7, 2007 at 12:20 am
Asked and answered here
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=81761
N 56°04'39.16"
E 12°55'05.25"
April 7, 2007 at 12:13 am
Jason, either is equally good for now.
But... If original poster (OP) wants to extend the query to include sum of total order amount for each line, my query is easier...
N 56°04'39.16"
E 12°55'05.25"
April 7, 2007 at 12:11 am
The derived table y you must replace with the aggregation for you OrderHead table.
N 56°04'39.16"
E 12°55'05.25"
April 6, 2007 at 2:20 pm
As long as you understand what the query do, it's fine.
Thanks. And good luck!
N 56°04'39.16"
E 12°55'05.25"
April 6, 2007 at 2:09 pm
Try this approach
SELECT Txt, Cnt FROM ( SELECT c.Txt, COUNT(*) AS Cnt, c.Sort FROM ( SELECT '$0-$10' AS Txt, -1 AS LowLimit, 10 AS HighLimit, 0 AS Sort...
N 56°04'39.16"
E 12°55'05.25"
April 6, 2007 at 2:03 pm
Viewing 15 posts - 1,696 through 1,710 (of 2,171 total)