Forum Replies Created

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

  • RE: Database Query

    Thanks Jeff.

    I was exactly looking for something like

    The bottom line here is to make sure the data in the join columns is "right sized" for maximum efficiency.

    .

    Thanks for...

    Regards,
    Pravasis

  • RE: Database Query

    Mansfield (4/11/2013)


    1. Joining integer columns (provided that they are correctly indexed) is faster than joining other data types because it is relatively straightforward (see below)

    2. It depends. ...

    Regards,
    Pravasis

  • RE: Use of Threads in Data Flow task of SSIS

    Though I checked the following link, still I am not very clear about how it works.

    http://msdn.microsoft.com/en-us/library/cc966529.aspx

    Any ideas where to get more info?

    Regards,
    Pravasis

  • RE: Join Issue

    Thanks you all.

    That was really helpful.Appreciate it.

    Regards,
    Pravasis

  • RE: Join Issue

    Great, thats is probably the best solution where in we can limit the number of records as that of source table and get the desired result. Thanks Eugene.

    I guess this...

    Regards,
    Pravasis

  • RE: Join Issue

    Eugene Elutin (5/29/2012)


    and what is the priority of your rules? which record from destination table you want to select first?

    the one with minimum id where any of the names match...

    Regards,
    Pravasis

  • RE: Join Issue

    Eugene Elutin (5/29/2012)


    Could you please specify all conditions you have

    expanding the same sql

    select s.id, s.name1,s.name2,s.name3,s.name4,d.[desc]

    from dbo.Test_Join_Source s

    inner join dbo.Test_Join_Destination d

    on (s.name1=d.name1 or s.name2=d.name2 or s.name3=d.name3 or s.name4=d.name4)

    Regards,
    Pravasis

  • RE: Join Issue

    Thanks for the reply Eugene. It was quite informative. Now I can say, I understand the joins some what better. Thanks.

    Any ways, if we go back to the original question...

    Regards,
    Pravasis

  • RE: Join Issue

    Eugene Elutin (5/28/2012)


    pravasis (5/28/2012)


    Dung Dinh (5/28/2012)


    I'm sure that with the sample data and your query. The result is always 2 records

    idname1name2desc

    1test1 test2 ...

    Regards,
    Pravasis

  • RE: Join Issue

    Dung Dinh (5/28/2012)


    I'm sure that with the sample data and your query. The result is always 2 records

    idname1name2desc

    1test1 test2 ...

    Regards,
    Pravasis

  • RE: Join Issue

    Try the following.

    drop table [dbo].[Test_Join_Source2]

    drop table [Test_Join_Destination2]

    CREATE TABLE [dbo].[Test_Join_Source2](

    [id] [int] NULL,

    [name1] [varchar](50) NULL,

    [name2] [varchar](50) NULL

    )

    CREATE TABLE [dbo].[Test_Join_Destination2](

    [id] [int] NULL,

    [name1] [varchar](50) NULL,

    [name2] [varchar](50) NULL,

    [desc] [nchar](10) NULL

    )

    INSERT INTO Test_Join_Source2(id,name1,name2)

    VALUES(1,'test1','test2')

    INSERT INTO Test_Join_Destination2(id,name1,name2,[desc])

    VALUES(1,'test1','test4','testing')

    INSERT...

    Regards,
    Pravasis

  • RE: Join Issue

    patrickmcginnis59 (5/28/2012)


    Heres a fairly literal approach. However, I'm sure theres more interesting ways to go about it!

    select s.id, s.name1,s.name2,d.[desc]

    from dbo.Test_Join_Source s

    inner join dbo.Test_Join_Destination d

    on

    s.name1=d.name1

    union

    select s.id, s.name1,s.name2,d.[desc]

    from dbo.Test_Join_Source s

    inner join...

    Regards,
    Pravasis

  • RE: Join Issue

    Dung Dinh (5/28/2012)


    Could you tell me the purpose of this query? I'm not clear about this why you use OR condition to join 2 tables.

    How to prevent it? => It...

    Regards,
    Pravasis

  • RE: SSRS URL access issue.

    Hey, good news.

    It worked in Windows 7.

    Initially, I configured it in port 80. It was working with only with localhost option!!! When I tried with IP or system name,...

    Regards,
    Pravasis

  • RE: Finding unused variables in a stored procedure

    Eric Klovning (12/29/2010)


    There are two tools I know of, both plugins for SSMS.

    SQL Refactor from Apex SQL

    http://www.apexsql.com/sql_tools_refactor.aspx

    SQL Prompt (professional version) from Red Gate

    http://www.red-gate.com/products/sql-development/sql-prompt/

    Thanks!

    Really appreciate it.

    Regards,
    Pravasis

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