Forum Replies Created

Viewing 15 posts - 16 through 30 (of 258 total)

  • RE: Help with Dynamic SQL

    I tried the solution you provided and this is the string it created.

    SELECT * FROM #DLFiltered WHERE Active = 1 AND CurrentLevelXID = 10 AND 1=1 AND DownlineLevel...

  • RE: Update with alias not working

    I have tried both version and they work kinda of.

    Update b

    SET b.SponsorXID = a.XID

    FROM [consultant].[Consultant] AS a

    ...

  • RE: Update with alias not working

    Not sure I follow?

  • RE: Case statment in Derived Column

    I added it as a lookup and it works fine. But I would still like to know how I can right it as a nested expression if you could help.

  • RE: ntext issue in Select

    I did that and it worked. Now I make that query the source for my SSIS package and I recieve the following error:

    "ResponseData" cannot convert between unicode and non-unicode string...

  • RE: ntext issue in Select

    I found that if I CAST it as a varchar then it returns data but then the next question how will that effect the data. This query is the basis...

  • RE: sqlcmd question

    That worked. Thanks a lot.

  • RE: sqlcmd question

    OK, I tried that example and recieved the following error:

    sqlcmd -S hqtst102D\DBA -i ListTables.SQL database="Adventureworks"

    Sqlcmd: 'database=': Invalid filename.

    Then I tried it like this:

    sqlcmd -S hqtst102D\DBA -i ListTables.SQL -v database="Adventureworks"

    and recieved...

  • RE: If statement and Filtering

    The only way I found that it might work is like this:

    DECLARE @rc INT

    SELECT @rc = Count(*) from Temp1

    IF @rc =1 AND(Select PaymentTypeXID from...

  • RE: Determinig Fill Factor

    Great info. The article really help.

  • RE: Parent Child Records in Recordset

    I think I am working myself in to this:

    Took the previous #Temp1 and filtered outthe top level kit:

    Select * From #Temp1 t1

    WHERE ParentLineItemID = 0

    OrderGroupNumber OrderNumber LineItemId ...

  • RE: Collation issue in Case statement

    I figured it out. It was

    ,'PaymentType' = Case

    WHEN a.PaymentTypeXID IN (0,7,9,16) THEN A.[CCName] COLLATE SQL_Latin1_General_CP1_CI_AS

    WHEN a.PaymentTypeXID IN (2) THEN 'Certficate'

    END

    Thanks

  • RE: Collation issue in Case statement

    I found the differences;

    FROMdbo.uvw_OrderGroupPayment AS A With (NoLock) -- this is a view

    INNER JOIN dbo.OrderForm AS B With (NoLock) ON

    A.ORderGroupNumber = B.OrderGroupNumber

    LEFT OUTER JOIN SharedDimension.dbo.DimPaymentType AS C With (NoLock)...

  • RE: GROUP BY in Sub Query

    I ended up doing a order by and reversing the direction.

  • RE: Macro stops working from other workstation

    I found the issue. It was the connection string was not set correctly in the pass thru query. It was set to different ODBC name on the other workstations.

Viewing 15 posts - 16 through 30 (of 258 total)