So I got a 64 bit virtual machine running x64 Windows Server 2003 Standard Edition with plesk from blacknight.ie.
I installed all the updates from windowsupdate.microsoft.com apart from group policy, terminal services and windows search.
I then tried installing SQL 2005 x64 Enterprise. I tell it to install everything including all the cl...
I am trying to connect to a remote mysql database from an iPhone. I have searched many web sites but I did not find any help. If anyone has worked with this please send a solution.
...
SQL Server 2005 has great sys.XXX views on the system catalog which I use frequently.
What stumbles me is this: why is there a "sys.procedures" view to see info about your stored procedures, but there is no "sys.functions" view to see the same for your stored functions?
Doesn't anybody use stored functions? I find them very handy for e...
How to deploy Sql server reports on productions boxes?
Locally it's not a problem, I just specify the url and then right click on project and say deploy which deploy on my local server.
But it's not gonna be the case for the production server
...
Hi
I have been wondering how to put all the stored procedures on a SQL 2000 under source control.
We are using Subversion for all our normal source code, so it would be great if there were a solution to the problem using Subversion.
Do you have any ideas?
Update 16-02-2009: This is the vbs script i used to export all the stored proce...
Is there a difference in performance between TOP and SET ROWCOUNT or do they just get executed in the same manner?
...
I have a simple query:
select * from countries
with the following results:
country_name
------------
Albania
Andorra
Antigua
.....
I would like to return the results in one row, so like this:
Albania, Andorra, Antigua, ...
Of course, I can write a PL/SQL function to do the job (I already did in Oracle 10g), but is there a nicer,...
Hi!
I have a MySQL database which contains a table of users. The primary key of the table is 'userid', which is set to be an auto increment field.
What I'd like to do is when I insert a new user into the table is to use the same value that the auto increment is creating in the 'userid' field in a different field, 'default_assignment'....
Main problem is about changing the index of rows to 1,2,3.. where contact-id and type is the same. but all columns can contain exactly the same data because of some ex-employee messed up and update all rows by contact-id and type. somehow there are rows that aren't messed but index rows are same. It is total chaos.
I tried to use an in...
There were a number of questions related to sharing data results of one stored procedure in another in MS SqlServer.
Depending of the version of SQL Server people would suggest using temporary tables, xml (SQLServer 2005) or table variables (SQL Server 2008).
There is a great article written by Erland Sommarskog that provides comprehe...
Is it possible to update more than one local variable in a single select?
Something like:
set
@variableOne = avg(someColumn),
@variableTwo = avg(otherColumn)
from tblTable
It seems a bit wasteful to make two separate select operations for something as trivial as this task:
set @variableOne = ( select avg(someColumn) from...
The DBA here at work is trying to turn my straightforward stored procs into a dynamic sql monstrosity. Admittedly, my stored procedure might not be as fast as they'd like, but I can't help but believe there's an adequate way to do what is basically a conditional join.
Here's an example of my stored proc:
SELECT
*
FROM
table
WHERE
(
...
I was wondering what is the best way to parse a DateTime object to your SQL server.
Where you are generating the SQL in code.
I have always used something like DateTime.Now.TolongDateString() and had good results, apart from today where i got a error, and it made me think.
System.Data.SqlClient.SqlException: Conversion failed when ...
I have a table in PostgreSQL where the schema looks like this:
CREATE TABLE "foo_table" (
"id" serial NOT NULL PRIMARY KEY,
"permalink" varchar(200) NOT NULL,
"text" varchar(512) NOT NULL,
"timestamp" timestamp with time zone NOT NULL
)
Now I want to make the permalink unique across the table by ALTER-ing the table.
Ca...
I have a table that contains maybe 10k to 100k rows and I need varying sets of up to 1 or 2 thousand rows, but often enough a lot less. I want these queries to be as fast as possible and I would like to know which approach is generally smarter:
Always query for exactly the rows I need with a WHERE clause that's different all the time.
...
I need to get 2 summed figures however im having issues as one will be for total orders and one is for orders incomplete. These use the same initial query however the orders incomplete has an additional where clause. Can these be put into a query so that i just get the 2 columns. I have done inner queries before but i have never done one...
I have trouble defining a trigger for a MySQL database. I want to change a textfield before inserting a new row (under a given condition). This is what I have tried:
CREATE TRIGGER add_bcc
BEFORE INSERT ON MailQueue
FOR EACH ROW BEGIN
IF (NEW.sHeaders LIKE "%[email protected]%") THEN
SET NEW.sHeaders = NEW.sHeaders + "BCC:inter...
Can anyone help me with the trying to write SQL (MS SqlServer) - I must admit this is not by best skill.
What I want to do is exactly the same functionality as appears for the seach boxes for the Yell website i.e.
Search for company type
AND/OR company name
AND/OR enter a company name
in a Location
if anyone can suggest the SQL cod...
I am using the current code in attempt to access a msSQL 2005 db:
<?php
$myServer = "[server]";
$myUser = "[username]";
$myPass = "[password]";
$myDB = "[db]";
//connection to the database
$dbhandle = mssql_connect($myServer, $myUser, $myPass)
or die("Couldn't connect to SQL Server on $myServer");
//select a database to work with
$s...
Hi, this subquery works in SQL Server:
select systemUsers.name,
(select count(id)
from userIncidences
where idUser = systemUsers.id )
from systemUsers
How can It be made in SQL Compact?
Thanks!
...