Forum Replies Created

Viewing 15 posts - 1,111 through 1,125 (of 2,894 total)

  • RE: Return resultset or use OUTPUT parameters in SP

    PiMané (10/2/2012)


    Hi,

    If I have a stored procedure that only checks if a customer exists (simple case) it's better to use an OUTPUT parameter or return a data row?

    When returning single...

  • RE: UNIQUEIDENTIFIER vs BIGINT

    Wait for JC to state that "We don't use IDENTITY, Cobol-like monster from 50's" :hehe:

    The only place where I would agree on legitimate use of GUID's for PK, would be...

  • RE: Looping through a data set and combining values

    ...

    I really appreciate your help. My reasoning was that do I have to repeat all the "Select Union" statements for all the rows that i have?

    I could be missing something!...

  • RE: How to eval @Variable when assigned from SELECT field?

    CELKO (10/2/2012)

    ...

    Why would anyone create a local variable (like we did in 1950's assembly languages) to hold the results of an expression. We just use the expression itself in declarative...

  • RE: UNIQUEIDENTIFIER vs BIGINT

    [

    ...

    Is this statement true? If so is it better to use Guid or BIGINT?

    It depends, but usually BIGINT is better.

    Another question, related to keys... If a table uses Id as...

  • RE: Looping through a data set and combining values

    oscarooko (10/2/2012)


    Eugene Elutin (10/2/2012)


    Use XML FOR PATH method (it most likely will give you the best performance for T-SQL implementation):

    declare @Table1 table (EmailAddress varchar(20), Msg varchar(20))

    insert @Table1

    ...

  • RE: SQL Query to select one row and fill missing columns from another matching row.

    Question to OP: Can the name change? - If yes, you cannot partition by name.

    Numbers for MartialStatus and EmploymentStatus can change from higher to lower, therefore you cannot really use...

  • RE: Specify schema on table name

    You will not get different query execution plan per user if you don't specify schema.

    Unless your system is designed in a such way (it's very rare case actually) that one...

  • RE: Looping through a data set and combining values

    Use XML FOR PATH method (it most likely will give you the best performance for T-SQL implementation):

    declare @Table1 table (EmailAddress varchar(20), Msg varchar(20))

    insert @Table1

    ...

  • RE: Regular expression in T-sql

    Jeff Moden (10/1/2012)


    Eugene Elutin (10/1/2012)


    A couple of us just went through all of this on another thread a couple of months ago and the LIKE expressions blew the doors off...

  • RE: INVALID OBJECT NAME

    So looks like that dbname.dbo.Y_name is not accessible from connection you are trying to execute your procedures. Check the name spelling as well.

  • RE: Join SQL Query error

    ...

    I would like to display all data from deal_2 (table 1) and price_2 (table_2) in date order. I assumed the left join clause would be easy to implement with...

  • RE: Join SQL Query error

    ...

    OUTPUT:

    [ deals-2 table + price_2 table] --> filed names d.name, d.cusip, d.isin, p.orig_price, p.price, p.cmbs_spread, p.cmbs_price, p.size, p.price_type, d.deal_type, p.date

    Thank you so much for your help and time.

    The question...

  • RE: Join SQL Query error

    From what you posted I can tell you that you don't need to check for NULLs in columns you INNER JOIN on. So the following query will produce exactly...

  • RE: create variable for IN statement

    GilaMonster (10/1/2012)


    I wouldn't use that function. The loops will make it very slow.

    Try this one: http://www.sqlservercentral.com/articles/Tally+Table/72993/

    I hate loops as well, but it will be ok if used for splitting a...

Viewing 15 posts - 1,111 through 1,125 (of 2,894 total)