Forum Replies Created

Viewing 15 posts - 48,931 through 48,945 (of 49,552 total)

  • RE: Convert my syntax - Oracle SQL to MS SQL Server

    It looks a little wierd, but this is what you want. A not in for 2 fields.

    Select table1.* from table1 LEFT OUTER join table2 on table1.f1=table2.f1 and table1.f2=table2.f2

    WHERE Table2.f1 is...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Convert my syntax - Oracle SQL to MS SQL Server

    Assuming that f1 and f2 are fields in table1 and that the in works the same way in oracle as sql...

    Select * from table1 inner join table2 on table1.f1=table2.f1 and...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: case with join

    Probably the easiest is to do the if outside of the query

    IF (condition)

     SELECT <fields> from table1 inner join table2 ON...

    ELSE

     SELECT <fields> from table1 inner join table3 ON...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Unable to modify table. Timeout expired. The timeout period elapsed prior

    Middle of the table? Column order has no meaning in SQL, much like row order. If you wnat columns in a specific order, specify that in the select. The 'order' of...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Transaction log

    A log file is often a text file listing events that have occured and the like.

    The transaction log for a sQL database is a record of every transaction that has...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: 70-431 resources?

    I studied just out of books online and the pocket adin's guide. Was all I had.

    It's not a hard exam.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: sql server 2005 exams. are the study books any good?

    I studied for the TS exam using just books online and the pocket admin's guide. Got around 930, first attempt. I haven't seen any of the study guides, but they're...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: union versus where condition with "OR" operator

    I think you missed the point I was trying to make. I didn't mean union all, and I know the two queries aren't equal. I said as much

    When you write...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: data types default values

    Books Online is the title of the help files that come with SQL. They are also available on msdn, but I don't remember the url

    Look in the SQL Server group...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: union versus where condition with "OR" operator

    I heard a a recent workshop on performance tuning that the query optimiser in SQL 2000 has only one option for optimising an OR, but it has more than one...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Same Column

    Single quotes are string delimiters in SQL. Try

    SELECT adi AS Adlar from

    OR

    Select adi AS "Adlar" from

    Hope that helps

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Crosstab query help

    Can you maybe give us an example of your input data and desired output? Table structures too if possible.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Plus or Minus

    LOL. I know the feeling.

    Good luck.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Plus or Minus

    Oh, that's easy.

    SELECT SomeFields FROM SomeTable

    WHERE RowID BETWEEN @RowID-2 and @RowID +2

    It'll return up to 5 rows. If you don't want the equality condition,...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Plus or Minus

    Sorry, I didn't quite get what you want.

    RowID?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 48,931 through 48,945 (of 49,552 total)