Viewing 15 posts - 331 through 345 (of 402 total)
CELKO (3/21/2012)
March 21, 2012 at 8:16 am
What utter nonsense
Thats no way to speak to such a helpful chap as Jeff 😛
March 20, 2012 at 6:30 am
Another option would be to create a template package (http://support.microsoft.com/kb/908018) although I've not tried that myself.
I use template packages quite a bit (one for each of my data warehouses) and...
March 20, 2012 at 6:07 am
Hi
Here is a piece of code that I use to accomplish this:
SET NOCOUNT ON
--Get a summary of the entire database.
EXEC sp_spaceused
--Declare needed variables.
DECLARE
@max-2 INT,
@min-2 INT,
@owner NVARCHAR(256),
@table_name NVARCHAR(256),
@sql NVARCHAR(4000)
DECLARE @table TABLE(
ident...
March 20, 2012 at 5:47 am
Eugene Elutin (3/15/2012)
Simple change to the ordering from this:
ORDER BY
CHARINDEX('ber',City)
,City
To This
City
,CHARINDEX('ber',City)
Should handle this...
Nope, it will not.
It will place Aberlin before Berlin....
I think I need to go...
March 15, 2012 at 10:14 am
Eugene Elutin (3/15/2012)
UNION ALL SELECT'Zberlin'
You query will place it straight...
March 15, 2012 at 9:55 am
Eugene Elutin (3/15/2012)
-- to help your helper you should provide
-- "I have table like that:" like that:...
March 15, 2012 at 8:31 am
Hi
Does do what you need?
DECLARE @temp AS TABLE
(City VARCHAR (20))
INSERT INTO @Temp
SELECT'Aberlin'
UNION ALL SELECT'Berlin'
UNION ALL SELECT'Berlina'
UNION ALL SELECT'Zedberlin'
UNION ALL SELECT'Youberlin'
UNION ALL SELECT'Irrelevant'
UNION ALL SELECT'MoreIrrelevant'
SELECT *
FROM @Temp
WHERE
City...
March 15, 2012 at 8:26 am
Not a stupid question at all! 🙂
Your welcome
Andy
March 14, 2012 at 9:56 am
If you only want to see the Encounter value once in the result set, I'd add the DISTINCT keyword to Andy's great response, as follows:
D'oh spot on! Forgot to add...
March 14, 2012 at 9:53 am
As far as I know no not using single quotes - you need to use double quotes.
use msdb
go
sp_help_job
@job_name = N'Daily ''full'' backup',
@job_aspect = N'all'
March 14, 2012 at 9:48 am
Hi
SELECT
Encounter
FROM
JeffTest
WHERE
Encounter NOT IN ( SELECT Encounter FROM JeffTest WHERE DocType = 305 )
Andy
March 14, 2012 at 9:42 am
For renaming a column the syntax is:
EXEC sp_rename 'Table.OldColumnName', 'NewColumnName', 'COLUMN'
Andy
March 14, 2012 at 8:34 am
Viewing 15 posts - 331 through 345 (of 402 total)