Viewing 15 posts - 361 through 375 (of 569 total)
Kelvin Phayre (6/16/2009)
Why is sqlcmd doing this?
Hi,
Post your statement and the table schema to better assistance in this issue
ARUN SAS
June 16, 2009 at 3:49 am
Hi,
not clear in the table
create #tableA
(
ID1 int,
name1 varchar(10)
)
create #tableB
(
ID2 int,
Address varchar(10)
)
then what is the relation of these two table?
(it Should be some reletion like ID1 = ID2)
to get
id...
June 13, 2009 at 1:32 am
June 12, 2009 at 3:33 am
Hi,
just try this,
select Range,YearofValue,
(case when Baseprice1 > 0 then '1'
when Baseprice3 > 0 then '3'
when Baseprice8 > 0 then '8'
when Baseprice9 > 0 then '9' end )months
from #temptable
ARUN SAS
June 11, 2009 at 5:06 am
hi,
try this
A) find the MIN yearofValue by Range, and then the 1st baseprice that is > 0.
select Range,min(yearofValue)
from #temptable
where Baseprice1 >0
group by Range
B) And then find the MAX yearofvalue...
June 11, 2009 at 4:46 am
Hi,
try this
create table #temp1
(
name1 varchar(10)
)
create table #temp2
(
name1 varchar(10)
)
insert into #temp1
select 'ABCD'
union all
select 'BCDA'
insert into #temp2
select 'CDAB'
union all
select 'DABC'
insert into #temp1
select name1 from (
select name1 from #temp1
union
select...
June 11, 2009 at 1:25 am
Hi,
try this
/*
create table #temp
(
Value varchar(10),
ID1 int
)
insert into #temp
select 'XXXX',1
union all
select 'YYYY',2
union all
select 'ZZZZ',3
union all
select 'AAAA',3
select * from #temp
*/
select id1,max(value) from #temp
group by id1
having count(*) = 1
union all
select id1,(max(Value)+','+min(Value))value from...
June 11, 2009 at 12:44 am
Hi,
Don't edit am working with the old statement,
however try this
-- create table #temp1
-- (
-- datetime1 datetime,
-- View1 int
-- )
-- insert into #temp1
-- select '2009-06-01 00:00:00.000 ',1
-- union all
-- select '2009-06-01...
June 10, 2009 at 3:26 am
weirdlNet (6/9/2009)
store proc (I assume it is a system store proc :unsure:) Does anyone have idea how I can...
June 9, 2009 at 9:28 pm
Hi,
try this
create table #ID
(
ID1 int,
Name1 varchar(2)
)
insert into #ID
select 1,'A'
union
select 2,'B'
union
select 3,'C'
create table #EVENT
(
id int,
Event_Id int,
user1 varchar(2)
)
insert into #EVENT
select 1,10,'X'
union
select 1,20,'Y'
union
select 1,30,'Z'
union
select 2,10,'M'
union
select 2,20,'N'
union
select 2,30,'O'
union
select 3,10,'P'
union
select 3,20,'Q'
union
select 3,30,'R'
--select * from #id
--select...
June 9, 2009 at 2:20 am
rafejeyaraj (6/9/2009)
Still in Same problem.
Hi,
Then undependably check this all create table statement works with out error
Like
CREATE TABLE [dbo].[tblOrder](
[Order_ID] [int] NOT NULL,
[Order_Date] [datetime] NULL,
[Customer_SID] [int] NULL,
CONSTRAINT [PK__tblOrder__09DE7BCC] PRIMARY KEY CLUSTERED...
June 9, 2009 at 1:25 am
rafejeyaraj (6/9/2009)
Incorrect syntax near the keyword 'null'.
Msg 170, Level 15, State 1, Procedure spAuthentication80, Line 10
Line 10: Incorrect syntax near 'END'.
Msg...
June 9, 2009 at 12:59 am
Hi,
Compile the attached sp, and then post the error.
ARUN SAS
June 9, 2009 at 12:35 am
Viewing 15 posts - 361 through 375 (of 569 total)