sql-server

Solr DataImportHandler with SQL Server

I'm having a problem getting Solr to talk to Microsoft SQL Server via the Microsoft JDBC Driver. I have the handler registered in solrconfig.xml: <requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler"> <lst name="defaults"> <str name="config">C:\Program Files\Apache Software Foundation\Tomc...

How do you get a subreport to render in SSRS?

Hi, I am wondering if someone can let me know which of the following steps I am doing wrong. Have a blank new report ('Blank') Have an existing report ('Sub1') which has its own data sources and one parameter (int, named 'Likelihood', with a default value). These are in the same project and same folder. Drag the subreport control onto...

Create a one row table with as many columns as there are rows in a table returned from a SELECT query.

I want a query to create a one row table with as many columns as there are rows in a table returned from a SELECT query., where the columns created have names which are values taken from some column of the SELECT query, and have values which are values taken from some other column of the SELECT query. e.g. If I have a table T1 with two...

Replication related issue,

Replication related issue, I am explaining my architecture . I have created , its transactinal replication process 2 Publisher on table vendors script I have given below, A Distributor 2 Subscribers Data replication set up is like this as : Table VENDORS gets replicated from 2-publishers to 2-subcribers via-Distributor. Whil...

Update primary key from table in another database

I have two identical tables in two different databases with the same data but they have different primary keys, I need to update these so they have the same key, so what I did was making sure that none of the tables had any key in common and that there were no duplicates UPDATE db1.dbo.Table SET db1.dbo.Table.pcol = rightPcol.pcol FROM ...

Create Procedure Permission ONLY

I have a requirement in SQL Server 2008 in development database Only DBA's ( who are database owners ) can create, alter tables . Developer's should not create or alter tables . Developers can create/alter Stored Procedure/User Defined functions in dbo schema and can execute SP/UDF. Developers should have SELECT,INSERT,DELETE,UPDATE on...

Is there an sql admin panel made with Django? - Django

Hi folks, I'm using SQL Server 2005 with Django, I'm wondering if anyone has ever attempted to create an admin panel for SQL using Django. Would be quite useful to have! ...

A login token system

Hello, I am currently creating a very basic piece of DBMS software - I would however like the user not to have to type in their details every time. Instead I would like them to click on a control pannel link that would log them straight in. My solution thus far has been a token system whereby there is a table in the database with the...

BACKUP failed to complete the command BACKUP DATABASE

BACKUP failed to complete the command BACKUP DATABASE ... WITH DIFFERENTIAL. Check the backup application log for detailed messages. I see this message in SQL Server log file viewer. Where is the backup application log? ...

Delete trigger as replacement for "ON DELETE CASCADE" to avoid "multiple cascade paths"?

The following table definition: CREATE TABLE Customers( id INT NOT NULL PRIMARY KEY, name [varchar](50) ) CREATE TABLE Orders ( id INT NOT NULL PRIMARY KEY, customer INT FOREIGN KEY REFERENCES Customers(id) ON DELETE CASCADE ) CREATE TABLE OrderDetails ( id INT NOT NULL ...

How to remove control characters from DTS/SSIS imports?

The company I work for has a lot of systems where the source data originates as a flat file or Excel workbook. These files are then imported using DTS into a SQL Server database. Quite often these files contain various control characters (for instance I've just spent an hour finding that some records have a \0 in them which apparently S...

Ways to update a sql server database from a VC++ win32 project?

Hello I'm in the process of creating a Password Filter as described here. I can manage to write the VC++ code. My issue is that i need to update SQL Server database from that code. I dont have any past experience in VC++ Win32 project. My assumptions are Linking an external dll (compiled C#.net code) which will take care of the databa...

Questions about indexing in SQL

As I understand it: A Clustered Index orders the data physically by the index, so if you use Surname as a clustered index, when you do a select * you will get the surnames in alphabetical order. A Non-clustered index is not physically reordering your database, but is creating a kind of lookup table that's ordered by the columns you cho...

Finding Caller of SQL Function

There's a SQL function that I'd like to remove from a SQL Server 2005 database, but first I'd like to make sure that there's no one calling it. I've used the "View Dependencies" feature to remove any reference to it from the database. However, there may be web applications or SSIS packages using it. My idea was to have the function in...

How to reload a table without growing the log file?

I have the following scenario which runs every night using SSIS in SQL Server 2008: create a few temp. tables, and import data from an ODBC data source when the imports are complete, drop existing tables, and rename the temp. tables to the same name as the dropped tables What do I need to do in either my SSIS job or SQL Server settin...

View another schemas objects in object explorer . SQL server 2008

I need to see the objects from another schema that I have read permissions from in the object explorer. I can select from them in the query window but I do not see them in the object explorer. ...

select * math operations

is it possible to select colums and do complex operations on them for example select factorial(column1) from table1 or select integral_of(something) from table2 perhaps there are libraries that support such operations? ...

SQL Server: Why can't I create a view inside of a Begin...End Block

This Code: BEGIN CREATE VIEW [dbo].[dummy] AS SELECT 1 AS Dummy END GO Does not work, returning the error: Incorrect syntax near the keyword 'VIEW'. Why? Notes: The presence of the GO statement seems to make no difference The inner statement works fine outside of the code block delimiters. This is part of a larger query but tested...

ORDER BY with a CASE statement for column with alias

I need a stored procedure which will allow me to return sorted results based on two input parameters: @sortColumnName and @sortDirection. I wrote the following stored procedure, but when I run it, I am getting this error: "Invalid column name 'LastPayCheckDate'." SELECT Name, SUM(Pay), MAX(PayCheckDate) as LastPayCheckDate FROM Employee...

Is a recursively called stored procedure possible in SQL Server?

Here is what I have as VBScript Subroutine: sub buildChildAdminStringHierarchical(byval pAdminID, byref adminString) set rsx = conn.execute ("select admin_id from administrator_owners where admin_id not in (" & adminString & ") and owner_id = " & pAdminID) do while not rsx.eof adminString = adminString & "," & rsx(0) ...