Forum Replies Created

Viewing 15 posts - 22,936 through 22,950 (of 26,486 total)

  • RE: Stumbling on a SQL query - Help!!

    You also realize that your select statement in your function is returning a cartesian product as well, right? You have no join criteria between the two tables dbo.grapes and...

  • RE: Stumbling on a SQL query - Help!!

    Your function selects data from a table. How do I help you when I don't know anything about that underlying table or have any sample data to put into...

  • RE: Stumbling on a SQL query - Help!!

    You have only provided part of the information we really need to help you with your problem. Please read the first article below in my signature block regarding asking...

  • RE: Re-Started Server

    Unfortunately, we have been giving you SQL Server 2005 answers because you posted your question in a SQL Server 2005 forum.

    I don't think you will be able to figure out...

  • RE: update one table from another using a join

    Garadin (1/20/2009)


    Try running this query.

    SELECT I.item_no,I.std_cost,I.loc, C.HBG_std_cost

    FROM HBG.dbo.IMINVLOC_SQL I

    LEFT JOIN FT.dbo.Std_Cost_Compare C ON I.item_no = C.item_no AND I.loc = C.HBG_loc

    A bit easier to read than yours. You're getting...

  • RE: Deleting 150+ million rcds - Tips ?

    OR, create a table, mytable_new. Copy over just the records you wish to KEEP. Rename the current table (mytable) to mytable_old, then rename mytable_new to mytable.

    Saves you moving...

  • RE: create view problem

    Jeff Moden (1/20/2009)


    As a sidebar, there isn't really an advantage to having such an indexed view. The underlying indexes on the table are the only advantage. Indexed views...

  • RE: Hidden RBAR: Triangular Joins

    Joe Celko (1/20/2009)


    Bad example. Ever read about what New York City was like before automobiles? How many TONS of house shit were carted off the streets every day...

  • RE: how to get maxium value of a table when there are no records

    Garadin (1/20/2009)


    Lynn Pettis (1/20/2009)


    Garadin (1/20/2009)


    SELECT IDENT_CURRENT('yourtablename')+1

    I thought about this, but the OP's post didn't indicate that the PK (int column) was defined as an identity column. With out that...

  • RE: how to get maxium value of a table when there are no records

    Garadin (1/20/2009)


    SELECT IDENT_CURRENT('yourtablename')+1

    I thought about this, but the OP's post didn't indicate that the PK (int column) was defined as an identity column. With out that info, how would...

  • RE: IsIdentity

    I have to correct myself. there is another way, using the following function: COLUMNPROPERTY ( id , column , property ).

    Check it out in BOL (Books Online).

  • RE: IsIdentity

    The INFORMATION_SCHEMA views won't give you that information. You need to look at sys.columns to determine if it is an identity column.

  • RE: Re-Started Server

    Someone with admin rights, that much I can tell you. Not sure of the default trace would capture who, but I'd start there. There is a function in...

  • RE: T-Sql result set unioning and pumping into a Table

    May I suggest that you read the first article I have linked in my signature block below? If you follow the guidelines presented in the article when asking for...

  • RE: Conversion failed when converting the nvarchar value 'colname' to data type int

    Yes, you are welcome also.

    I have written enough dynamic sql that I've been bitten by that error many times. I have learned to look for it.

Viewing 15 posts - 22,936 through 22,950 (of 26,486 total)