Forum Replies Created

Viewing 10 posts - 31 through 40 (of 40 total)

  • RE: Conversion of Query from Access to SQL

    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'

  • RE: Help required to write this query

    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...

  • RE: Dynamic Query

    Instead of your statement:

    @QtyPerUnitMeasureOUT = @QtyPerUnitMeasure OUTPUT

    SELECT @QtyPerUnitMeasure

    try this:

    SELECT @QtyPerUnitMeasure=@QtyPerUnitMeasureOUT

  • RE: Enhancing the readability of your code: Table aliasing in sql

    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........

  • RE: I want to see Report monthwise

    Try using isnull(sum(a),0) amount.

  • RE: Is the Synatx correct??

    As long as you are getting the desired results,i dont find anything wrong with the logic

    sunitha

  • RE: SQL QUERY HELP - CASE Statement

    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...

  • RE: how to assign query results tovariable(int32) in execute SQL task

    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...

  • RE: how to assign query results tovariable(int32) in execute SQL task

    you declared the int variable?

  • RE: same string selection

    use the query:select column_name from table_name where cast(column_name as varbimary)=cast('FAHIEN' as varbinary):)

Viewing 10 posts - 31 through 40 (of 40 total)