I am creating a search engine for my php based website. I need to search a mysql table.
Thing is, the search engine must be pretty 'smart', so that users can easily find their items (it's a classifieds website).
I have currently set up a FULLTEXT search with this piece of code:
MATCH (headline) AGAINST ($querystring)
But this is...
will the sql queries i run in ms-access also work on mysql without any changes ?
...
I am creating temp tables (#temp_table) in my stored procedure. It is a huge table with large data. Then I am creating a index in the storeed procedure as it is required for faster query to the temp table. But when I execute the stored procedure, the index is not used. The index is not being created when the stored procedure is executed....
what are the queries to do the following in Oracle?
get names of all views which are
present ? (Similar to select * from
view, but i want to get views not
tables)
See source of a particular
view.
...
I am putting together a nice little database for adding values to options, all these are setup through a map (Has and Belongs to Many) table, because many options are pointing to a single value.
So I am trying to specify 3 option.ids and a single id in a value table - four integers to point to a single value. Three tables. And I am runn...
view v1
a1 a2
---------
1 a
1 b
1 c
2 d
3 e
3 f
view v2
b1 b2
--------
1 a;b;c
2 d
3 e;f
how to using sql change the v1 to v2
using a1 group to connect a2
...
It may looks a naive question but I am wondering about the relationship between primary keys and indexes in most common SQL databases.
Is it a standard rule for a SQL database to create automatically an index for every primary key?
I am asking that because I am designing a model with Django and I am wondering if it is redundant to set...
Hi there,
I have a SQL stored procedure which under some situations will return a result of -1 if it fails, but also returns a message via the RAISERROR command e.g.:
BEGIN
RAISERROR ('Error %i has occurred', 11, 1, 0)
RETURN -1
END
I am accessing this via coldfusion using cfstoredproc e.g.:
<cfstoredproc procedure="sp_ret...
i have a table with products and the user can choose which regions and cities he wants to let them be visible to. he can choose ALL REGIONS and ALL CITIES from a drop down menu and then i will put in the columns = 0.
the the buyers can choose which city they want to watch products from so they aslo have a drop down menu to pick a region...
I have a sql full text catalog on a cms database (SQL 2005). The database holds the CMS page content within a ntext column which is part of the full text catalog. As expected the searching takes into account the xml tags within the page content so searching for "H1" returns all the pages with H1 tags.
Is it possible to apply filters wi...
In MS-Access database, table called NewTable3
colname is a text column containing lot of empty cells or blanks.
i want to put ? character in empty cells . when i run the query
UPDATE NewTable3 SET colname = '?' WHERE ISNULL(colname) ;
This query updates 0 records why . what is wrong with this query
...
i want to write procedure which accents name of 2 tables as arguments and then compare the number or rows of the 2.
Also i want to each field of the 2 columns.The row which has a missmatch shold be
moved to another error table.
Can anyone give a PL/SQL procedure for doing this.
I want to achive this in oracle 9
...
sql - query to insert a column value if it does not exist in that column
...
Hi,
I have a table of events, and another of ratings. Each event can have many ratings.
I need to be able to to pull the top three events from the database by rating, but of course, the ratings need to be averaged, so an event with one five star rating is not rated more highly than one with 4 average and 100 ratings.
Can anyone guide me...
Hi,
Given a simple schema e.g. PurchaseOrders { OrderId, Total, LineItemCount }, I want to generate a simple query for some simple stats like below:
select sum(lineitemcount) as totalitems, sum(total) as totalsales
from purchaseorders
However in Linq to Sql I am struggling to get this into one query.
At the moment I have this:
deci...
what are the various other programs using which i can connect to odbc database besides ms-access.
i'm talking about programs in which i can run sql queries. i dont want to use ms-access because the size of the access file has become 1.5 gb .
why my database is 1.5 gb ?
i am using access to connect to odbc - mysql database . which is q...
I've been thinking...when you execute an SQL statement on a database, what type of object is your data stored in?
Is table an object?
...
I have simplified my function to the following:
create function [dbo].[UserSuperTeams](@ProjectId int)
returns table
as
return
if @ProjectId=0
begin
select TeamId from TblTeam t
union
select 0 as TeamId
end
else
begin
select t.TeamId from TblTeam t
union
select 1 as TeamId
...
I don't know if this is even possible, so i would appreciate any ideas, even those outside of Sql Server 2005, on how this might be accomplished. I have a linked server set up to a remote mainframe and I have a simple import job that runs overnight. The problem is that the table on the mainframe that the import needs to come from is just...
i am migrating from ms access database to mysql database with java frontend so that my application can be used in linux as well .
in ms access here's what i would do
go to create query . write a select statement . call give the name of the query as query1.
when double clicking on query1 you would get the result of select statement in ...