Viewing 15 posts - 49,366 through 49,380 (of 49,571 total)
No problem.
I can't see anything wrong either. If you replace the sp_executeSQL with Print, what's the resulting statement? (checking to see that nothing strange has snuck into the variables)
October 18, 2005 at 6:41 am
That would be true, if there wasn't a TOP 1 in each of the subqueries.
The final order of the union is undefined, but it consists of the first records in...
October 18, 2005 at 4:47 am
This however does work
select Col1, Col2 FROM
(select top 1 Col1, Col2 from TableA order by Col2) a
UNION
select Col3, Col4 FROM
(select top 1 Col3, Col4 from TableB order by Col4) b
October 18, 2005 at 4:06 am
How many processors does your server have?
What connection settings/SET options is the app using?
October 18, 2005 at 2:12 am
At first glance (no coffee yet) I'd guess it has something to do with the fact that you have two tables with the same alias. You have both SupplierItemAttributeValue sv...
October 18, 2005 at 12:33 am
Profiler should work. Capture the SP:StmtStarting event (under stored procedures)
Otherwise you can create a 'debugging' table and have the stored proc insert the query that it's about to execute in...
October 18, 2005 at 12:21 am
Home machine: (custom built)
Athlon 3200 XP
1.5 GB memory
220 GB hard drive (1x200 GB, 1x20 GB)
DVD reader
CD Writer
Soundblaster Live
GeForce 6800 LE
17" monitor (don't have space on desk for larger)
+ accessories...
October 17, 2005 at 6:20 am
Please don't cross-post. Most people here read multiple forums.
Besides, this belongs in the Job Postings forum, not here.
October 17, 2005 at 2:37 am
This should get you what you want.
SELECT MasterTable.Name, DetailTable.Id, DetailTable.Day, DetailTable.Result, DetailTable.Campaign, DetailTable.PhoneNumber FROM DetailTable INNER JOIN
(SELECT MAX(ID) AS LatestID, PhoneNumber
FROM DetailTable
GROUP BY PhoneNumber) LatestEntry ON...
October 17, 2005 at 2:25 am
Could you please post the DDL of your tables and some example data? It'll make things a lot easier for us to come up with a solution.
What do you mean...
October 17, 2005 at 1:39 am
Thanks. Didn't know that the number was actually a page number.
Never seen that DBCC command before either. (even in the list of DBCC commands that I found)
Thanks.
October 14, 2005 at 7:19 am
I can't answer your conversion question, but I was faced with a similar problem a few months ago. What we decided to do was to add an additional step at the...
October 14, 2005 at 6:03 am
That works great. Thank you very much.
Would you mind explaining what/how the xpath works there?
October 13, 2005 at 4:36 am
Rather don't use the ansi_nulls setting and write your stored proc as follows
Create Procedure TestNulls
As
Begin
Select * from T1 Where (C1=C2 OR (C1 IS NULL AND C2 IS NULL))
End
October 13, 2005 at 1:01 am
DECLARE @Value DECIMAL(8,0)
SELECT @Value = 10005555
SELECT CAST(SUBSTRING(CAST (@Value AS VARCHAR(8)),1,4) AS DECIMAL(4,0)) AS FirstHalf,
CAST(SUBSTRING(CAST (@Value AS VARCHAR(8)),5,4) AS DECIMAL(4,0)) AS SecondHalf
HTH
October 12, 2005 at 4:49 am
Viewing 15 posts - 49,366 through 49,380 (of 49,571 total)