Viewing 10 posts - 31 through 40 (of 40 total)
Hey,u just copied the same query and rearranged it neatly,but dont u think the status value 'R' should be placed within single quotes?
(dbo.PURCHASE_ORDER.STATUS)='R'
May 19, 2010 at 4:55 am
pls try this:
declare @CurDate varchar(25)
set @CurDate='13 jul 2010'
declare @TmpTbl table(qId int,qFrom varchar(15),qTo varchar(15),startDate datetime,
toDate datetime,Mnths varchar(50))
insert into @TmpTbl values(1,'January','March',Null,Null,'January,February,March')
insert into @TmpTbl values(2,'April','june',Null,Null,'April,May,June')
insert into @TmpTbl values(3,'July','September',Null,Null,'July,August,September')
insert into @TmpTbl values(4,'October','December',Null,Null,'October,November,December')
select qId,datename(mm,@CurDate)
from...
May 19, 2010 at 4:46 am
Instead of your statement:
@QtyPerUnitMeasureOUT = @QtyPerUnitMeasure OUTPUT
SELECT @QtyPerUnitMeasure
try this:
SELECT @QtyPerUnitMeasure=@QtyPerUnitMeasureOUT
April 21, 2010 at 11:49 pm
I too agree that using meaningful aliases increase the readabilityof SQL queries.
In fact,i follow the same practices as David Burrows except that i dont indent ON/AND beneath JOIN .
Happy querying........
May 7, 2009 at 11:10 pm
As long as you are getting the desired results,i dont find anything wrong with the logic
sunitha
April 17, 2008 at 10:55 pm
declare @Tmp table(Row Int Identity,pid int,minqty1 float,maxqty1 float,price1 float,minqty2 float default 0,maxqty2 float default 0,price2 float default 0)
declare @Tmp1 table(RowNum Int Identity,pid int,minqty float,maxqty float,price float)
insert into @Tmp1...
April 12, 2008 at 12:01 am
are you using a stored proc?
Are you trying to return the integer value from the query?
In SQl sever we do like this:-
declare @Var1 as int
set @Var1=(select max(field_name) from table_name)
set...
April 9, 2008 at 10:16 pm
you declared the int variable?
April 8, 2008 at 11:55 pm
use the query:select column_name from table_name where cast(column_name as varbimary)=cast('FAHIEN' as varbinary):)
March 10, 2008 at 2:35 am
Viewing 10 posts - 31 through 40 (of 40 total)