Forum Replies Created

Viewing 15 posts - 1 through 15 (of 51 total)

  • RE: left outer join needed?

    Ok got it. Hadn't thought of the one-to-many relationship scenario. Thank you very much Drew.

  • RE: left outer join needed?

    Amit H - Thanks for the clarification.

    Jack - Thanks, I tried to delete the duplicated post but was not able to.

  • RE: left outer join needed?

    If I dont want any fields from table2 then left join doesn't make a difference here, right?

  • RE: export resultset to excel

    It is not SSIS, it is a Java component built to only export data to any given format.

  • RE: export resultset to excel

    Someone please give some ideas

  • RE: case statement and where clause

    You could also consider the option of dynamic querying

    create table tableA (Lname varchar(10), Fname varchar(10))

    insert into tableA (Lname,Fname) select 'a1','b1' union select 'a2','b2'

    --select * from tableA

    declare @Type varchar(10),

    ...

  • RE: Need help with joining new table to existing query

    Excellent!! Thank you so much Ramesh!! Its working perfectly.

    Can you please explain how this part works..

    Ramesh (5/8/2009)


    ...

  • RE: update and group by

    Thanks for all the replies.

    Is it possible to use group by this way?

    update table1

    set totalvalue = sum(t2.column2)

    from table1 t1

    ...

  • RE: statement in t-sql

    why can't this be used?

    cast(cast('dd-mmm-yyyy' as smalldatetime) as nvarchar(11))

    select cast(cast('21-jan-2009' as smalldatetime) as nvarchar(11)) use_cast,

    convert(nvarchar(11), '21-jan-2009', 106) use_convert

    which outputs:

    use_cast ...

  • RE: statement in t-sql

    cast(cast('dd-mm-yyyy' as smalldatetime) as nvarchar(11))

  • RE: Please help with syntax

    You could try this:

    CREATE PROCEDURE usp_PLQuotes @policyid varchar(15)

    AS

    begin

    DECLARE @reccount AS int

    DECLARE @sql AS nvarchar(1000)

    ...

  • RE: To find max length of datatype

    Well, this solved my need today. I casted it to xml datatype.

    create table #tmp_xml (xmlrow xml)

    insert into #tmp_xml (xmlrow)

    select cast(replicate(cast('*' as varchar(max)), 20000000) as xml)

    select * from #tmp_xml

  • RE: To find max length of datatype

    If Non-xml datatypes returns max of 65535 characters, then how can we get all the characters that varchar(max) is storing. There must be some way to retrieve the data..

  • RE: To find max length of datatype

    Excellent..Thanks!! 🙂

    So, I can't change the value of Non-xml data here? I tried but it didn't. Is there a way?

    But it gave me an idea. I typecast my result to...

  • RE: To find max length of datatype

    The maximum size for a VARCHAR(MAX) is 2^31 - 1 bytes / characters.

    When i run the below query and check

    create table #tmp_xml (xmlrow varchar(max))

    insert into #tmp_xml (xmlrow)

    select replicate(cast('*'...

Viewing 15 posts - 1 through 15 (of 51 total)