Home > Archive > MS SQL Server New Users > March 2005 > Re: PROBELM WITH SQL SELECT QUERY STATEMENT









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: PROBELM WITH SQL SELECT QUERY STATEMENT
Radharaj

2005-03-30, 9:42 am

thanks ryan. i compiled the query using crystal designer and used it in
crystal reports. i split the query with union syntax for clarity purposes

"Ryan Schellenberg" wrote:

> sql references aliases just after the table name in the from part of the
> select stmt...
> so, when you write
> FROM
> {oj (((("noxtest"."dbo"."National Oxygen TEST$Sales Invoice Header"
> National_Oxygen_TEST
_Sales_Invoice_Heade
r INNER JOIN
> bla bla bla...
> the name just after the last quote will be the start of the alias...
>
> ie... select * form tablename aliasname where field1=2
>
> in that example, the space after tablename means"the next string that I
> encounter, I am going to treat as an alias for tablename...
>
> the other issue is that you are doing complicated sql in crystal... it
> might be easier using query designer or even Enterprise manager in the
> sql tools, create a view of the db, then report off that one table...
>
> Hope that helps!
> -ryan schellenberg
> ryan@theschellenberg
s.com
>
> then, in the rest of the statement, whenever you have
>

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com