Viewing 15 posts - 1,021 through 1,035 (of 1,347 total)
UPDATE d_details
SET USERFIELD1 = 'efgh' + Substring(USERFIELD1, 5, 999)
WHERE USERFIELD1 Like 'abcd%'
[Edit] Remi wins
March 22, 2005 at 8:11 am
A stored procedure can query data in databases other than the database it exists in, via 3 part naming (DBName.DBOwner.TableName) or on linked servers via 4 part naming.
CREATE PROCEDURE TestProc
As
BEGIN
...
March 21, 2005 at 5:39 pm
SELECT CategoryID,
CategoryName + Case IsNull(dtSubs.NoOfSub, 0) When 0 Then '' Else ' there are subs' End
FROM Categories c
LEFT JOIN
(
SELECT ParentID, COUNT(*) AS NoOfSub
FROM Categories
GROUP...
March 21, 2005 at 5:18 pm
@Counter is a int. You're using the '+' sign with an int, so Sql Server thinks you're trying to perform arithmetic addition, not string concatenation. Convert it to a varchar:
'product_'...
March 21, 2005 at 9:59 am
True, an INI file also works, but with 2 limitations - you need to have the same hard-coded filesystem location to the INI file available on all environments. It also...
March 20, 2005 at 5:40 pm
See sp_executesql system stored procedure in BOL, for examples of returning output variables from dynamic SQL.
March 18, 2005 at 2:05 pm
There is an article on this in the March 2005 Sql Server Magazine:
http://www.windowsitpro.com/Windows/Article/ArticleID/45156/45156.html
The article states that Microsoft's recommendations have recently changed, hence the contradictions out there.
New recommendation is use...
March 18, 2005 at 1:33 pm
All your tables should benefit from a clustered index.
Your processing cycle will also benefit from dropping all indexes first, loading the static tables, then re-indexing at FF100% once the data...
March 18, 2005 at 1:25 pm
>>but I am not using it correctly
Providing details on how exactly you're trying to use it would be a good starting point ...
March 18, 2005 at 1:19 pm
It really is cumbersome and is why we're all eagerly awaiting Yukon/2005 and SSIS to replace DTS.
March 18, 2005 at 12:07 pm
Unless you fix *this* trigger to correctly join, you're going to have problems regardless of other triggers.
March 18, 2005 at 10:40 am
UDPATE STATISTICS is a T-SQL command that you can run - see the BOL section for it.
Sql Server maintains statistics about data distribution in indexes/tables in order to determine the...
March 18, 2005 at 10:39 am
>>I had actually tried using the table name "test" in the FROM clause before using "Inserted" and it still didn't work.
You absolutely must join test to inserted, otherwise you'll update...
March 18, 2005 at 10:28 am
>>FILLFACTOR = 100 means that all of your indexing capability was used up when you created the index and additional INSERT or UPDATE's won't be indexed.
Sorry, but that's completely incorrect.
100%...
March 18, 2005 at 10:23 am
You're updating a table called 'test' - but you're not referencing 'test' in the FROM clause, so the update is not correlated to anything in inserted or pdc_demo_info.
What exactly are...
March 18, 2005 at 10:19 am
Viewing 15 posts - 1,021 through 1,035 (of 1,347 total)