Hi. Can anyone point out how to check if a select query returns non empty result set?
For example I have next query:
SELECT * FROM service s WHERE s.service_id = ?;
Should I do something like next:
ISNULL(SELECT * FROM service s WHERE s.service_id = ?)
to test if result set is not empty?
...
I need historic and daily currency exchange rates database to work with BI solution based on Microsoft SQL Server.
Thanks for the help.
...
I have a SQL Server 2008 database in 3NF.
I must check if the db can support many concurent users.
Which is the best method ?
Is there any free tool to do this ?
Thank you very much.
...
I am looking for tool which will generate the basic stored procedure structure (CRUD operations) for the given table, Is there any tool for the same?
...
Hey,
I'm having troubles optimizing this Levenshtein Distance calculation I'm doing. I need to do the following:
Get the record with the minimum distance for the source string as well as a trimmed version of the source string
Pick the record with the minimum distance
If the min distances are equal (original vs trimmed), choose the trim...
I have a list or set of values that I would like to know which ones do not currently exist in a table. I know I can find out which ones do exist with:
SELECT * FROM Table WHERE column1 IN (x,x,x,x,x)
The set is the values I am checking against. Is there a way to find out which values in that set do not exist in column1? Basically, I'm...
Hi,
I have a single user software that uses SQL Server database 2005. My computer was crushed while my software was on. I saved a copy of my database after I rescued my computer. However my software gives my following message. ( I don't know anything about SQL) However, I guess my database has the last login information. Since software w...
I have SQL Server 2000 and 2008 installed on a Windows XP Pro box. I can connect to both db instances locally.
From another box, a Windows 7 box, I can connect to the SQL 2000 instance on the first box but I cannot connect to the 2008 instance using the same SQL Server authentication credentials that worked locally.
Allow Remote Connec...
How do you escape a double quote character inside a MS SQL 'contains' function?
SELECT decision
FROM table
WHERE CONTAINS(decision, '34" AND wide')
Normally contains() expects double quotes to surround an exact phrase to match, but I want to search for an actual double quote character. I've tried escaping it with \, `, and even anoth...
Greetings
I stumbled onto a problem today that seems sort of impossible to me, but its happening...I'm calling some database code in c# that looks something like this:
using(var tran = MyDataLayer.Transaction())
{
MyDataLayer.ExecSproc(new SprocTheFirst(arg1, arg2));
MyDataLayer.CallSomethingThatEventuallyDoesLinqToSql(arg1, argEtc);...
I have a fast running query (sub 1 sec) when I execute the query in SQL Server Mgt Studio, but when I run the exact same query in PHP (on the same db instace)
using FreeTDS v8, mssql_query(), it takes much longer (70+ seconds).
The tables I'm hitting have an index on a date field that I'm using in the Where clause.
Could it be that PHP...
I have a ASPX.NET DataGrid and im trying to USE a select LIKE 'X'% from a table that has 1 field called location. im trying to display the locations that start with a certain letter (example wxxx,axxx,fxxx,) in different columns in my data grid.
I am trying to display more than 1 column in my datagrid using a SP shown below. The issue i...
Does anyone have experience of when SQL Servr 2008 R2 is able to automatically match indexed view (also known as materialized views) that contain joins to a query?
for example the view
select dbo.Orders.Date, dbo.OrderDetails.ProductID
from dbo.OrderDetails
join dbo.Orders on dbo.OrderDetails.OrderID = dbo.Orders.ID
cannot be automat...
I have a stored procedure that returns a varchar(160) as an output parameter of a stored procedure.
Everything works fine when i use ExecuteNonQuery, i always get back the expected value.
However, once i switch to use BeginExecuteNonQuery, i get a null value for the output.
I am using connString + "Asynchronous Processing=true;" in bo...
Can we write a web service to watch a table in sql server. whenever the corresponding table is populated with new records, the new records should appended to the another table which has the same structure of the old one.
Is this is possible using webservices if not how to perform this.
...
Ok this is the scenario... I have a table in Oracle that acts like a queue...
A VB.net program reads the queue and calls a stored proc in SQL Server that processes and then inserts the message into another SQL Server table and then deletes the record from the oracle table.
We use a DataReader to read the records from Oracle and then ca...
In our web application we have a lots of stored procedures look like this one:
getSomeData(/* 7 diffrent params */)
This stored procedure don't make any updates. We are using Linq'u.
I know that the date are changing no often than once per day
so the results for the same sets of parameters values will be the same.
Does Linqu have ...
Basically I want to keep the transaction very simple but I should be able to rollback if any error occurs in the later part.
Something like:
BEGIN TRANSACTION
DELETE SET 1(this will delete first set of table)
COMMIT
DELETE SET 2 (will delete second set of table)
If any error occurs while deleting set 2 I should be able to roll...
I can connect to a remote SQL 2008 Server instance, but I cannot see all the databases in the instance using SQL Server 2008 Management Studio.
I suspect that my problem has something to do with not all database in the remote instance having the same version. For example, I "upgraded" a 2005 database to 2008 by doing a backup from 2005 ...
In my SQL statement I use wildcards. But when I try to select something, it never select something. While when I execute the query in Microsoft SQL Server Management Studio, it works fine.
What am I doing wrong?
Click handler
protected void btnTitelAuteur_Click(object sender, EventArgs e)
{
cvalTitelAuteur.Enabled = true;
cvalT...