tagged [sql]

How to design a rule engine?

How to design a rule engine? I'm supposed to create a simple rule engine in C#. Any leads on how I can proceed?. It's a minimalistic rule engine, and would use SQL server as the back end. Do we have a...

18 Sep at 14:46

Fetch one row per account id from list

Fetch one row per account id from list I have a table with game scores, allowing multiple rows per account id: `scores (id, score, accountid)`. I want a list of the top 10 scorer ids and their scores....

18 Sep at 17:52

How can I tell how many SQL Connections I have open in a windows service?

How can I tell how many SQL Connections I have open in a windows service? I'm seeing some errors that would indicate a "connection leak". That is, connections that were not closed properly and the poo...

18 Sep at 20:14

When do transactions become more of a burden than a benefit?

When do transactions become more of a burden than a benefit? Transactional programming is, in this day and age, a staple in modern development. Concurrency and fault-tolerance are critical to an appli...

LINQ to SQL insert-if-non-existent

LINQ to SQL insert-if-non-existent I'd like to know if there's an easier way to insert a record if it doesn't already exist in a table. I'm still trying to build my LINQ to SQL skills. Here's what I'v...

21 Sep at 18:33

How do I find out what collations are available in SQL 2000/2005

How do I find out what collations are available in SQL 2000/2005 If I need to choose a collation mode to work with, how do I know what collations are available?

22 Sep at 09:7

Upgrade MSDE to SQL Server 2008

Upgrade MSDE to SQL Server 2008 I am trying to upgrade an named instance of MSDE to SQL Server 2008 Express. When I get to the "Select Features" page of the 2008 installer there are no instances liste...

22 Sep at 12:34

File System Management Tools

File System Management Tools Looking for suggestions on file system management tools. We have several terabytes of images, pdfs, excel sheets, etc. We're looking at some sort of software that will hel...

22 Sep at 18:21

How do I ignore ampersands in a SQL script running from SQL Plus?

How do I ignore ampersands in a SQL script running from SQL Plus? I have a SQL script that creates a package with a comment containing an ampersand (&). When I run the script from SQL Plus, I am promp...

22 Sep at 23:19

What is a simple command line program or script to backup SQL server databases?

What is a simple command line program or script to backup SQL server databases? I've been too lax with performing DB backups on our internal servers. Is there a simple command line program that I can ...

Relative path reference in WebConfig.ConnectionString

Relative path reference in WebConfig.ConnectionString Is it possible to specify a relative path reference in connectionstring, attachDbFileName property in a web.config? For example, In my database is...

24 Sep at 02:56

Generic LINQ query predicate?

Generic LINQ query predicate? Not sure if this is possible or if I'm expressing correctly what I'm looking for, but I have the following piece of code in my library repeatedly and would like to practi...

24 Sep at 04:30

Nested SELECT Statement

Nested SELECT Statement SQL is not my forte, but I'm working on it - thank you for the replies. I am working on a report that will return the completion percent of services for indiviudals in our cont...

24 Sep at 15:57

Disable all table constraints in Oracle

Disable all table constraints in Oracle How can I disable all table constrains in Oracle with a single command? This can be either for a single table, a list of tables, or for all tables.

24 Sep at 17:45

Oracle Insert via Select from multiple tables where one table may not have a row

Oracle Insert via Select from multiple tables where one table may not have a row I have a number of code value tables that contain a code and a description with a Long id. I now want to create an entr...

25 Sep at 02:27

LinqToSql and WCF

LinqToSql and WCF Within an n-tier app that makes use of a WCF service to interact with the database, what is the best practice way of making use of LinqToSql classes throughout the app? I've seen it ...

25 Sep at 19:10

Difference between drop table and truncate table?

Difference between drop table and truncate table? I have some tables that I build as a part of my report rollup. I don't need them afterwards at all. Someone mentioned to truncate them as it would be ...

25 Sep at 20:17

What is the proper way to ensure a SQL connection is closed when an exception is thrown?

What is the proper way to ensure a SQL connection is closed when an exception is thrown? I use a pattern that looks something like this often. I'm wondering if this is alright or if there is a best pr...

26 Sep at 18:43

SQL - Query to get server's IP address

SQL - Query to get server's IP address Is there a query in SQL Server 2005 I can use to get the server's IP or name?

26 Sep at 21:37

Getting a Linq-toSQL query to show up on a GridView

Getting a Linq-toSQL query to show up on a GridView I have a pretty complicated Linq query that I can't seem to get into a LinqDataSsource for use in a GridView: ``` IEnumerable tikPart = ( from p i...

27 Sep at 07:46

How do you define a type in a Linq 2 SQL mapping?

How do you define a type in a Linq 2 SQL mapping? I'm trying to do my linq 2 sql objects manually, so I have the following code: and the XML looks like this: ```

29 Sep at 19:11

How to deploy complex SQL solutions through an installer?

How to deploy complex SQL solutions through an installer? Part of the setup routine for the product I'm working on installs a database update utility. The utility checks the current version of the use...

29 Sep at 23:14

How to import a SQL Server .bak file into MySQL?

How to import a SQL Server .bak file into MySQL? The title is self explanatory. Is there a way of directly doing such kind of importing?

1 Oct at 04:49

SQL 2005 DB Partitioning for SharePoint

SQL 2005 DB Partitioning for SharePoint Background I have a massive db for a SharePoint site collection. It is 130GB and growing at 10gb per month. 100GB of the 130GB is in one site collection. 30GB i...

What types should I use to represent percentages in C# and SQL Server?

What types should I use to represent percentages in C# and SQL Server? I'm thinking floats. For the record I'm also using NHibernate.

1 Oct at 18:17