Viewing 15 posts - 2,311 through 2,325 (of 5,588 total)
Luis,
Assuming:
1. That the numbers to be replaced are the only place in the string that any numbers are, and
2. That you want what is to the left of it, plus...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 23, 2010 at 6:35 pm
I've got two suggestions to try. Please get back and let us know how they work for you.
The first one moves the correlated subquery in the where clause to a...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 23, 2010 at 6:26 pm
Frank Nadal (11/23/2010)
GRRR I highlighted the sql results and clicked on "plain" on the left and it still inserted those stupid faces. Sorry.
I'll bet that those faces are a ":...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 23, 2010 at 6:15 pm
I'm glad I was able to straighten it out for you. Thank you for you comments, and I hope to see you more online here!
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 23, 2010 at 5:27 pm
SELECT column = (select column FROM function (t.address))
FROM Table t
you would have to repeat the call for each column you want.
On 2000, you might want to include an...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 23, 2010 at 3:49 pm
LutzM (11/23/2010)
Local temporary tables are visible only to their creators during the same connection...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 23, 2010 at 3:45 pm
How does this work for you?
-- See how this starts off with a table and data in it?
-- If you had provided us the data in this format,
-- it...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 23, 2010 at 3:38 pm
DECLARE @SQL VARCHAR(1000)DECLARE @Where VARCHAR(500)
SET @Where= 'Price >3.0'
SET @SQL = 'SELECT Symbol,Price FROM' +@test + ' '+@Where
In this, you are trying to concatenate a string and a table variable together....
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 23, 2010 at 2:30 pm
The scope of a table variable is the current batch only. It is NOT in scope to any nested procedures, including dynamic sql. So, if you want to use it...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 23, 2010 at 2:24 pm
GSquared (11/23/2010)
Alternately, strangle the developer who came up with the idea
Always a viable option!
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 23, 2010 at 2:22 pm
Craig Farrell (11/23/2010)
We laugh (or at least chuckle) at Alvin's jokes, for example.
No, that's a groan. 😀
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 23, 2010 at 2:18 pm
Craig Farrell (11/23/2010)
GSquared (11/23/2010)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 23, 2010 at 1:57 pm
GilaMonster (11/23/2010)
CirquedeSQLeil (11/23/2010)
GilaMonster (11/23/2010)
CirquedeSQLeil (11/23/2010)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 23, 2010 at 11:35 am
GilaMonster (11/23/2010)
Just as one hand can't clap, one session can't deadlock.
I like this analogy!
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 23, 2010 at 11:25 am
Oh - you don't need the TOP 100 PERCENT on all your queries - all you're doing is making SQL work harder / take longer to return your results.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 23, 2010 at 11:15 am
Viewing 15 posts - 2,311 through 2,325 (of 5,588 total)