Forum Replies Created

Viewing 15 posts - 6,661 through 6,675 (of 10,144 total)

  • RE: Multiple select/table join query

    Post up what you have so far, should be straightforward 😉

  • RE: Mathematical Theory (controversy!)

    rmechaber (9/8/2011)


    ChrisM@Work (9/8/2011)


    The best explanation I've remembered over the years is this: if two members can breed and produce offspring which can themselves breed between themselves and their parent members,...

  • RE: declare table from a string syntax help

    Some older languages used to perform "macro expansion" which swapped the variable for the value at runtime to construct a runnable statement. SQL Server doesn't. Instead, you have to construct...

  • RE: Transform two columns data into one column

    SELECT ACCOUNT, CURRENCY, AMOUNT, 'Source' AS DATASOURCE

    FROM MyTable

    UNION ALL

    SELECT ACCOUNT, LOCAL_CURRENCY, LOCAL_AMOUNT, 'Translated' AS DATASOURCE

    FROM MyTable

  • RE: Mathematical Theory (controversy!)

    GSquared (9/8/2011)


    rmechaber (9/8/2011)


    ChrisM@Work (9/7/2011)


    [<snip>

    Aha - they did. Your friend's statement was absolutely false! 😉

    Chris, thanks for posting that: this is a fascinating article and real food for thought. I'm...

  • RE: Mathematical Theory (controversy!)

    rmechaber (9/8/2011)


    ChrisM@Work (9/7/2011)


    [<snip>

    Aha - they did. Your friend's statement was absolutely false! 😉

    Chris, thanks for posting that: this is a fascinating article and real food for thought. I'm not...

  • RE: Tranpose Column values into Column name

    karthikeyan-444867 (9/8/2011)


    CoolingPipe(Scott) (9/8/2011)


    declare @sql varchar(max)

    set @sql = 'select Sec_Id'

    select @sql = @sql + ',

    max(case perf_dt when cast(''' + convert(varchar(10),perf_dt,101)

    + ''' as datetime) then perf_return else null end) [' +...

  • RE: Multiple select/table join query

    Why work on only one cardcode at a time? Have a look at what this returns, I'm sure it can be tailored to your requirements.

    SELECT

    ocrd.CardCode,

    ocrd.CardName,

    ocrd.Phone1,

    ocrd.Cellular,

    oinv.*,...

  • RE: Mathematical Theory (controversy!)

    GSquared (9/8/2011)


    ChrisM@Work (9/7/2011)


    GSquared (6/3/2011)


    ...As an illustration of this, I once had someone assert to me that "evolution is impossible, nobody has ever seen one species change into another". This...

  • RE: Tranpose Column values into Column name

    Karthik

    Track down and read Jeff Moden's excellent article "Cross tabs and pivots".

  • RE: SSIS Import Help for three Fixed width files

    1. Use the SQL Server import wizard to import all three tables into staging tables. Don't be too fussy about data types.

    2. To populate table1, write an INSERT INTO...SELECT ......

  • RE: Mathematical Theory (controversy!)

    GSquared (6/3/2011)


    ...As an illustration of this, I once had someone assert to me that "evolution is impossible, nobody has ever seen one species change into another". This is untrue,...

  • RE: Creating join in a fuction

    Also, it's much easier to write and test sql in SSMS then wrap it up in a function. Try this:

    DECLARE @id int,

    @date datetime

    SET @id = ?

    SET @date = ?

    SELECT

    a.ID,...

  • RE: Creating join in a fuction

    nidhi.ds.rapid (9/7/2011)


    I am using column names instead of * still getting the error. Can you please provide me the sql.

    Can you post the SQL which is causing the error you...

  • RE: how to use dates in case statement..........

    SELECT

    pr.practice_id AS 'Practice Id',

    pr.practice_name AS 'Practice Name',

    v.vendor_name,

    dr.doctor_id AS 'Doctor ID',

    CONCAT(dr.first_name,' ',dr.middle_name,' ',dr.last_name) AS 'Doctor Name',

    --CASE WHEN vfs.final_uploaded_datetime BETWEEN '2011-07-01 00:00:00' AND '2011-08-01 00:00:00' THEN ROUND(SUM(DOC.DOCUMENT_LINECOUNT),2) END AS 'july',

    --CASE WHEN...

Viewing 15 posts - 6,661 through 6,675 (of 10,144 total)