Showing posts with label suggest. Show all posts
Showing posts with label suggest. Show all posts

Monday, February 13, 2012

a little SQL problem

I have what is probably a simple problem and I guess I'm just looking
for whatever solutions you all can suggest...
I have this query:
Select columnA , sum(columnB) as VAL from myTable where
columnA in ('01,'02') group by columnA
which may return:
columnA VAL
-- --
01 100.00
02 200.00
Just using SQL, I'd like to return a table that looks like:
columnA VAL
-- --
01 300.00
and I don't want to use the query:
Select '01', sum(columnB) as VAL from myTable where
columnA in ('01','02')
Any suggestions? Your help is much appreciated.
Marcbrownjenkn@.aol.com wrote:
> I have what is probably a simple problem and I guess I'm just looking
> for whatever solutions you all can suggest...
> I have this query:
> Select columnA , sum(columnB) as VAL from myTable where
> columnA in ('01,'02') group by columnA
> which may return:
> columnA VAL
> -- --
> 01 100.00
> 02 200.00
> Just using SQL, I'd like to return a table that looks like:
> columnA VAL
> -- --
> 01 300.00
>
> and I don't want to use the query:
> Select '01', sum(columnB) as VAL from myTable where
> columnA in ('01','02')
> Any suggestions? Your help is much appreciated.
> Marc
Maybe like this:
SELECT MIN(columnA) AS columnA, SUM(columnB) AS val
FROM myTable
WHERE columnA IN ('01','02');
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--

Thursday, February 9, 2012

a full-text search engine

Hi

I'm working on a digital Library project. Can anybody suggest a powerfulAsp.net full-text search engine Script or guide?

Thanks

Hi,

If you're using SQL Server as the database, I would suggest the Microsoft Full-Text Engine for SQL Server.

The Microsoft Full-Text Engine for SQL Server (MSFTESQL) service is a full-text indexing and search engine. The MSFTESQL engine is built on Microsoft Search (MSSearch) technology and is integrated into the Microsoft SQL Server 2005 Database Engine more tightly than ever.

Please check the following link for more information

http://msdn2.microsoft.com/en-us/library/ms142587.aspx

HTH. If this does not answer your question, please feel free to mark the post as Not Answered and reply. Thank you!

|||

Thanks for your reply,

I use SQL Server 2005 and I don't think Microsoft Full-Text Engine is suitable for me because I don't want my search engine search the files. All of our books will scan with OCR components and the full text of books will extract into a "NTEXT" field of the bank. I want a search engine for searching the "NTEXT" field efficiently.

Meanwhile I use a shared hosting plan on internet and can't use Administrator role for database.

Can you suggest any solution?

Thank you very much