to strong SQL-Command for me

to strong SQL-Command for me

Post by wilhelm kaufman » Sat, 03 Jun 2000 04:00:00



Hello all
I am beginner in SQL

With this command:
SQL>
Spool file1.txt
select pa, datum,tag,mo,jahr, x_1, x_2, x_3,...x_60

Quote:>from tabelle1 where datum = (select max(datum)
>from tabelle1)

and param in ('p1','p3','p9','p7');
spool off
I get the following file:
PA DATUM TAG MO JAHR X_1 X_2 X_3 ...X_60
P1 959695200 30 5 2000 5  8  14 .....0
P3 959695200 30 5 2000 8  8  34 .... 0
P9 959695200 30 5 2000 6  6  16 .... 0
P7 959695200 30 5 2000 1  4  16 .....0
Problem/necessary adaption for the SQL-Skript:
In reality the columns go from X_1 to X_60
This are miuntes entrys.
I'm only interesting for the column X_$ which contain
the last entry (= last number which differ from zero)
In this case the search column is X_3
Can you help me ? Please !
Yank you William

--
_____________________________________________________________
NewsGroups Suchen, lesen, schreiben mit http://netnews.web.de

 
 
 

to strong SQL-Command for me

Post by Tibor Karasz » Tue, 06 Jun 2000 04:00:00


Judging by the spool thing, you're not using SQL Server (Oracle?). I suggest trying a
group for the RDBMS being used...

--
Tibor Karaszi, SQL Server MVP
Please reply to the newsgroup only, not by email.


> Hello all
> I am beginner in SQL

> With this command:
> SQL>
> Spool file1.txt
> select pa, datum,tag,mo,jahr, x_1, x_2, x_3,...x_60
> >from tabelle1 where datum = (select max(datum)
> >from tabelle1)
> and param in ('p1','p3','p9','p7');
> spool off
> I get the following file:
> PA DATUM TAG MO JAHR X_1 X_2 X_3 ...X_60
> P1 959695200 30 5 2000 5  8  14 .....0
> P3 959695200 30 5 2000 8  8  34 .... 0
> P9 959695200 30 5 2000 6  6  16 .... 0
> P7 959695200 30 5 2000 1  4  16 .....0
> Problem/necessary adaption for the SQL-Skript:
> In reality the columns go from X_1 to X_60
> This are miuntes entrys.
> I'm only interesting for the column X_$ which contain
> the last entry (= last number which differ from zero)
> In this case the search column is X_3
> Can you help me ? Please !
> Yank you William

> --
> _____________________________________________________________
> NewsGroups Suchen, lesen, schreiben mit http://netnews.web.de


 
 
 

1. To strong sql-command for a beginner

To strong SQL-command for a SQL-beginner

I am beginner in SQL

With this command:
SQL>
Spool file1.txt
select pa, datum,tag,mo,jahr, x_1, x_2, x_3,...x_60
from tabelle1 where datum = (select max(datum)
from tabelle1)
and param in ('p1','p3','p9','p7');
spool off

I get the following file:
PA   DATUM         TAG   MO  JAHR    X_1 X_2 X_3 ...X_60
P1    959695200     30     5     2000    5    8    14   ?ffffc3?ffffa2?ffffe2?ffff82?ffffac?ffffc2?ffffa60
P3    959695200     30     5     2000    8    8    34 ?ffffc3?ffffa2?ffffe2?ffff82?ffffac?ffffc2?ffffa6. 0
P9    959695200     30     5     2000    6    6    16 ?ffffc3?ffffa2?ffffe2?ffff82?ffffac?ffffc2?ffffa6. 0
P7   959695200     30     5     2000    1    4    16 ?ffffc3?ffffa2?ffffe2?ffff82?ffffac?ffffc2?ffffa6...0

Problem/necessary adaption for the SQL-Skript:
In reality the columns go from X_1 to X_60
This are miuntes entrys.

I?ffffc3?ffffa2?ffffe2?ffff82?ffffac?ffffe2?ffff84?ffffa2m only interesting for the column X_$ which contain
the last entry (= last number  which differ from zero)
In this case the search column is X_3

Can you help me ? Please !

Yank you William

* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is Beautiful

2. Unicode Replace() function

3. sql command to run sql commands in file

4. Optimize Problem (?)

5. Strong SQL/sybase person needed..!

6. 'LIKE' operator in SQL as in QBE

7. LI - Strong SQL/Sybase Server on Unix or NT client (Cpp/C a plus)

8. JAVA and Sybase data

9. US-VA-STRONG ORACLE AND/OR PL/SQL ANALYST/DEVELOPER WITH ACTIVE SECRET CLEARANCE

10. - Oracle DBA w/ strong PL/SQL - Portland, Oregon dr008466

11. LI - Strong SQL/Sybase Server on Unix or NT client (Cpp/C a plus)