Viewing 15 posts - 91 through 105 (of 568 total)
create table #temp
(
SKU int,
Qty int,
PKQTY int
)
insert into #temp
select 123,100,25
union all
select 321,200,100
union all
select 555,500,100
SELECT SKU,Qty,PKQTY
FROM
(select slno from
(select 1 slno
union all
select 2
union all
select 3
union all...
January 6, 2010 at 8:45 pm
amitsingh308 (1/5/2010)
January 5, 2010 at 3:15 am
Hi,
Desired order by is not possible or you post the wrong output.
However, you just use the normal order by class
Select * from MYTABLE
Order by col1, col2, col3
col1|col2|col3
A|A|001
A|B|002
A|C|003
B|A|003
B|B|001
B|C|002
January 5, 2010 at 3:08 am
Hi,
Ensure that the OH table having the unique values for each history and just build this as procedure than pass the search value.
create table #testOH
(
tsh_orderid char (16) null,
tsh_group smallint...
January 5, 2010 at 2:57 am
now I want to calculate the sum of all transaction which are more than 500, having same email id.
Name city ...
January 5, 2010 at 1:15 am
Hi,
The first table testv and the search result is more over matches by the above I mentioned, and how the second table testOH related to the tsv_orderid, this is my...
January 5, 2010 at 12:29 am
Hi,
Ensure your out put should in row format.
create MYTABLE
(
slno int identity(1,1),
Result varchar(20)
)
insert into MYTABLE
select @result
select max(case when slno = 1 then Result else '' end) COL1,
max(case when slno =...
January 4, 2010 at 10:00 pm
Hi,
What you try so far, is any statement you build to achieve?
ok, try in this way
/*create the table with additional column*/
create table #testv
(
slno int identity(1,1),
tsv_orderid char (16) null,
tsv_group smallint...
January 4, 2010 at 9:32 pm
update aa
set aa.Sgpa = a.Sgpa,
aa.Cgpa = a.Cgpa
from
GradePointCalculation_Bkup as aa,
(Select T1.REgisterno,T2.Sgpa,T3.Cgpa From #temparrearTable1 T1
Inner join #temparrearTable2 T2 on T1.Registerno=T2.Registerno
Inner Join #temparrearTable3 T3 on T3.Registerno=T1.REgisterno) as a
where
aa.Registerno = a.REgisterno
January 2, 2010 at 3:59 am
Hi,
try with the below join
..
..
..
DWT40034_BZL_VAT_TAX.ICMS_TAX as C17_ICMS_TAX,
DWT40034_BZL_VAT_TAX.ICMS_ST_TAX as C18_ICMS_ST_TAX
from DWB01002_GLOBAL_DW_EXTRACT.dbo.DWT40034_BZL_VAT_TAX as DWT40034_BZL_VAT_TAX
inner join
(
select max(DWT40034_BZL_VAT_TAX.ROW_ID_NO)ROW_ID_NO, DWT40034_BZL_VAT_TAX.INTGRT_CNTRY_CD, DWT40034_BZL_VAT_TAX.ORD,
DWT40034_BZL_VAT_TAX.ORD_LN,
DWT40034_BZL_VAT_TAX.INTGRT_SRC_TRX_DT
from dbo.DWT40034_BZL_VAT_TAX
where DWT40034_BZL_VAT_TAX.ETL_PROC_STAT = 1
group by DWT40034_BZL_VAT_TAX.INTGRT_CNTRY_CD, DWT40034_BZL_VAT_TAX.ORD,DWT40034_BZL_VAT_TAX.ORD_LN
)as DWT40034_BZL_VAT_TAX_MAX
on DWT40034_BZL_VAT_TAX.INTGRT_CNTRY_CD = DWT40034_BZL_VAT_TAX_MAX.INTGRT_CNTRY_CD
and...
December 27, 2009 at 10:40 pm
Hi,
What try to achieve?
Actually am tried to solve the errors what you post the above,
Ok, the retrieve data should be from DWT40034_BZL_VAT_TAX table for the max ROW_ID_NO, is...
December 27, 2009 at 10:30 pm
Hi,
Message says the col5 name not specified.
so try to name the column5 as below
select max(col1)
(
select column1 as col1,
column2 as col2,
column3 as col3,
column4 as col4,
max(column5) /*here the problem that...
December 27, 2009 at 10:10 pm
Msg 8155, Level 16, State 2, Line 1
No column was specified for column 5 of 'X'.
Hi,
Message say the column name not mentioned,
SELECT max(DWT40034_BZL_VAT_TAX.ROW_ID_NO)
from
(
select DWT40034_BZL_VAT_TAX.ROW_ID_NO, DWT40034_BZL_VAT_TAX.INTGRT_CNTRY_CD, DWT40034_BZL_VAT_TAX.ORD,
DWT40034_BZL_VAT_TAX.ORD_LN,
max(DWT40034_BZL_VAT_TAX.INTGRT_SRC_TRX_DT)INTGRT_SRC_TRX_DT...
December 27, 2009 at 9:46 pm
..
..
..
DWT40034_BZL_VAT_TAX.ICMS_TAX as C17_ICMS_TAX,
DWT40034_BZL_VAT_TAX.ICMS_ST_TAX as C18_ICMS_ST_TAX
from DWB01002_GLOBAL_DW_EXTRACT.dbo.DWT40034_BZL_VAT_TAX as DWT40034_BZL_VAT_TAX
WHERE DWT40034_BZL_VAT_TAX.ROW_ID_NO IN
(
SELECT max(DWT40034_BZL_VAT_TAX.ROW_ID_NO)
from
(
select DWT40034_BZL_VAT_TAX.ROW_ID_NO, DWT40034_BZL_VAT_TAX.INTGRT_CNTRY_CD, DWT40034_BZL_VAT_TAX.ORD,
DWT40034_BZL_VAT_TAX.ORD_LN, max(DWT40034_BZL_VAT_TAX.INTGRT_SRC_TRX_DT)
from dbo.DWT40034_BZL_VAT_TAX
where DWT40034_BZL_VAT_TAX.ETL_PROC_STAT = 1
group by DWT40034_BZL_VAT_TAX.ROW_ID_NO, DWT40034_BZL_VAT_TAX.INTGRT_CNTRY_CD, DWT40034_BZL_VAT_TAX.ORD,
DWT40034_BZL_VAT_TAX.ORD_LN
) AS X
)
December 27, 2009 at 9:32 pm
Hi,
Instead of doing the separation, try with the dynamical execution.
create table #temp
(
slno int,
NAMES varchar(10)
)
insert into #temp
select 1,'A'
union all
select 2,'AA'
union all
select 3,'AAA'
union all
select 4,'AAAA'
declare @sql nvarchar(1000),
@l_store_list varchar(50)
set @l_store_list =...
December 24, 2009 at 4:02 am
Viewing 15 posts - 91 through 105 (of 568 total)