Hi All,
I need a help. Let me first explain the scenario with a small sample.
Suppose I have a Students table with columns:
Id int(PK)
Name varchar(200)
Marks1 int
Marks2 int
Marks3 int
TotalMarks int
IsTotalCalculated bit
InProcess bit
This table has huge number of records.
Now, I want to calculate the TotalMarks...
Hi,
Is there any way to load (insert) List into SQL Server Compact 2008 table in simpler way than via looping each record in List and inserting it into database?
...
We recently updated our WPF application to perform its data synchronisation (using sync framework) within a single transaction against our SQL Server 2008 database.
Almost straight away this has somehow led to a row being locked in of of the tables
preventing all other users from syncing.
The thing is that the lock does not seem to be...
Hi,
I I've followed the other stackoverflow question but I get the exception of token error that stops at WHERE in this line:
INSERT INTO Users(nick, place, sex)
VALUES(@nick, @place, @sex)
WHERE NOT EXISTS (SELECT nick FROM Users WHERE nick=@nick)
nick in Users is unique and I can't insert it there.
...
Is it possible to use SQL Dependency with SQL Server Express 2005 which comes with VS 2008?
...
At present we have very little referential integrity, as well as having a number of tables that self-join (and indeed would perhaps better be represented as separate tables or views that joined).
The knowledge of how these tables relate to each other is implicit in the logic of the stored procedures rather than explicit in the schema. W...
I have the following query in which I am searching within the XMLData type column.
I want to return a substring of a node that either starts with the search criteria and X number of characters afterward ending on a full word or a substring which places the search criteria in the middle of the result with X number of characters before an...
Hello,
Am wondering if there are guidelines somewhere to write SQL code which is compatible in SQL Server, mySQL as well as postgreSQL. I am writing a program and the user has a choice of backend database. It will be really difficult for me to create separate queries for each and every db. I do not want to use an ORM or anything like th...
I have a table with the following columns:
agent status
A Mail Sent
B Fax Sent
A Fax Sent
B Mail Sent
B Mail Sent
B Fax Sent
I want to get this result:
Agent Fax_Count Mail_Count
A 1 1
B 2 2
...
Hey Guys, this one is a quick Question:
What is the best (or THE) way to change my SQL Express 2008 (with advance...) installation to a 2008 Developer edition?
I need to keep the databases, along with the logins and so on.
I need to upgrade because, I Want to use all the features in TFS 2010.
Do I have to make backups of all the dat...
I'm getting a new project some time now and wanted to use PHP for this one, as I don't have the time to get started with MVC and absolutely hate C# for Webdev.
So I was thinking of going "back to my roots" and use PHP and PDO for that. Problem is, the Databases are all SQL Server 2003 and I don't quite know how well that is covered in P...
I have a Flat File Source that reads data from a file with two "columns" of data. One is an ID and the other is a date. I want to read this data from the file and "dress" it with two more columns before I write it to the database. I want to add one column with the value of getdate() and one column with just a 1 in it.
How can I do this?...
How to remove primary key constraint from column.
I have table t_data_dnefrc table. In that i have AccountNbr column which is primary key. I want to remove Primary key constraint for that column.
...
I have read a couple of books on SQL Server 2005 but have not found a proper answer to what I am looking for.
The problem is like this :-
I have a database that is being used by 5-20 users at a time for booking customer orders.
They receive many orders in a day on phone so placement of orders and lookup of products\old orders have to be...
Years ago I programmed a magazine-style site in ColdFusion. It had a site search function to full-text search (using SQL Server) the articles and blog posts. It worked fine, but then we were hit with a SQL injection attack (my fault). The site owner decided to take down the search, and only recently asked me to make it live again.
I kno...
I need to update my tableA based on the insertions in tableB. i have created a trigger which fires when a row is inserted into tableB and simply copies it to tableA (which is exactly what i want). But the problem comes when i update my existing records in tableB, the rows in tableA already exist with the same primary key.
to deal with i...
I have a table with a list of contract line items in the form of
CREATE TABLE contracts_lines (
contract_id integer,
product_id integer,
contract_line_start datetime,
contract_line_end datetime,
amount float
)
What I would like to produce is a VIEW (or populate a table) that allows me to determine how much revenue I can expe...
I have a Sql Server that uses Windows Authentication.
I want to connect to the server from a Delphi application.
By default, SQL Server will assume the credentials of the user that launches the connecting process.
This means that to change the login, I currently have two options:
Log off and Log in as the desired
user, then run my a...
I am building an Access database that functions as a reference library. I want to use links in the Access database to execute SQL queries in a different database. Presently when I click the Access hyperlink it tries to run SQL ServerManagemenrt Studio but then errors with 'The operation could not be completed'. I also tried using the Acc...
How do I go about deleting a row that is referenced by many other tables, either as a primary key or as a foreign key?
Do I need to delete each reference in the appropriate order, or is there an 'auto' way to perform this in, for example, linq to sql?
thanks.
...