Viewing 15 posts - 48,931 through 48,945 (of 49,552 total)
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
November 29, 2006 at 1:53 am
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
November 29, 2006 at 12:27 am
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
November 28, 2006 at 1:13 am
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
November 27, 2006 at 11:22 pm
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
November 24, 2006 at 1:36 am
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
November 24, 2006 at 1:16 am
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
November 24, 2006 at 12:42 am
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
November 23, 2006 at 5:13 am
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
November 23, 2006 at 5:12 am
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
November 9, 2006 at 8:19 am
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
November 9, 2006 at 4:13 am
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
November 9, 2006 at 2:34 am
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
November 8, 2006 at 7:46 am
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
November 8, 2006 at 7:41 am
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
November 8, 2006 at 7:34 am
Viewing 15 posts - 48,931 through 48,945 (of 49,552 total)