Monday, March 19, 2012

Dummy Table?

Hi!

I'm new in SQL SERVER 2000 and i'm looking for some kind of predefined dummy table. You know something like the "dual"-Table in Oracle. I want to use it for queries like that:

Select 1, 'auto' from dummy_table

Does anyone know, if something like that in SQL SERVER 2000 exists?

NickOriginally posted by nick792
Hi!

I'm new in SQL SERVER 2000 and i'm looking for some kind of predefined dummy table. You know something like the "dual"-Table in Oracle. I want to use it for queries like that:

Select 1, 'auto' from dummy_table

Does anyone know, if something like that in SQL SERVER 2000 exists?

Nick

There is no dummy table in sql server.
you can just use
select 1,'auto'
it will select 1 and the literal 'auto'
what is 'auto'?
regards,
harshal.|||U don't have to mention the "from dummytable" part.

Just
"select '123' " would be fine in SQL Server, as opposite to Oracle
where u need to have it as
"select '123' from dual"|||Thanks!
It works!

"auto" is german for "car"!

Nick|||I was wondering...Oracle, DB2, ect all have this 1 Row system table so you can do like sql server does, but without the FROM clause...

The question is...does ANSI consider this a "malformed" query syntax without the FROM?

Just curious.|||seems to me i've heard someone say that the FROM clause is not required in some recent sql standard, however, when i test a sample query in the various sql versions of the Mimer SQL Validator (http://developer.mimer.se/validator/index.htm), they all come back with an error

No comments:

Post a Comment