Forum Replies Created

Viewing 15 posts - 406 through 420 (of 5,504 total)

  • RE: import string with array into table

    Here's what I came up with using the DelimitedSplit function refernced in my signature:

    declare @val varchar(8000)

    set @val= '[{mark,peters,mr}{jane,fonda,mrs}{john,doo,mr}{james,bond,mr}]';

    WITH cte AS

    -- separate the input values into "rows" and eliminate the...

  • RE: How do you map to rows inside different branches of same XML document using OPENXML rowset function?

    Here's a slightly different approach without the OPENXML approach (I, personally, find OPENXML more complicted and it seems to be less efficient in most cases):

    SELECT

    TempXML1.Node1.value('(server/text())[1]', 'varchar(50)') AS [server],

    TempXML1.Node1.value('(name/text())[1]',...

  • RE: Importing data from Active Directory into SQL Server Table

    It might be an issue between Unicode an Non-Unicode data format.

    Did you try to change the data type in your target table to NVARCHAR(50)?

    (Just a pot shot though...)

  • RE: Extractinng node details from XML data

    You might want to have a look at this link

    It'll show you an alternative how to shred the data. The code should be reduced to the information required to avoid...

  • RE: t-sql to create simple bar graph image file to be inserted into email

    A bar graph is a graphical way to display data.

    A RDBMS (like SQL Server) is designed to efficiently store, manipulate and return data.

    For graphical presentation you could use Reporting Services,...

  • RE: Need help in writing a query

    Do you have sample data showing the "intermediate values" "step by step"?

    I'm having a hard time to understand differences between adjecent values (adjecent in time), especially, since there are duplicate...

  • RE: DBMAIL QUERY RESULT IN HTML FILE

    [SET SARCASM ON]

    Wow, that's really a lot information to work with...

    The easies way: change the .dat extension to .html. Not that it would do any good, but at least it...

  • RE: Need help in writing a query

    The reason for getting just one row ist the CROSS APPLY: there are only data of UnitId2005 in the UnitsData table, eliminating the remaining rows.

    I broke my approach down into...

  • RE: single quotes

    There are several options:

    (a) formatting the single quotes to be used in dynamic SQL using the REPLACE function:

    DECLARE @param VARCHAR(50)

    DECLARE @param2 NVARCHAR(50)

    SET @param ='Will o''smith,Roa''s'

    SELECT @param

    SELECT @param2 = 'SELECT '''...

  • RE: Need help in writing a query

    Sounds like homework...

    Would you please show us what you've tried so far and where you get stuck?

    To refer to the most recent row, you could either use an outer join...

  • RE: Inner Join with SubQuery

    If you want to restart with 1 for each new combination of VndNbr, InvNbr then you should change it to

    PARTITION BY VndNbr, InvNbr ORDER BY batNbr DESC

  • RE: Variable Kills Performance

    Talking about optimizing the query itself:

    You might want to replace the "nested view approach" with the "early filter concept":

    Instead of creating a view querying tables that might not even be...

  • RE: Cursor Logic causing Blocking ?

    my guess would be the WHILE loop *cough* being the reason for locking.

    Depending on the value of @recipientcount it might take a while to perform all those single row inserts.

    Step...

  • RE: Help with complex Stored Procedure

    I'm leaving the design discussion out for a moment...

    You might want to use a LEFT OUTER JOIN together with a CASE statement. (column based result set, meaning results for lkup_Record_Regions_Serv...

  • RE: Inner Join with SubQuery

    I tried your code (with replaced table name) and it still return the same data as before (2 rows).

Viewing 15 posts - 406 through 420 (of 5,504 total)