(remember that are you need to copy even though you can't see the whole line
DECLARE @sqlstatement VARCHAR(1000)
SELECT @sqlstatement = 'SELECT identity(int, 1,1) as ID,
* INTO ##Publications FROM OPENQUERY([computera],
''SET FMTONLY OFF {call replicated_db..sp_helpsubscription}'')'
EXEC(@sqlstatement)
SELECT * FROM ##publications where subscriber = @@servername
DROP TABLE ##publications
Thursday, February 12, 2009
[Replication] List your subscriptions, including articles, from the subscriber machine
Wednesday, February 11, 2009
[Query] Case-sensitive query on a case-insensitive server
However, there are times when you need it.
http://www.mssqltips.com/tip.asp?tip=1032
SELECT *
FROM dbo.CaseSensitiveTest
WHERE Value1 LIKE '%Test%' Collate SQL_Latin1_General_CP1_CI_AS
GO
That will give you only the values that are capitalized like "Test" is.
Tuesday, February 10, 2009
[SQL] BULK INSERT and BCP -n
http://msdn.microsoft.com/en-us/library/ms188365.aspx
DATAFILETYPE value | All data represented in: |
---|---|
native | Native (database) data types. Create the native data file by bulk importing data from SQL Server using the bcp utility. |
I like BULK INSERT more than BCP, but you need BCP to export data. I was unaware that you could BCP a file out in Native format, and use BULK INSERT to import it. Doh!
Wednesday, February 4, 2009
Latkes!
This picture does not do them justice. They were awesome. Took about 20 minutes to make, another 20 to cook. Came out really well, considering I've never made latkes (potato pancakes) before. Only change I made was to add more oil in the pan - 2 tbl of oil isn't enough. And since I hadn't made them before, I decided to skip the ricer - layer paper towels and potatoes in a bowl, then push down with all your might and get as much water out as possible.
http://www.boingboing.net/2008/12/29/susie-bright-the-lea.html
Why is this baking? Easy - store them in a warm oven while you make them. And this way you're not worrying about the others getting cold.
[Sweets] Nutella Biscotti
Recipe from here: http://bakingbites.com/2005/06/nutella-biscotti/ Note that my picture doesn't look as good as their picture. But I will say, it came out quite well following the recipe as written.