Pivon queries, love em. Turn rows into columns. I need to do a pivot query on the union of 3 other queries. How do I structure this?
I already know the names of the fields in the rows I want to transform but where do I put the pivot statement so it works?
...
I'm using bcp to import a flat file into an SQL Server 2005 database.
I'm running into a problem with datetime fields.
My format file field is specified as:
<COLUMN SOURCE="15" NAME="DATEOFSERVICE" xsi:type="SQLDATETIME"/>
My data file has dates formatted as:
19820101
However, some (many) are filled with 00000000
The 00000000 date...
I'm trying to create an online search for a particular set of literature/quotes/etc from a spiritual organization,
and while the number of items (mostly PDF, HTML, or plain text) that can be searched is limited,
I wanted to provide comprehensive search filters (Kayak.com style).
That means my data will need to be organized in such a ...
Hi,
I am running a query that returns records from the LEFT of the EXCEPT that are not on the right query;
USE AdventureWorks;
GO
SELECT ProductID
FROM Production.Product
EXCEPT
SELECT ProductID
FROM Production.WorkOrder;
Lets say there are 6 records returned (there are 6 records in Production.Product table, that are not in Producti...
How do you set autocommit in an SQL Server session?
...
For our deployments, I just want to drop the existing stored proc, then re-create in the same script. The script wizard only seeems to give me a mutually exclusive option - I'm looking for a Drop-Then Create Option. Am I missing something?
...
I import data from a TSV file with SQL Server 2008.
null is replaced by 0 when I confirm a table after import with integer column.
How to import as null, please Help me!!
...
Is there any way to remove all forgeinKey and primary key contriants from
Database ?
...
I have a csv file :
1|1.25
2|23.56
3|58.99
I want to put this value in a SQL Server table with SSIS.
I have created my table :
CREATE TABLE myTable( ID int, Value numeric(4,2));
My problem is that I have to create a Derived Column Transformation to specify my cast :
(DT_NUMERIC,4,2)(REPLACE(Value,".",","))
Otherwise, SSIS don't ...
I need to learn more about creating setup projects from within Visual Studio to support the following scenario:
When the user starts the setup, he needs to choose between the parts that he wants to set up. The setup should offer to install three web services, one web site and maybe even run some SQL scripts to install/update the database...
can anyone suggest Jobs that will improve database availablity and performance in sql server 2008?
...
I'm programming using Lazarus (Freepascal IDE, Delphi Like), and i have a problem when i need to connect into a remote SQL Server database on the network.
My question:
Is there any way to connect to a remote SQLdb on Lazarus?
What is required connector type for SQL Server 2005?
Is there any ODBC driver available for Windows CE (Window...
I'm working on a project where we talk directly from one database to another. We have a master database where the client updates their website and then changes are pushed from one database to the other through numerous SQL scripts. The master database works as a preview site allowing them to see changes before pushing them to live.
At t...
Can I alter a column charset and collation in MS SQL 2005 for a specific column without changing the collation of the entire database. I just need it for one column (or table)
I know this can be done in MySQL with a simple "ALTER TABLE" query, but in MS SQL..?
Regards
/C
...
I had a (friendly but heated) argument with my lead developer the other day because our project has TSQL Scripts that I code directly into SQL files which I then run against the database. I find that when I do this, it's easy to work out the schema in advance without fiddly pointing and clicking and then there's no opportunity to forget ...
Got a requirement to rebuild mssql full-text index.
Problem is - i need to know exactly when job is done. Therefore - just calling:
ALTER FULLTEXT CATALOG fooCatalog
REBUILD WITH ACCENT_SENSITIVITY = OFF
doesn't work or I'm doing something slightly wrong. :/
Any ideas?
...
I'm connecting to a database server (MSSS 2005, 9.0 SP2) which is almost totally without my control.
If I connect to it using Management Studio 2005 I can browse the list of tables, views, other objects in some of the databases using object explorer.
If I connect to it using Management Studio 2008, I cannot see the list. I can write ...
Hello,
I would like to run xp_cmdshell (TSQL procedure) in order to mount a network drive and then access remotes mdb files.
I am administrator on the MS SQL server and I have allowed xp_cmdshell execution accordingly.
However, there is still a problem:
When I call xp_cmdshell, the user executing the command is the SQL SysAdmin, i.e...
When writing apps with asp.net, which I do more of than vb.net apps, I have always followed the rule of opening a connection to the server, getting the data, and closing the connection as quickly as possible. This seems like a best practice.
Is it equally important to do this on a client/server vb.net app? For example, if you had multip...
Let's say you have execute the following (long running) process from your code:
int processID = DB.Execute(SQL); //some long running sql statement
Is there a way to programatically call SQL Server to cancel the process if it is taking too long (kind of like hitting the "Stop" button in QueryAnalyzer)?
//cancel the process if it is ta...