Forum Replies Created

Viewing 13 posts - 1 through 13 (of 13 total)

  • RE: Remove certain characters from a string

    Thanks for the ideas and codes.

    I have another question.

    Let's say I have a string something like below:

    test-asdasdasd="xxx"

    If I want to replace asdasdasd="xxx" with blank ('') so that I can...

  • RE: Performance improvement on updating data set

    I tried below and it seems much faster.

    UPDATE R

    SET Value1_Check = P.CheckName

    ,Value2_Check = P2.CheckName

    ,Value3_Check = P3.CheckName

    ,Value4_Check = P4.CheckName

    FROM #DataTableName R

    LEFT JOIN #Join P ON (ROUND(R.Value1_Pct,4) >= P.Low OR...

  • RE: Find Min(), Max() value from a table

    I use this line of code in a stored procedure to pull the report and the sp takes about 1.5 seconds. I am trying to improve it so that it...

  • RE: Find Min(), Max() value from a table

    Will do sometime today. Thanks.

    Eirikur Eiriksson (7/21/2016)


    ocean3300 (7/20/2016)


    This table has about 5M records and it takes about 300 milliseconds to execute below query. Just wondering if there are other...

  • RE: Find Min(), Max() value from a table

    No, I don't have an index on date column. However, I do have the index on a combination of three column including date column. When I retrieve the data from...

  • RE: how to set NULLs to Zero

    If you want to display sum(omlExtendedPriceBase) as 0 if the value is null, use ISNULL(SUM(omlExtendedPriceBase),0).

    SELECT *

    FROM (

    SELECT DISTINCT cmoOrganizationID

    ,cmoName

    ,omlPartGroupID

    ,ISNULL(sum(omlExtendedPriceBase),0) AS total

    ,DATEPART(yyyy, ompOrderDate) AS Year_

    FROM SalesOrders

    LEFT OUTER JOIN SalesOrderLines ON omlSalesOrderID...

  • RE: Global temp table usage

    ScottPletcher (2/29/2016)


    I prefer to create those types of tables in the tempdb simply because that makes them less overall overhead on the SQL instance, because of the optimizations available only...

  • RE: Global temp table usage

    Thanks guys. I will create a permanent table for this. I was just hoping to see if there was a way to do it without permanent table because I really...

  • RE: Global temp table usage

    Grant Fritchey (2/29/2016)


    Global temporary tables are removed after the last process that is referencing them closes. Because you're closing the process, and no other process is referencing the table, it...

  • RE: how to load oracle database data to sql server with the help of SSIS

    Koen Verbeeck (5/14/2014)


    Make sure the Oracle client tools and the ODAC components are installed on the development machine.

    Good point, I forgot to mention it. 😀

  • RE: how to load oracle database data to sql server with the help of SSIS

    Use Oracle Provider for Connection Manager in SSIS

  • RE: How to use stored procedure to query data in anohter server?

    Use openrowset

    [Code]

    SELECT a.*

    FROM OPENROWSET('SQLNCLI', 'Server=Seattle1;Trusted_Connection=yes;',

    'SELECT GroupName, Name, DepartmentID

    FROM AdventureWorks2012.HumanResources.Department

    ORDER BY GroupName, Name') AS...

  • RE: SQL Stored Procedure help

    however I edited the columns to allow NULLS but still not working

    Can we see how you edited the column to allow NULL value? Because I don't see it in...

Viewing 13 posts - 1 through 13 (of 13 total)