I am going on a job interview and have zero experience with MS SQL Server. However I have 1 year with Oracle. Is there such a huge difference between the two? What programming questions can I expect?
...
Probably this question will be closed before I'll get an answer. I have to learn the basis of database programming, for SqlServer, Access, ..., and the SQL language to make query and stored procedure. I'm looking for a free tutorial. Could you suggest me something before 3000 reputation people close this question? I need it as soon as po...
I am using MySQL. Here is my schema:
Suppliers(sid: integer, sname: string, address string)
Parts(pid: integer, pname: string, color: string)
Catalog(sid: integer, pid: integer, cost: real)
(primary keys are bolded)
I am trying to write a query that selects pairs of sids that supply the same part:
-- Find pairs of SIDs that both su...
I need to include a database in a C# project with a lot of data.
This database should be free even in a commercial use.
What database should I use?
[EDIT]
I would like to know what database are to be avoided.
When I say "a lot", it's for scientific calculation so it will be huge data.
...
I have this compiled query:
private static Func<DBContext, Foo> FooQuery = CompiledQuery.Compile<DBContext, Foo>(
_db => _db.FooTable.SingleOrDefault(f => f.DeletionDate == null || f.DeletionDate > DateTime.UtcNow)
);
When I run it once, it returns the expected Foo object.
But then, even after that object's DeletionDate is set in...
Hello,
I have been messing around with writing some stored procedures in .NET code with SQL CLR Integration. In the stored procedure, I am calling a third-party dll. When I try to create the assembly in SQL Server containing my custom stored proc, it complains that the third-party dll is not registered with the database.
Is there som...
Gday All,
I am trying to get the details of the first ever transaction for a given customer within a period of time.
Consider the following:
SELECT MIN(t.transaction_date_start), t.*
FROM transactions t
WHERE t.customer_id IN (1,2,3)
AND t.transaction_date_finished >= '2010-02-01 00:00:00'
AND t.transaction_date_finished <= '2010-02-...
Is there a lazy way I can quickly replace all instances of a word with an other, purely in MySQL?
UPDATE sports SET matchup = .....
for example replace Manchester United with Man Utd and Wolverhampton Wanderers with Wolves
...
Hello everyone,
I am using a AJAX gallery called jCarousel, and I am having some difficulties about dynamicly loading my pictures from the data, I simply don’t know how to integrate PHP in the JavaScript code.
The static JavaScript code for loading the pictures is:
var mycarousel_itemList = [
{url: \"http://static.flickr.com/66/199...
Hello,
I am working on an iPhone app that uses a sqlite database. The app downloads data off of the Internet in a background thread with the UI in the main thread. The background download thread can preform INSERT, UPDATE, and SELECT on the database. The UI layer can also interact with the database by doing UPDATEs and SELECTs. If I...
OK, here is a simple abstraction of the problem:
2 variables(male_users and female_users) to store 2 groups of user i.e. male and female
1 way is to use two queries to select them :
select * from users where gender = 'male' and then store the result in male_users
select * from users where gender = 'female' and then store the result...
I have a set of projectnames stored in the database
projectname - project1 with startdate and enddate
How to find which task is at present going on, based on today's date ( note : two projects
may have same dates too).
I need to take the project names which falls under today date from all the other projects.
select distinct ProjectNa...
Hi,
I have a sql question on derby database:
Select a.name, a.starttime, a.endtime
From a
How can I add to the above sql statement such that I can get the difference in hours between the start time and end time? (I only know that for mysql there is a DATEDIFF function, but I am not sure about what function should I use for derby db)
...
Suppose I have a table with 2 columns (status and date) like the following:
status: U T U U L
date: 12 14 15 16 17
Can I (using only 1 SQL statement) count the number of distinct values in the status? That is:
count(U)=3
count(T)=1
count(L)=2
count(P)=0
Can I do this with 1 SQL query?
Note: I have static values in s...
Is there any way to retreive the result set of a sql query in a local variable; the query is to be run in a batch file. What I am trying to do is something like this:
set varname = osql -S%dstserver% -d%dstDB% -Q"SELECT name from table_name where Id = %siteId%" %osqluser% -b
varname is my local variable.
I am quite new in sql so any ...
Like this:
select * from foo where @nameofdbcolumnprovidedbyparam = 1 ?
Whenever I attempt this with sqldatasource or in ado I get errors such as:
Syntax error converting the nvarchar value 'foo' to a column of data type int.
...
I have a two column table with a primary key (int) and a unique value (nvarchar(255))
When I insert a value to this table, I can use Scope_identity() to return the primary key for the value I just inserted. However, if the value already exists, I have to perform an additional select to return the primary key for a follow up operation (i...
Hey guys!
I have the following code in SQL (2005) which calculates the avarage user logins on a systm:
with
user_total as
(
select COUNT(distinct ID) as counter
FROM [dbo].[LOG]
where [LOG].DESCRIPTION='Login success.'
AND
Convert(datetime,convert(char(10),[LOG].CREATED_ON,101)) BETWEEN '2009-01- 01...
I'm not sure there is this exact situation in another question, so sorry if this a duplicate. I have a problem with the Category system I am using I have the following query (for example)
SELECT DISTINCT COUNT(StockID)
FROM tblStock
WHERE CategoryCode IN (
SELECT CategoryCode
FROM tblLookup
WHERE CategoryID = 'EG')
I need to do a pa...
Sometimes I need to treat the same table as two separate tables. What is the solution?
...