Click here to Skip to main content
15,884,425 members
Home / Discussions / Database
   

Database

 
QuestionHelp Me:Can we select sum of 2 columns in one select statement? Pin
priya_p23319-Feb-07 17:41
priya_p23319-Feb-07 17:41 
AnswerRe: Help Me:Can we select sum of 2 columns in one select statement? Pin
K.P.Kannan19-Feb-07 18:26
K.P.Kannan19-Feb-07 18:26 
AnswerRe: Help Me:Can we select sum of 2 columns in one select statement? Pin
asithangae19-Feb-07 18:30
asithangae19-Feb-07 18:30 
GeneralRe: Help Me:Can we select sum of 2 columns in one select statement? Pin
asithangae19-Feb-07 18:42
asithangae19-Feb-07 18:42 
Questionparent and child deleting using typed datasets, cascade to delete children Pin
steve_rm19-Feb-07 17:06
steve_rm19-Feb-07 17:06 
QuestionRe: parent and child deleting using typed datasets, cascade to delete children Pin
steve_rm19-Feb-07 19:41
steve_rm19-Feb-07 19:41 
QuestionMulti-Column Contains Syntax??? Pin
code-frog19-Feb-07 12:50
professionalcode-frog19-Feb-07 12:50 
AnswerRe: Multi-Column Contains Syntax??? Pin
Krish - KP19-Feb-07 23:38
Krish - KP19-Feb-07 23:38 
i'm just pasting below examples from SQL Server help
hope this may help you

Examples
A. Use CONTAINS with <simple_term>
This example finds all products with a price of $15.00 that contain the word "bottles".

USE Northwind
GO
SELECT ProductName
FROM Products
WHERE UnitPrice = 15.00
AND CONTAINS(QuantityPerUnit, 'bottles')
GO

B. Use CONTAINS and phrase in <simple_term>
This example returns all products that contain either the phrase "sasquatch ale" or "steeleye stout".

USE Northwind
GO
SELECT ProductName
FROM Products
WHERE CONTAINS(ProductName, ' "sasquatch ale" OR "steeleye stout" ')
GO

C. Use CONTAINS with <prefix_term>
This example returns all product names with at least one word starting with the prefix choc in the ProductName column.

USE Northwind
GO
SELECT ProductName
FROM Products
WHERE CONTAINS(ProductName, ' "choc*" ')
GO

D. Use CONTAINS and OR with <prefix_term>
This example returns all category descriptions containing the strings "sea" or "bread".

USE Northwind
SELECT CategoryName
FROM Categories
WHERE CONTAINS(Description, '"sea*" OR "bread*"')
GO

E. Use CONTAINS with <proximity_term>
This example returns all product names that have the word "Boysenberry" near the word "spread".

USE Northwind
GO
SELECT ProductName
FROM Products
WHERE CONTAINS(ProductName, 'spread NEAR Boysenberry')
GO

F. Use CONTAINS with <generation_term>
This example searches for all products with words of the form dry: dried, drying, and so on.

USE Northwind
GO
SELECT ProductName
FROM Products
WHERE CONTAINS(ProductName, ' FORMSOF (INFLECTIONAL, dry) ')
GO

G. Use CONTAINS with <weighted_term>
This example searches for all product names containing the words spread, sauces, or relishes, and different weightings are given to each word.

USE Northwind
GO
SELECT CategoryName, Description
FROM Categories
WHERE CONTAINS(Description, 'ISABOUT (spread weight (.8),
sauces weight (.4), relishes weight (.2) )' )
GO

H. Use CONTAINS with variables
This example uses a variable instead of a specific search term.

USE pubs
GO
DECLARE @SearchWord varchar(30)
SET @SearchWord ='Moon'
SELECT pr_info FROM pub_info WHERE CONTAINS(pr_info, @SearchWord)
GeneralRe: Multi-Column Contains Syntax??? Pin
code-frog20-Feb-07 8:19
professionalcode-frog20-Feb-07 8:19 
QuestionADO.NET book that uses practical application examples Pin
reach4thelasers19-Feb-07 11:18
reach4thelasers19-Feb-07 11:18 
AnswerRe: ADO.NET book that uses practical application examples Pin
firestoper19-Feb-07 12:56
firestoper19-Feb-07 12:56 
AnswerRe: ADO.NET book that uses practical application examples Pin
Rahithi23-Feb-07 2:30
Rahithi23-Feb-07 2:30 
GeneralRe: ADO.NET book that uses practical application examples Pin
reach4thelasers3-Mar-07 12:01
reach4thelasers3-Mar-07 12:01 
Questiondeference between tow types of join Pin
a_yosef19-Feb-07 11:13
a_yosef19-Feb-07 11:13 
AnswerRe: deference between tow types of join Pin
Christian Graus19-Feb-07 11:21
protectorChristian Graus19-Feb-07 11:21 
GeneralRe: deference between tow types of join Pin
a_yosef19-Feb-07 12:15
a_yosef19-Feb-07 12:15 
QuestionWhich DataType? Pin
Sam Heller19-Feb-07 6:16
Sam Heller19-Feb-07 6:16 
AnswerRe: Which DataType? Pin
andyharman19-Feb-07 7:00
professionalandyharman19-Feb-07 7:00 
GeneralRe: Which DataType? Pin
Marcus J. Smith19-Feb-07 8:14
professionalMarcus J. Smith19-Feb-07 8:14 
QuestionBLOB - Document System Pin
alwinSCH19-Feb-07 5:07
alwinSCH19-Feb-07 5:07 
AnswerRe: BLOB - Document System Pin
andyharman19-Feb-07 5:34
professionalandyharman19-Feb-07 5:34 
QuestionCopy Stored Procedure Pin
Gjuviqta19-Feb-07 3:15
Gjuviqta19-Feb-07 3:15 
AnswerRe: Copy Stored Procedure Pin
Mark J. Miller19-Feb-07 9:11
Mark J. Miller19-Feb-07 9:11 
GeneralRe: Copy Stored Procedure Pin
Gjuviqta21-Feb-07 5:00
Gjuviqta21-Feb-07 5:00 
Questionhow to install two MDAC Versions in NT4.0 Pin
anjigadu19-Feb-07 1:27
anjigadu19-Feb-07 1:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.