Hey Guys and Gals,
I have what I consider a bit of a tricky question. I am currently working on quite a large spread sheet (266 rows aith 70 coloumns and its only going to get bigger) that is a database of sorts and I want to remove it from Excel and put it on to an intranet page. I am currently writing it in a combination of HTML and ...
I know that indexes on database are a good way to increase query performance, but how much performance I would gain by creating an index for a creationDate property of a given object that I frequently order by creationDate in my queries? Would this frequently "order by o.creationDate" justify creating an index for the creationDate proper...
I have this slow query
select * from table1 where id NOT IN ( select id from table2 )
Would this be faster by doing something like (not sure if this is possible):
select * from table1 where id not in ( select id from table2 where id = table1.id )
Or:
select * from table1 where table1.id NOT EXIST( select id from table2 where table...
I have a query and I would like to use an IIf function as part of the criteria. Here is the full SQL:
SELECT Hits.HitID, Hits.ListingID, Hits.HitCount, Hits.HitDate, Hits.HitTypeID, Hits.IsDeleted
FROM Hits
WHERE (((Hits.HitDate)>=[Forms]![frmReports]![txtStartDate]) AND ((Hits.IsDeleted)="N"));
Here is the piece of code that causing...
For example, I need to change from
to
.
I know PIVOT is for that, but it requires an aggregate function; and for my case, I donot need to aggregate only need column to row.
You can use the following sample data:
CREATE TABLE[StudentScores]
(
[UserName] NVARCHAR(20),
[Subject] NVARCHAR(30),
[Score]FLOAT,
)
GO
INSERT INT...
I am checking some old SQL Statements for the purpose of documenting them and probably enhancing them.
The DBMS is Oracle
I did not understand a statement which read like this.
select ...
from a,b
where a.id=b.id(+)
I am confused about the (+) operator., and could not get it at any forums.. (searching for + within quotes didn't work...
I have the following query:
EXPLAIN EXTENDED SELECT *
FROM (
`photo_data`
)
LEFT JOIN `deleted_photos` ON `deleted_photos`.`photo_id` = `photo_data`.`photo_id`
WHERE photo_data.photo_id = 'UKNn'
AND `deleted_photos`.`photo_id` IS NULL
I unfortunately have to use binary to compare this photo_id (which is being handed to me from a diffe...
This is my table:
ID KEY VALUE
1 alpha 100
2 alpha 500
3 alpha 22
4 beta 60
5 beta 10
I'm trying to retrieve a list of all KEY-s with their latest values (where ID is in its maximum):
ID KEY VALUE
3 alpha 22
5 beta 10
In MySQL I'm using this query, which is not effective:
SELECT temp.* F...
I am creating sql server 2008 Agent scheduler job form sql script.
Want to Log the details if failed in some case within Job > View Histroy.
Is there any way, so we can log custom text with Job > View Histroy?
...
Like the title says, in oracle you can issue the following command in SQL*Plus:
SQL> select something from anothertable; #sql
SQL> @{/home/me/somescript.sql}; #load sql from file and execute it
SQL> do something else in script; #other sql
Without having to file->open the sql script to load it to the UI.
Is there an equ...
I have table column with expression filter applied. Is there any existing parser that would allow me to parse this column? the column can contain simple conditions such as
PROPERTY = 'name' AND PROPERTY2 = 'something else'
or more advanced like
(PROPERTY IN ('foo', 'bar') AND (PROPERTY IN ('foo1', 'bar2') OR OTHER_PROPERTY IN ('etc'...
I am just trying to simplify a Select statement:
Select (a+b+c)/3 AS V, MIN((a+b+c)/3) as Min, MAX((a+b+c)/3) as Max from ....
Is there a clean way to avoid repeating that formula (a+b+c)/3 in the aggregate functions?
Thanks!
...
There are two columns in database as name FIRST_NAME and LAST_NAME.i want to join both the name and display in single column. The query which is used by me is given below but it gives error as Incorrect syntax near 'NAME'.
Modify the query:
SELECT [CREATED_ON], MUD.PK_ID AS USER_ID,
(MUD.FIRST_NAME + ' ' + MUD.LAST_NAME NAME)
AS NAME...
TITLE: Connect to Server
Cannot connect to ..
ADDITIONAL INFORMATION:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: ...
In a project on which I am performing maintenance, I am referencing a database stored on another server. This reference was previously pointing at a database on the same server, but my testbed server isn't large enough to store both databases, so I'm having to refer back to the live database.
Anyway, whoever created this application mad...
Hi,
The SQL table consists of columns calling_party, called_party and call_duration. The example records are the following:
A,B,23
A,C,12
A,H,90
B,R,56
N,B,78
For every user that is stored in both roles as calling_party and called_party I would like to make statistics, for example what was the total duration of incoming conversations...
the SQL has been installed but there is no server name and the Program does not accept any server name , and all the options , like the TCP , ports and Remote access are enabled
...
I'm about to convert a stored procedure from pl/sql to SQL Server. The procedure uses a cursor to loop through the results of a select query. Is there a SQL Server equivalent to the ORACLE rowtype construct?
...
Hello,
I am working on a website that has access data from a database (sql server). It will also be adding, updating deleting records in the database. It seems like there is an MDF file that gets created containing the database schema and all the records I guess? Once development is complete and I want to move this database to a real se...
A specified SQL Server instance name is not valid.
...