Forum Replies Created

Viewing 15 posts - 2,776 through 2,790 (of 2,894 total)

  • RE: Mentor

    create table #studentgrade (studid int, test int, score int)

    insert #studentgrade

    select 1 , 1, 10

    union select 2,1,10

    union select 2,2,20

    union select 3,1,30

    union select 3,2,40

    union...

  • RE: Select in CASE statement

    It is possible but not very good way to do (you need take your select top 1... into brackets):

    select

    OraclePartNo =

    CASE WHEN Oracle_Part_ID IS NOT NULL THEN Oracle_Part_ID

    ELSE...

  • RE: Mentor

    Scott, I can't see how solving such challenges help to learn SQL in deep. However, they might be good for a starting point plus they do provide some entertainment to...

  • RE: Insertion using linked server.

    Check security configuration of DTC.

    If you are looking for alternative way to move data between two servers, try SSIS.

    Just in case, could you provide the sample of data you...

  • RE: Insertion using linked server.

    What you mean by "It was working before"?

    Do you insert exactly the same data all the time? Exactly the same values?

    This probelm might happen due to the data itself....

  • RE: Insert Data to XML Comuln in distributed query

    1. Check DTC service is running on both servers.

    2. Check security configuration of service. It should allow Network DTC

    Access and Inbound/Outbound. It can be done in Administrative Tools/Component Services/Computers/My Computer....

  • RE: Insert Data to XML Comuln in distributed query

    Post whole and clean query you run and errors you get.

  • RE: Selecting the earliest month wrapping January to December

    Paul White NZ (6/14/2010)


    ... SSIS is the natural choice for ETL, rather than temporary tables and T-SQL....

    I would say that "SSIS is the Microsoft choice for ETL" 😀

    Depending on...

  • RE: Insertion using linked server.

    It could be caused by number of different problems:

    1. Check you can connect top the link server by running simple select query.

    2. Check the security permissions.

    3. Datatype casting. Quite...

  • RE: UNPIVOT on mutiple columns

    I guess it is simple (taken from msdn):

    UNPIVOT < unpivot_clause >

    Specifies that the input table is narrowed from multiple columns in column_list into a single column called pivot_column.

    I would...

  • RE: Need help on T-SQL

    If you have 12 tables to insert into, you will need to run 12 separate insert queries.

    If you want to write minimum of code, you can use loop and dynamic...

  • RE: Selecting the earliest month wrapping January to December

    Paul White NZ (6/14/2010)


    Eugene Elutin (6/14/2010)


    What is a problem with non-SARGable query?

    ...

    I'm not certain that the example of a LIKE clause with a leading-wildcard was a great choice to demonstrate...

  • RE: ss2k5 rounding v Excel

    In your case the result is nothing to do with the ROUND function.

    Check what value you have in your @vatAmt variable after setting it as you did. Then change its...

  • RE: Selecting the earliest month wrapping January to December

    bteraberry (6/11/2010)


    scott.pletcher (6/11/2010)


    >> but when you post junior level code (non-SARG-able queries anyone?) <<

    Yes, I took the short-cut, because as *I* pointed out the code will result in full scan...

  • RE: trailing spaces not honored in a select

    Read about ANSI_PADDING. You can insert and store trailing spaces if you really wish to do so. Note, it will not affect the SQL string comparison rules (eg. WHERE and...

Viewing 15 posts - 2,776 through 2,790 (of 2,894 total)