Viewing 15 posts - 4,081 through 4,095 (of 5,588 total)
Scripting it out will do MOST of what you need. You will find that SQL does not script out ANY passwords, so you will need to change the scripted password...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 2, 2010 at 9:25 pm
ColdCoffee (6/2/2010)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 2, 2010 at 9:17 pm
ColdCoffee (6/2/2010)
Please post us sample data in readily consumable format and as Wayne suggested, post your desired result in some visual representation... This will remove a lot of doubts..
What ColdCoffee...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 2, 2010 at 9:05 pm
This solution is based on using a DelimitedSplit function, which is this (This function uses an in-line tally table. A persistent tally table will be more efficient. See the article...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 2, 2010 at 8:53 pm
SELECT TableName = st.name, [# Rows] = sip.rows
FROM sys.system_internals_partitions sip
JOIN sys.tables st
ON...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 2, 2010 at 8:15 pm
SELECT [TableName] = st.name,
[IndexName] = si.name
FROM sys.tables st
JOIN sys.indexes si
...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 2, 2010 at 8:10 pm
You will just have to build the URL as an expression. Determine what the URL needs to be to pass the parameter (you do know that you can pass parameters...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 2, 2010 at 6:54 pm
What you're really talking about is changing what schema the tables belong to.
What you have to watch out for is any query that uses > 1 part naming convention:
<server>.<database>.<schema>.<table>
So, if...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 2, 2010 at 6:45 pm
Very possible, and not that hard to do.
Read the "Cross Tabs and Pivot Tables" Part 1 and 2 articles (click the links in my signature).
BTW, thanks for posting the table...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 2, 2010 at 6:23 pm
Here's a method that utilizes an infrequently used form of the update statement, nicknamed the "Quirky Update". It's wicked fast, but has about a dozen rules that MUST be followed....
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 2, 2010 at 4:02 pm
timscronin (6/2/2010)
No I need to be able to manipulate the first facid and the first patientid and then the second facid and second patid
Okay, then based upon the string that...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 2, 2010 at 3:22 pm
If I'm understanding this correctly, you want to just remove all numbers and hyphens? (0-9 and "-")
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 2, 2010 at 3:10 pm
Both the [refTable] and [c] are table aliases... use whichever one you want to.
The optimizer expands an IN to all those OR conditions... check the execution plan, they will be...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 2, 2010 at 2:53 pm
Oleg Netchaev (6/2/2010)
Something like this should do it:
select convert(varchar(10), getDate(), 120)The above returns 2010-06-02 when ran at any time today.
Hope this helps.
For a faster method, check out the "Common Date...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 2, 2010 at 2:45 pm
divyanth (6/2/2010)
using a CTE instead of a sub query would improve the performance of the query
Nope, not at all. A CTE is essentially a pre-defined sub-query (unless it's using...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 2, 2010 at 2:43 pm
Viewing 15 posts - 4,081 through 4,095 (of 5,588 total)