Viewing 15 posts - 17,011 through 17,025 (of 26,489 total)
Would help if you provided the table defs (CREATE TABLE statements), some sample data (series of INSERT INTO statements), and expected output.
As a newbie on ssc, please take the time...
February 5, 2010 at 2:27 pm
< .... Running screaming to my tent in the desert ......>
Why is it that when you ask someone to SHOW you want they are trying to do they never...
February 5, 2010 at 2:06 pm
ronaldkrex (2/5/2010)
Select * from States. Then I want to add the value ALL to the resultset.
Not really sure if you want this:
select 'ALL',StateName from States
or this
select StateName from States
union all
select...
February 5, 2010 at 2:04 pm
No, that isn't what I asked for. Show what you are trying to accomplish. What code have you written so far, and you actually want.
February 5, 2010 at 1:55 pm
Try this:
SELECT * FROM [dbo].[tblReportData]
WHERE (CardORKey='Card')
AND (LastName = @LastName OR @LastName IS NULL)
AND (Date >= @StartDate OR @StartDate IS NULL)
AND (Date < dateadd(dd,1,@EndDate) OR @EndDate IS NULL)...
February 5, 2010 at 1:36 pm
Something like this, I would guess.
create table #testtab (
CId int,
SN char(4)
);
insert into #testtab
select 1, 'ABC1' union all
select...
February 5, 2010 at 1:32 pm
mbender (2/5/2010)
February 5, 2010 at 1:04 pm
lobbymuncher (2/5/2010)
Anybody wanna beer? It's friday! My shout. Get yer shoes on. Lynn I'll get you a coke.
Actually, I'll take a fresh brewed sweet tea, just not as sweet as...
February 5, 2010 at 1:02 pm
mbender (2/5/2010)
Select PartNumber, Location, Quantity from InventoryThatNeedsReorders Where ((Quantity-ReorderPoint)>=1)
I would not expect it to show:
Widget 123,...
February 5, 2010 at 12:59 pm
Will this help get you started:
create table #testtab (
intval int
);
insert into #testtab
select 1 union all
select 2 union all
select 3 union all
select 4;
select
STUFF((select...
February 5, 2010 at 11:55 am
Viewing 15 posts - 17,011 through 17,025 (of 26,489 total)