Forum Replies Created

Viewing 15 posts - 121 through 135 (of 433 total)

  • RE: Extracting Rows from Delimited Strings

    My first thought is, are there any rows in the raw_data table where the raw_payload column doesn't contain a comma, or are NULL?

    SELECT raw_payload

    FROM raw_data

    WHERE raw_payload IS NULL

    OR CHARINDEX(',', raw_payload,...



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: Merging Rows with comma

    Thanks for that.

    The only other ways that I can currently think of is to use a WHILE loop to UPDATE a resultset table to build the strings or the other...



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: Merging Rows with comma

    Just out of interest while I try and figure another way:

    How many rows does this table have?

    Hom many rows are there maximum (if there is a maximum) does each employee...



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: Merging Rows with comma

    You could use UDFs instead of a cursor to perform the concatenation of each column (fnConcatEmpAccNo and fnConcatEmpSalary) which executes pretty much the same code as the cursor on each...



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: OSQL adds a blank space to start of each line of output

    Hi,

    I'm not sure why OSQL does that, but as far as I know, it always has (?!?).

    Could you not use BCP to get the same resultset to a file without...



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: Email Stored Procedure Results in Body of Email

    The xp_smtp_sendmail procedure has an input parameter called @messagefile where you can specify a filename to be the body text of the email. If you BCP the results of your...



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: Increment field value by 1

    Hi,

    Without having SQL Server 2005 available at the moment, you can try something like this:

    -- Test Environment

    DECLARE @tableA TABLE (

    col1 VARCHAR(2)

    )

    DECLARE @tableB TABLE (

    ident INT,

    ...



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: t-sql

    Gail,

    That'll teach me to RTFS!!

    Well spotted! :w00t:

    Ade.



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: t-sql

    In your SELECT COUNT(emp_ID) you need to declare which table that you are using to return the emp_ID from: Emp or Inserted.

    😉



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: Using xp_fileexist, i want to check File is a Directory value

    Hi Babu,

    I'm a bit confused as to why you don't want to use a temporary table for this. It's the best option. With xp_fileexist you can assign an output parameter...



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: How to use temp tables as DTS destination tables in transform data tasks

    You can use Global Temporary tables as a transformation destination. There is an advisory article on msdn about the considerations of using temporary tables in DTS:

    http://msdn2.microsoft.com/en-us/library/aa215269(SQL.80).aspx

    HTH



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: Merging Rows with comma

    Hi,

    For a quick solution you could use a cursor ( yes, I know, I said Cursor :crazy: ) like the one below:

    -- Test Environment

    DECLARE @table TABLE (

    empNo INT,...



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: replace cell null for 0

    Hi,

    I think you should be able to use an IIF statement in you SELECT. Something like this:

    IIF(B.Qtd IS NULL, 0, ,B.Qtd) AS Qtd

    HTH,



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: Linking record with most recent date on second table

    Hi,

    Just out of sheer morbid curiousity, will date2 always be greater than date1?

    Thanks.



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: Extracting Rows from Delimited Strings

    The code I provided is an example of how it works (using a small amount of data. You need to change the table that the select works on and also...



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

Viewing 15 posts - 121 through 135 (of 433 total)