Viewing 15 posts - 17,986 through 18,000 (of 18,926 total)
we're both making assumptions and without the code there's no point in continuing this discussion.. I'll wait for his answer before drawing any final conclusion.
April 28, 2005 at 12:18 pm
It's pretty much the same thing I said. What else do you need to know?
April 28, 2005 at 12:01 pm
Nah...
For the whole month... so it makes more sens
.
April 28, 2005 at 11:52 am
You need to double each apostrophe in the query.
SELECT * FROM OPENQUERY(BARBSLIVE, 'SELECT REPLACE(d.agtpostcode, CHAR(32), '''') as pcode, c.agtname as name, MAX(d.agtrefno) as maxcode
FROM EntaLive.dbo.agent as c ,EntaLive.dbo.AgentAddress as...
April 28, 2005 at 11:49 am
Select ...
union all
select ...
order by ColName
This is the trick, but in your exemple you want 'b' to come before 'a' which requires either a desc order or some sort of...
April 28, 2005 at 11:47 am
Just reread the code, maybe something like this :
UPDATE AE SET AE.count_fact = dtCounts.count_fact
FROM tmp_ar_exception AE INNER JOIN
(
SELECT DISTINCT F_AR_Detail.date_id, COUNT(F_AR_Detail.date_id) AS count_fact FROM tmp_ar_exception LEFT OUTER JOIN
...
April 28, 2005 at 11:44 am
What is the rules that tells which row is the correct one?
April 28, 2005 at 11:39 am
What I usually do for stuff like this is dump all the data into a temp table. Once you get your data there you can transfer the data that...
April 28, 2005 at 11:38 am
anything between 0 and 11 (int) divided by 12 (int) = 0, then 1 untill you get to 24. That's why I changed the 1 to 1.0 (decimal) /...
April 28, 2005 at 11:35 am
Your problem comes from the fact that you cannot use alias in the group by clause, this is allowed only in the order by clause.
SELECT REPLACE(d.agtpostcode, CHAR(32), '') as...
April 28, 2005 at 11:32 am
Yes you can but I'd expect an operation like this to create duplicates. What r u trying to achieve by this?
April 28, 2005 at 11:27 am
What you have here is 2 separate, unrelated, statements.
Can you post the table definition along with some sample data. We'll also need to see what results you are trying...
April 28, 2005 at 11:26 am
Select custId, lName, fName from dbo.Customers where CanceledOrder = 0
April 28, 2005 at 11:21 am
You could always do something like this :
select 'A' as Data, count(*) from dbo.SysColumns
union ALL
select 'B', count(*) from dbo.SysColumns
Order by Case When Data = 'B' THEN 0 ELSE 1...
April 28, 2005 at 11:19 am
I also thaught about this solution but I presumed that there was more unions in the select...
April 28, 2005 at 11:17 am
Viewing 15 posts - 17,986 through 18,000 (of 18,926 total)