In SQL Server Management Studio (SSMS) running against SQL Server 2005, I have a solution which contains a number of views.
These views are not sorted alphabetically.
Can anyone provide either an explanation of why, or a solution to order them alphabetically ?
...
I've got an application written in Java (JRE 1.6) using the latest SQL Server 2.0 JDBC driver. A user is running this application remotely on their Windows Server 2003 machine, trying to connect to an instance of SQL Server 2005. When they try to connect, they get the following error message "The driver received an unexpected pre-login...
From the 1st query I am getting some value and from 2nd query I am getting some value. I want the sum of the two values.
Query 1:
select sum(EAmount) from EstimateAmount where pid='3' group by pid
Query 2:
select sum(OPEAmount) from OPEAmount where pid='3' group by pid
...
Here's the scenario: there is a Software table (PK = SoftwareID) and an associated Release table (PK = [SoftwareID,Version]).
A release can be major or minor, release type is identified by Release.ReleaseType ('MAJ', 'MIN').
A release is also characterized by a date: Release.ReleaseDate.
Software is partitioned into categories, ident...
How can i change dateformat?Forexample:
2009-06-10 10:16:41.123->2009-June
2009-05-10 10:16:41.123->2009-May
...
I have a table that holds system users with their last login date and time in it. The admin users of the system need to be able to add users, but when I add the new user record a validation error occurs unless I put a valid datetime in the last login date field.
I've tried manually changing the field to dbnull, null, etc prior to the s...
Hi,
My scenario is I have a table with columnxs A, B, C and D. A is the PK and B and C are both foreign keys.
I intend to add an exta column to this table E, the side effect of this within the application is it will cause a row to be inserted after which there will be duplicate values within columns B and C.
Does this break any refere...
I work in a corporate environment where the creation of linked servers is absolutely prohibited. I've asked the DBA's the reason and the only answer I ever get is, "That's the policy". So I find myself having to write and make use of SSIS packages to move data between databases when such a need arises.
Can anyone tell me what reasons ...
I have a table which stores comma separated values in an NVARCHAR(MAX).
I have created a view, which uses string manipulation to convert these comma separated values into an xml list. I can then use this Xml column access each item.
The queries on this column will benefit greatly if I could index it. However, on trying to create a Prim...
I am working on migration of data from an old system to a new system. As part of migration, the data from the legacy system, (stored in files) is pumped into MS SQL Server. Now my app runs on Oracle. I'm having a problem with the date/timestamp.
The timestamp format in MS SQL Server data is:
2008.12.23 00:00:00
Oracle expects:...
If I need to check an entire table to see if a condition is true (e.g. every Ticket column has an ID with a certain suffix).
What would be a good way of going about this, performance wise? The table is quite large so if I go through every row, that's a lot of time hitting the database. Cursors are slow, so that wouldn't really be an ele...
I have tried everything that most forums have said and still cannot get other people in the network to see this report.
Here's the things I have tried:
in servername/reports under properties tab i have added my user "domain/username" and given him all 5 roles (Browser, Content Manager, My Reports, Publisher, Report Builder)
in the sit...
I have recently noticed that we have a number of tables stored in heaps (no clustered index). Would you create clustered indexes on them selectively, across the board, or not at all? Any other wisdom or advice?
There are some "codes" tables with 25 or so rows. However, there are several with well over a million rows.
EDIT
of the "bi...
I get this error with this description.
Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.
The PrimeOutput method on component "OLE DB Source" (1) returned error code 0xC02020C4.
The component returned a failure code when the pipeline engine called PrimeOutput().
The meaning of the failure code is defined by the component, but the error i...
Hi,
I have daily scheduled task that queries a table which includes column named AttemptDate with datetime as datatype. However the task queries all entries regardless of the date. So when the tasks executes, it outputs entries of all the dates as shown below:
2009-06-06 06:01:30.852
2009-06-07 01:41:46.719
2009-06-08 03:58:23.945...
I need to create a directory for sql server backups. I have to dynamically place the backup file in different folders on many different sql server installs. The backup fails if the directory doesn't exist. So if I can create the directory in a stored procedure or some other call before I call the backup command that would be helpful. Any...
How do I find out what application or SP is modifing the values in a config table? I thought I had isolated the app that was responsible but these particular values keep chnging back to true when I keep modifying them to be false.
...
I am trying to deliver an SSIS package to SQL Server 2005 Enterprise Edition running on Windows Server 2003 R2 (64bit).
The package itself is quite simple, just a basic read/write of a MySQL table (testing the integration).
I am able to build and deploy the package on my development machine, and I'm able to debug & build the package o...
this query give me 'Incorrect syntax near the keyword 'select'.' look please below bold character area.
declare @date1 smalldatetime, @date2 smalldatetime, @page nvarchar(100) ,@sum int
select @date1='2009-06-06',@date2='2009-06-13',@page='Tüm Sayfalar'
set @sum = select Sum(t.[VISITINGCOUNT]) from
(
select count(page) as [VISIT...
anyone know what is the command to check un-commited transaction?
...