Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 Other Topics
 TTITLE

Author  Topic 

Fvnh
Starting Member

6 Posts

Posted - 2004-04-29 : 07:43:02
I have a small sql script where I compare some date fields with e.g. '200402' this is february 2004.
What I want is that in the title of the report (with the command ttitle) I can automatically display e.g. 'report 02/2004'.
How do I do this?

ditch
Master Smack Fu Yak Hacker

1466 Posts

Posted - 2004-04-29 : 07:56:43
select 'report ' + right(str(Date, 6), 2) + '/' + left(str(date, 6), 4)


Duane.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2004-04-29 : 08:59:55
Sounds like a reporting tool...

What are you using?



Brett

8-)
Go to Top of Page

Fvnh
Starting Member

6 Posts

Posted - 2004-04-29 : 10:02:48
I am using sqlplus in an unix environment
I have got something like this :
...
define mnd='200404'
Ttitle left ' Report... ' &mnd
...
where
substr(lpad(onjvn,4,0),1,4)||substr(lpad(onmvn,2,0),1,2)=&maand

what I want is in the title : Report 04/2004
Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2004-04-29 : 10:52:30
Ummmm what part of "Microsoft SQL Server articles, news and forums " didn't make sense to you ?


Damian
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2004-04-29 : 10:53:04
quote:
Originally posted by Merkin

Ummmm what part of "Microsoft SQL Server articles, news and forums " didn't make sense to you ?


Damian


Hahaha.. Was waiting for that one...
Go to Top of Page
   

- Advertisement -