Hi,
I have a MSSQL 2005 table:
[Companies](
[CompanyID] [int] IDENTITY(1,1) NOT NULL,
[Title] [nvarchar](128),
[Description] [nvarchar](256),
[Keywords] [nvarchar](256)
)
I want to generate a tag cloud for this companies. But I've saved all keywords in one column separated by commas. Any suggestions for how to generate...
I have a problem with a sql query. Through the query I am trying to search database for any occurrences of string (can be anything) in a column using the SQL LIKE command. The problem is that it works fine for most of the strings say john, jim, ji"m , but does not work when i include the following characters which are ( ' , { , } , and a...
I have two great tables that I would like to use as foundation for an even greater third table!
The output depends on date interval, like 09/01/2010 - 09/03/2010
Example of Output from TABLE A - - (ALLOCATED Testers)
Date Country Allocated testers
09/01/2010 Nigeria 0
09/02/2010 Nigeria ...
I´m trying to create a VIEW in SQL Server 2005.
The SQL code is working as such (I´m using it in VS2008), but in SQL Server I´m unable to save it, as error message "Declare the scalar variable @StartDate" and "Declare the scalar variable @EndDate" pops up.
Here is the code:
WITH Calendar AS (SELECT CAST(@StartDate AS datetime) AS ...
I have a stored procedure that is required to update an existing record with new data, however it must not 'over write' any existing data.
For Example we may have three fields:
FirstName | LastName | PhoneNumber
Call the above 'TableX'.
In a very simple update this could look something like this:
Update TableX
set FirstName =...
Let's say I have a table that looks something like this:
-------------------------------
id|column2|column3 |column4
-------------------------------
1 value1 somevalue somevalue
2 value2 somevalue somevalue
3 value2 somevalue somevalue <----- I want this column deleted
4 value3 somevalue somevalue
As you can see I want t...
Hi,
I am new to wcf and I have written a wcf web service that performs operations on database like an update. The service is consumed by silverlight clients. When multiple users try to make certain change to an object, I want the wcf service to manage it. e.g. if a certain object is acknowledged(update operation in db) by one user, anoth...
Hi all,
While connecting to a remote SQL Server 2005 from my C# code I get a login error (Login failed for user X) This 'user X' appears to be the windows user, instead of the one I specified in my connection string, that was a SQL Server user.
Anyone knows the problem here? The server is in another machine, and I cannot make changes o...
I have 15-20 data task each in their own sequence container in a single SSIS.
Is it possible to catch the data task or sequence which failed and email that details (task name or sequence name, cause for failure) to a user?
...
I am encountering a strange problem when attempting to execute a DELETE query agains a SQL Server table using VB.NET, SQL Command, and Parameters.
I have the following code:
Try
sqlCommand.Transaction = transaction1
sqlCommand.Connection = conn
sqlCommand.CommandText = sqlQuery
sqlCommand.Parameters.Add("@userID", S...
I have Linked Server to Oracle in SQL Server 2005. There 2 Stored Procs defined. How can I call them in SQL server. One Stored Proc has two OUTPUT parameters. I need to get them in SQL server call
Linked server name is TEST. below are stored procs. I need these SPs separately.
check_lockout(v_id_in, v_out_result, v_lockout_msg);
upda...
We are using SQL Server 2005 and are trying to store an XML Type in the database. The XML type has an element that needs to contain the content in CDATA, yet once inserted, the field seems to be stripping the CDATA and storing the element without it...
Has anybody experienced or even resolved this in the past?
Handy example:
create t...
I have two tables which both contain 'pipe separated values'
e.g:
Table 1:
DataField_A
item 1|item 2|item 3|etc.....
Table 2:
DataField_A
item 7|item 5|item 3|etc.....
I need to merge Table 2 into table 1 such that Table 2 contains all items across both tables.
Doing this pro-grammatically would be a simple matter of loop...
Please review the following query and see if you can help me out.
DECLARE @Contacts TABLE (
workgroupid UNIQUEIDENTIFIER,
contactid UNIQUEIDENTIFIER,
leadname NVARCHAR(130),
createdon DATETIME,
Marketsource NVARCHAR(150))
INSERT INTO @Contacts
(workgroupid,
contactid,
leadname,...
I'm trying to connect using several different clients to SQL Server 2005 standard, which has been configured to use Windows Authentication. Although the user account exists on the domain, the computer is not joined to the domain. I get the message, "user is not associated with a trusted sql server connection". The question http://stac...
I have three tables 'Employees', 'Departments' and 'EmployeesInDepartments'
The 'Employees' tables references the 'Departments' table (Each employee must have a DepartmentId). However, an employee can exist in multiple departments by adding entries (EmployeeId and DepartmentId) to 'EmployeeInDepartments' table.
I currently have the foll...
I apologize in advance for my newbness! Using SQL Server 2005 (9.00.4053.00).
It takes 2:22 to run this query:
DECLARE @Start_date CHAR(10);
SET @Start_date = '2010-07-01';
SELECT
DATEPART(wk, rp.dtScanDate) AS 'Week Number',
COUNT(rp.qwImageID) AS 'Documents',
SUM(CAST(rp.iCompressedSize AS BIGINT))/1024/1024 AS 'Compr...
I'm checking out the SQL Debugger using Visual Studio 2010 (connecting to a SQL 2005 Enterprise Server), and I can successfully debug a stored procedure by going to Server Explorer -> Right clicking on the procedure -> "Step Into Stored Procedure".
However, once I'm in, I can't step into or set any breakpoints inside any subsequent func...
Hi everyone,
I was wondering how I might take a table schema in SQL Server and generate an XML document from it. The ideal would be if I passed in my database name (“SalesOrders”) and an XML doc comes back reading something like:
<table=”SalesOrders”>
<columns>
<name=”SalesOrderID”/>
<datatype=”int”/>
<allowNulls=”...
Hi all,
I'm having an issue with some SQL Server 2008 queries and I think I got it down to differences between the server and the local application. Here's a basic description of my scenario:
I'm using a local application that performs insert statements on a remote database. Everything works fine until I change the clock on the local m...