Viewing 15 posts - 406 through 420 (of 761 total)
sachince61 (5/21/2012)
All of you thank you very much for reply....
You're welcome. 🙂
But, what worked??....it would be great if you could post the solution so that other people can also view...
May 21, 2012 at 10:16 pm
pdanes (5/21/2012)
May 21, 2012 at 5:40 am
Yes, mine was "way too over-complicated".
Cadavre and Dwain....your queries were better.:-)
Good work guyz.
May 21, 2012 at 4:33 am
pdanes (5/21/2012)
According to BOL, an IN clause is the same as the different elements with OR constraints.
Oh? I didn't know that, and I seem to remember reading that multiple ORs...
May 21, 2012 at 4:06 am
Looks good Dwain.
But, I'm still unsure what the OP wants....so will say something after the OP elaborates upon the requirement a little. 🙂
May 21, 2012 at 4:01 am
SELECT ... WHERE fld in ('aaa','bbb','ccc')
The above query(for understanding can be written as):
SELECT ... WHERE fld = 'aaa' OR fld = 'bbb' OR fld = 'ccc'
Which means that Sql Server...
May 21, 2012 at 3:54 am
What do you mean by "First CheckOut Row" and "Second CheckOut Row"??
From what I understood(that "First CheckOut Row" is the first row ordered by "CheckOut" and "Second CheckOut Row" is...
May 21, 2012 at 3:27 am
Gullimeel (5/21/2012)
--first query
select t1.categoryname ,count(*) categorycount from @table1 t1
inner join @table2 t2
on t1.catid= t2.catid
inner join @table3 t3
on t2.sid = t3.sid
group by t1.categoryname
--second query
select...
May 21, 2012 at 2:48 am
gelu01 (5/19/2012)
Lowell (5/19/2012)
if the data elements are consecutive numbers, but if they are not, i don't think you get...
May 21, 2012 at 12:33 am
Lowell (5/19/2012)
if the data elements are consecutive numbers, but if they are not, i don't think you get the...
May 19, 2012 at 6:30 am
This would do it:
--Creating Table
Create Table Ex
(Col1 char(1),
Col2 int )
--Inserting Sample Data
Insert Into Ex
Select 'a', 1
Union ALL
Select 'a', 2
Union ALL
Select 'a', 3
Union ALL
Select 'b', 5
Union ALL
Select 'b', 6
Union ALL
Select...
May 19, 2012 at 5:36 am
There is no "Spoon" and there is no 11th row....:-D
Please tell us the Logic(if any) that got you the Desired Result Set from the Sample Data.
May 19, 2012 at 5:09 am
I completely agree with you, Matt. You are right about the limitations of a Function and the problems one might run into by using such techniques.
This was just an attempt...
May 18, 2012 at 10:24 pm
You can do it using Table Variables. The following link might be helpful for you:
May 18, 2012 at 6:05 am
Matt Miller (#4) (5/17/2012)
preetham gowda (5/17/2012)
Create Function dbo.Fun_Proc_Test1(@id1 int) Returns varchar(30)
As
Begin
Declare @res varchar(30)
--Set @res = (Select * From OpenQuery(ABHI, N'Declare @result varchar(30) Exec Abhi.Test.dbo.convert2Lower @id = ' + Cast(@id1...
May 17, 2012 at 11:24 pm
Viewing 15 posts - 406 through 420 (of 761 total)