VERSION
I'm using Server version: 5.1.36-community-log MySQL Community Server (GPL)
I've finally contrived a easy example to reproduce it easily!
setup:
create table t1(id integer unsigned,link integer unsigned);
create table t2(id integer unsigned auto_increment,primary key(id));
create table t3(id integer unsigned,content varchar(30...
I am having a hell of a time trying to connect to the SQL SERVER 2005 database. I am using Windows 7.
Here is the screenshot of the error thrown:
I have been battling this issue for the past week and still no progress.
I have tried the following in the server name:
(local)
localhost
computername
none of them worked!
I just...
When do you use each MySQL index type?
PRIMARY - Primary key columns?
UNIQUE - Foreign keys?
INDEX - ??
For really large tables, do indexed columns improve performance?
...
I use ADO.NET or the sqlcmd utility to send sql scripts to SQL 2008.
What is the difference between using ";" and "GO" to separate chunks of SQL?
Thanks, NEstor
...
Can anyone tell me why the following is happening, and how to fix it?
I have a MySQL query with an ORDER BY clause that looks like this..
ORDER BY (did_voteup-did_votedown) DESC, did_voteup DESC
So it should order the results by their "effective" rating, as in..
1st. 10 up - 1 down = 9 effective
2nd. 10 up - 5 down = 5 effective
3rd...
I know that most sql server software allows you to do "A Update on a Join", but I am wondering, is this in the SQL standards?
(eg. can I assume that any software package allows this?)
Note: I am asking this because I am writing a database library that should be easily extensible to database software that is not included in the original ...
hi there,
what is the easiest way to save PL/pgSQL output from a PostgreSQL database to a csv file? I'm using PostgreSQL 8.4 with pgAdmin III and psql plugin where I run queries from...
thanks!
martin
...
I have a dataset that contains:
Table { date itemName }
The date for the most part is sequential. There are no duplicates of the date [as it is the primary key].
The question is split up into multiple parts (all with respect to using SQL):
Is it possible to find gaps in the date series listed in the table?
For example: Dates 1/2/09...
Hi I am faced with a difficult problem:
I have a table (oracle 9i) of weather forecasts (many 100's of millions of records in size.)
whose makeup looks like this:
stationid forecastdate forecastinterval forecastcreated forecastvalue
---------------------------------------------------------------------------------
varchar (...
The following does work as expected:
GRANT ALL ON *.* to 'someuser'@'%' identified by 'somepass';
Can I use wildcards for Database name like:
GRANT ALL ON someDB*.* to 'someuser'@'%' identified by 'somepass';
...
Hi, I suppose this question is kinda easy to answer, but I can't seem to figure it out.
I'm trying to store text (email bodies) into a nvarchar(max) column, but when I go read it, the newlines are all gone. At first I thought this might be some encoding/collation problem, but it doesn't seem to be the case.
I've searched around and ha...
I'm getting this error (Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.) when trying to run a stored procedure from C# on a SQL Server 2005 database. I'm not actively/purposefully using transactions or anything, which is what makes this error weird. I can run the stored proced...
Currently I am in need to find the friends of friends in my application using PHP and MYSQL
For example : Database structure is like this. Table Name : tbl_friendlist
Ident mem_id friend_id
1 2 1
2 1 2
3 1 3
1 4 1
5 1 8
How can i achieve this
I am...
$sql= "select
tblservergroup.id,
tblservergroup.groupname,
if(tblservergroup.defserverpaid='0', '0', select concat(tblservers.ipaddress, ' (', tblservers.name, ')' ) as defaultserverpaiddesc from tblservers where tblservers.id=tblservergroup.defserverpaid),
if(tblservergroup.defserverfree='0', '0...
Hi all,
How could I filter out the duplicate value in a column with SQL syntax?
Thanks.
...
I'm using the DBMS_SQL package that returns the value '12345' as a value for a column name.
How do you trim the apostrophes out from the value so that it could be converted into a number?
...
Hi, i am trying to insert the contents of a CSV file into a database table using linq2SQL.
I want to be able to rollback the transaction if ANY of the inserts fail but when i try with this code i get the following error at - db.Transaction.Commit()
System.InvalidOperationException was unhandled: This SqlTransaction has completed; it is...
I wanted to run a simple query to throw up all the rows of Table1 where a principal column value is not present in a column in another table (Table2).
I tried using:
SELECT * FROM Table1 WHERE Table1.principal NOT IN Table2.principal
This is instead throwing a syntax error. Google search led me to forums where people were saying that...
I have a SQL Server 2000 DTS package.
One of the steps of this package has the following SQL:
SELECT *
FROM [Crocus_Limited$OrderRequestDetail]
WHERE (rep_updated > GETDATE() -2)
AND NOT EXISTS
(SELECT OrderID
FROM NavisionUpgrade.navision4.dbo.[WEBOrderDetails] rd
WHERE rd.OrderID = [Crocus_Limited$OrderRequestDetail].OrderID ...
Hi all.
I have simple query, but when I'm trying to execute this query I'm getting error: Query input must contain at least one table or query. (Error 3067)
Query:
INSERT INTO FV_Ko ( FvId, OldPriceNetto )
SELECT [PFvId], (SELECT FV.PriceNetto1 FROM FV WHERE FV.FVnr = '123');
Thanks in advance
...