Forum Replies Created

Viewing 15 posts - 466 through 480 (of 1,957 total)

  • RE: CASE condition not affecting CAST output

    It's a bit strange to see people boldly stating that you cannot do this, when you can, you just need to cast them as SQL_VARIANT.

    I'm not saying you should do...

  • RE: SSMS 2012 Restarts Itself

    For further analysis, you might try starting SSMS with the /log switch:

    "C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe" /log

    This will create an activity log in your user folders:

    C:\Users\?????\AppData\Roaming\Microsoft\AppEnv\10.0\ActivityLog.xml

    It should also create an...

  • RE: Create Dynamic columns in Temp Table

    I'm not sure exactly what you need help with, but it sounds like you want to be able to construct a table (temporary or variable) to insert the results of...

  • RE: DB concurrency how to....

    Here is one way, which may or may not work for you.

    Have a table of Invoice Numbers.

    create table InvoiceNumbers(InvoiceNumber int);

    create unique clustered index ci_InvoiceNumbers on InvoiceNumbers (InvoiceNumber DESC) WITH(FILLFACTOR=100);

    insert invoicenumbers(invoicenumber)

    select...

  • RE: Error converting data type varchar to datetime.

    Can you post the .NET code where you prepare the SQL Command and set the parameters?

    Also the header for the stored procedure - everything from CREATE PROC to AS will...

  • RE: how to stop Select...for xml explicit from escaping inner (CDATA) xml

    There doesn't seem to be any non-static data in the Wrapper XML, so can't you just use strings to build that with the Payload XML inside?

  • RE: UNION and INSERT

    sqldriver (5/30/2014)


    mister.magoo (5/30/2014)


    It is probably because the presence of the UNION is removing duplicates, not just between the three queries but within the results of each query as well.

    :angry:

    :unsure:...

  • RE: UNION and INSERT

    It is probably because the presence of the UNION is removing duplicates, not just between the three queries but within the results of each query as well.

  • RE: TableVariable Update

    Aside from having a working solution, do you understand why your query was wrong?

    You cannot reference a table variable in the same way you do a table, you MUST use...

  • RE: Just curious, what are your SQL pet peeves ?

    Databases that have been restored to a new database name, but the logical file names have not been changed.

    INSERTS without columns specified.

    Pages and pages of commented out code (I would...

  • RE: .NET, the SqlConnection object, and multi-threading

    Generally speaking, in .NET I would recommend always closing a connection as soon as your are finished with it.

    This frees the connection for the connection pool and it can be...

  • RE: Fields not appearing in Report Data tab

    Does this SP have SET NOCOUNT ON; at the start? If not, try adding it.

    does the SP use temporary tables? If yes, try adding a dummy 0 row select to...

  • RE: Sum a Column by Client and Group by date 4 weeks apart!

    Without sample data and DDL , no-one is going to be able to provide a working solution.

    So, I suggest you use a calendar table, with every date you are interested...

  • RE: XML SQL Query

    This should do it...

    SELECT

    pref3.value('(../TEAMID/text())[1]','varchar(50)') as TEAM_ID,

    pref3.value('(PLAYERID/text())[1]', 'varchar(50)') as PLAYER_ID,

    pref3.value('(NAME/text())[1]', 'varchar(50)') as PLAYERNAME

    FROM

    XMLwithOpenXML CROSS APPLY

    XMLData.nodes('/GAME/TEAM/PLAYER') AS TEST3(pref3)

  • RE: Maximum of 500 lines in the Messages Pane

    I have absolutely seen tens of thousands of messages before, so no, it is not a limitation of SSMS.

    What does happen though is that SSMS will stop outputting every message...

Viewing 15 posts - 466 through 480 (of 1,957 total)