Viewing 15 posts - 1 through 15 (of 18 total)
January 25, 2017 at 9:30 am
January 24, 2017 at 8:36 am
r_slot,
To address your original question, each single quotation mark within a string must be preceded with the single quote literal marker:
SELECT 'Giro d''Italia'
UNION
SELECT 'This is an empty string: '''''
output:
---------------------------
Giro d'Italia
This...
November 1, 2012 at 3:22 pm
clay.calvin,
The SUM() function is another option that may be applicable. Compare the MAX() function to the SUM() function (note I have changed the VALUES in the fourth insert to demonstrate...
November 1, 2012 at 3:01 pm
igloo,
I generally try to avoid using case statements in joins. Instead, I prefer to build the join criteria as a series of OR conditions. Try the following construction in place...
November 1, 2012 at 2:40 pm
Early in the article you mention the benefit of creating a SELECT statement to preview the rows that will be updated. Here is a useful form for previewing the changes:
UPDATE...
October 10, 2012 at 7:53 am
Thanks! That worked with only a couple of minor changes:
SQL Kiwi (5/25/2012)
DECLARE @sql nvarchar(MAX) =
(
SELECT
N'DROP VIEW'...
May 25, 2012 at 1:44 pm
Excel rocks for data analysis, but it does have some irritating quirks, particularly when working with csv files. I frequently receive customer data in csv format that contains leading zeros...
June 25, 2011 at 11:22 pm
The SqlStudio.bin file associated with SSMS 2008 appears to contain user preferences. I recommend renaming this file instead of deleting it.
December 10, 2010 at 9:25 am
Kluge-ware
Software that shouldn't work but does, usually a result of spaghetti-coding and/or piecemeal coding.
May 7, 2010 at 11:27 pm
The program that creates the dBase file is a canned student information system that utilizes dBase for data storage. The system does not provide any tools for working with the...
February 17, 2010 at 11:01 am
This may be a little off-topic, but is there a way to convert dBase files to xml for import into SQL Server 2008 (64-bit) tables?
February 17, 2010 at 8:21 am
The SQL Server 2000 installation routine creates a registry entry for launching SQL Server Service Manager (minimized to system tray) at startup:
Key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
String Value:
Service Manager = "C:\Program Files\Microsoft SQL Server\80\Tools\Binn\sqlmangr.exe" /n
If...
January 20, 2010 at 8:16 am
The syntax for the 'RubbishDays2008_Property.dbf' file should be:
select *
into test
from openrowset('msdasql', 'driver={microsoft dbase driver (*.dbf)};dbq=c:\directory\', 'select * from RubbishDays2008_Property')
Replace 'dbq:=c:\directory\' with the appropriate path where the 'RubbishDays2008_Property.dbf' file is stored.
This...
December 17, 2009 at 7:36 am
With a 32-bit SQL Server installation, you can use the Microsoft dBase Driver through the MSDASQL provider:
select *
into <tablename>
from openrowset('msdasql', 'driver={microsoft dbase driver (*.dbf)};dbq=c:\', 'select * from filename')
You just need...
December 16, 2009 at 10:43 pm
Viewing 15 posts - 1 through 15 (of 18 total)