Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. ericjs

    cross join of 2 unions

    JarlH, Every RDBMS I've ever used allows literals in SELECT statements and makes the FROM clause optional. For example "SELECT 1" is very commonly used as a "validation query" to test that the connection is still valid. Are you saying that this is actually not provided for by the ANSI spec...
  2. ericjs

    cross join of 2 unions

    Aluminum, I need the table aliases in PostgreSQL too, that's what the AS in my query is for. PostgreSQL also works with the syntax you posted, without the AS. Apparently SQL Server doesn't recognize the AS. Just out of curiousity, anyone know which is or isn't ANSI standard? Eric
  3. ericjs

    cross join of 2 unions

    JarlH: I've tried various syntax variations at least very much like that, but what you posted gave me the most helpful error I've seen yet (in PostgreSQL 8.4): "subquery in FROM must have an alias". Following that clue, I find the following actually works: select * from (select 'a', 'b' union...
  4. ericjs

    cross join of 2 unions

    I want to do a query where I end up cross joining the results of 2 unions. While union operates on two select statements, cross join operates within a select statement, and I'm at a loss for how to reconcile the syntax. To avoid going into the complexities of my queries which are irrelevant to...

Part and Inventory Search

Back
Top