Forum Replies Created

Viewing 15 posts - 1,081 through 1,095 (of 1,123 total)

  • RE: why not showing the nulls?

    Darth,

    Got a hint of solution......

    rewriting the query .....Let me know if this has helped you or  not....

    SELECT     ISNULL(COUNT(dbo.Customers_Trade.TradeCustomerID), 0) AS PCCount,

  • RE: Is hash tables is better than temporary user tables?

    Got you darth...................................

  • RE: why not showing the nulls?

    Darth,

     

    Let’s have a look closely at the WHERE Clause..

    I suppose you have an OR operator which is mis-braced or its an AND...

  • RE: Is hash tables is better than temporary user tables?

    Thanks a lot darth for your responses over hash/temp tables...

    I too feel that use of #tables will perform better than residing tables...

    One more thing darth..

    Is there...

  • RE: why not showing the nulls?

    Darth,

    I suppose this

    “WHERE (dbo.Customers_Trade.TradeCustomerID IN..............."

    is restricting from the rows returned..

    Modify the query so that it should look like..

    “AND (dbo.Customers_Trade.TradeCustomerID IN..............."

     

     

     

     

  • RE: Is hash tables is better than temporary user tables?

    Thanks colin...

     

    Since table variables will only available to the scope in which it was declared, thus rules out it's use in this SP.

    ----------------------------------------

    Joins on these...

  • RE: Help with a query

    Thanks for your efforts...Russell

     

    The results seem allright with your fn. for this subset of data..

     

    One more thing I’d like to notify..

     

    Since this soln....

  • RE: Help with a query

    Thanks for the catch...

     

    Let me explain what actually each table means..

    [dbo].[secUserMasterMappings]

     

    For User 1

     

    SELECT 1, 1, 1      

    --Which means User 1 has...

  • RE: Query Problem in sqlserver 2000

    Isa,

    The best solution for this, is to approach for a set based solution rather than using performance degrading cursors....

    Here i've got one function which does the trick for me....

     

     

    CREATE FUNCTION...

  • RE: Left join a maximum of 1 row.

    Paul,

    I hope this might help you.....

    CREATE TABLE Table1( T1C1 INT NOT NULL PRIMARY KEY CLUSTERED )

    GO

    CREATE TABLE Table2( T2C1 INT NOT NULL REFERENCES Table1 (T1C1) , T2C2 INT NOT NULL...

  • RE: BULK INSERT

    David,

    Change the statement to look like this...

    BULK INSERT esell.outlet_sku_xref

       FROM 'C:\Chicos\EnterpriseSelling\osx.ref'

    WITH

          (

             FIELDTERMINATOR ='|',

             ROWTERMINATOR ='\n',   ---------\n is a newline character

             FIRSTROW=2

          )

    if it still not working then replace \n...

  • RE: Select earliest date and qty total

    Greg,

    Here is what i got from your inputs.....

     

    CREATE TABLE YourTable( Number SMALLINT , [Date] SMALLDATETIME , Qty INT )

    GO

     

    INSERT INTO YourTable( Number , [Date] , Qty )

    SELECT 1 , '2006-01-31...

  • RE: Linking databases from Different servers in a query

     

    You can link servers by adding a linked server....

    For this, you first need to create a linked server which requires sysadmin or setupadmin privileges..

    EXEC sp_addlinkedserver N'YourServerName' , N'SQL Server'

    Then you can use...

  • RE: query problem

    cross posting.....

     

    select (case when charindex(' ',name) > 0 then substring(name,1,charindex(' ',name)) else name end) from your_table

     

     

  • RE: Bulk Insert on Remote Machine

    what error you are getting when you execute the BULK INSERT...

Viewing 15 posts - 1,081 through 1,095 (of 1,123 total)