Forum Replies Created

Viewing 15 posts - 31 through 45 (of 51 total)

  • RE: Am I missing something

    Use SQL Server Business Intelligence Development Studio(BIDS) for data loading/transfer tasks (ETL). That's where you will find data flow task tab. Look into Books Online, it has good "getting started"...

  • RE: Insert rows into result of a query

    How about this?

    with TableName_cte

    as(

    select ID, Col1, Col2

    from TableName

    UNION

    select ID, 'X'+cast(ID as varchar), 'Y'+cast(ID as varchar)

    from TableName

    )

    select Col1, Col2

    from TableName_cte

    order by ID

    -Supriya

  • RE: Join terminology

    I second what bc has posted, its a cross join.

    Basically, in your original query if you are getting 10 rows from the inner join and tblHosts has 10 rows...

  • RE: Problems with MAX

    SELECT *

    FROM dbo.VALUATION A

    INNER JOIN (

    SELECT LRSN, MAX(EFF_YEAR) AS EFF_YEAR

    FROM ...

  • RE: Case: Null

    huh????

    Guess I have a lot to learn !!! 🙂

    Anyway the only way I can think of for checking blanks is by converting the field to character, check for blanks using...

  • RE: Case: Null

    I meant just run this single query: SELECT DISTINCT(stick_quantity) FROM dbo.SAP_InvoiceLine_M.

    What is the output? Also, what is the actual datatype for stick_quantity?

    Actually, I created a small test case with two...

  • RE: Case: Null

    Can you do SELECT DISTINCT(stick_quantity) FROM dbo.SAP_InvoiceLine_M ?Do you have rows with blank stick_quantity?

  • RE: how to write the query with sub sub query

    LOL :laugh:

    Really funny Lutz. I had not seen that site before. Guess Rajesh asked for it..:-)

  • RE: Case: Null

    R,

    Have you tried using ISNULL? Since stick_quantity is decimal SQL Server doesn't store "blanks" but zeros and NULL is stored as NULL. So your sum column will look something like...

  • RE: Cannot perform an aggregate function on an expression containing an aggregate or a subquery

    Seth is right, the query is way off and will be really slow.

    But I was wondering why can't you put the difference between 25th sept and max invoice date...

  • RE: Cannot perform an aggregate function on an expression containing an aggregate or a subquery

    What is the error you are getting? Or does the query runs successfully but doesn't give you the expected results?

  • RE: Divide by subsets of same table

    You just missed assigning an alias name.

    Try this:

    select x / y

    from

    (select count(*) x from My_Table where Status = 'O' and Days_Old < '90') as A,

    (select count(*) y from My_Table where...

  • RE: Question on SP

    From BOL: "Parameter values can be supplied if a stored procedure is written to accept them. The supplied value must be a constant or a variable. You cannot specify a...

  • RE: What's wrong with this expression????

    Could it be because yesterday's day part of the date was one digit and today its two digit? 9th vs 10th?

    Just a thought.

    -Sups

  • RE: sql insert

    Similar problem:

    http://www.sqlservercentral.com/Forums/Topic775170-149-1.aspx

    The solution posted there will work for you too with some minor changes.

    HTH,

    Sups

Viewing 15 posts - 31 through 45 (of 51 total)