Forum Replies Created

Viewing 15 posts - 14,116 through 14,130 (of 15,381 total)

  • RE: Error with converting to bigint in case statement

    How about:

    SELECT ISNUMERIC(DataValue), DataValue

    FROM (Select datavalue = 'l999999999999999') a

    If you need to get actual int data and varchar data depending on the contents of a varchar field you...

  • RE: Help with SQL Query

    You are going to have to join this table back to itself. This is pretty basic. give it a try and post back what you tried. Yes, I could write...

  • RE: Has anybody constructed dynamic SQL by storing SQL in fields in tables?

    wolfkillj (8/30/2011)


    Francis McFaul (8/29/2011)


    I think that most of their Developers are application developers who know some Transact-SQL. I haven't heard of any dedicated SQL Server database developers, only...

  • RE: Has the culture of this web site changed?

    I will admit to using lmgtfy a few times. This is typically in response to questions like "What is the largest number an integer can hold?". Something so pathetic as...

  • RE: error '3146' when importing file using access as front end into SQL Server

    Well it seem pretty obvious that one of your queries is taking too long and timing out. You have several procs calls in this. You should probably start by isolating...

  • RE: CONCATENATE not working

    How about some ddl and a few sample rows with expected output? It should be pretty simple but it is a LOT easier on us if we have something to...

  • RE: PIVOT result column format

    So don't convert to varchar at all and let your front end handle the formatting.

    SELECT *

    FROM (SELECT ID, Amt, Dt

    FROM @Budget) AS B

    PIVOT ( SUM(Amt)

    FOR Dt IN ( [08/30/2011],

    [08/31/2011],

    [09/01/2011],

    [09/02/2011],

    [09/03/2011])) as...

  • RE: using a table variable.

    For that matter you could probably just skip the temp table like this:

    update CurrentCategoryList set CurrentCategoryList.TotalUnitSoldNational = SUM(ProductSales.UnitsSold)

    FROM CurrentCategoryList INNER JOIN

    CategoryProductRel ON CurrentCategoryList.CategoryID = CategoryProductRel.CategoryID INNER JOIN

    ProductSales ON CategoryProductRel.ProductID...

  • RE: PIVOT result column format

    Can you format it in the front end? That is the preferred location to handle formatting.

  • RE: using a table variable.

    Correct me if I am wrong but wouldn't this code make your data pretty useless if you run it more than once? You are updating a column in a table...

  • RE: sql server management studio

    That is a service pack link. Of course that will not contain SSMS. Google SQL Server Download and click the first link. It will take you to the MS sql...

  • RE: CONCATENATE not working

    Krasavita (8/30/2011)


    Thank you, the code is working but not 100%

    Here is my data 794546,794548,794549

    Results I get:4 794546,794548,7945

    So given that input what are you looking for as output? You first example...

  • RE: CONCATENATE not working

    MID is not a sql function either. You will have to use substring instead.

  • RE: Has anybody constructed dynamic SQL by storing SQL in fields in tables?

    TheSQLGuru (8/30/2011)


    1) dynamic sql is an INCREDIBLY POWERFUL AND EFFICIENT solution to a number of classes of problems. I strive mightily to always use the right tool for the...

  • RE: Using table valued parameters with SPs pros and cons

    If you noticed in my example my type is a table with a single integer column. That allows the flexibility to be used anytime I need a list of integers....

Viewing 15 posts - 14,116 through 14,130 (of 15,381 total)