Showing posts with label display. Show all posts
Showing posts with label display. Show all posts

Friday, March 30, 2012

If I could explain the problem..........

In SQL database we need to concatenate 2 fields to display in one and turn them into an email address in the following format

joe.bloggs@.company.co.uk

They are the following: forename & surname

The expression will require a . to be added between the forename & surname and @.company.co.uk at the end.

Anyone help...... ?This should work:

SELECT forename || '.' || surname || '@.company.co.uk' AS [name]
FROM [table]
[WHERE ...];

Monday, March 26, 2012

IF Command

Hi All,

I am having a few problems writing a sp for the sales team, I have to display a target figure from a customer dates

start_date target_year1 target_year2 target_year3 target_year4 target_year5 01/01/2004 100 150 120 150 170 01/01/2003 90 20 30 30 30

the start date for each customer is different so the target year 1 ,2 ect will be different time periods.

i need to display the start_date and the target year which relates to todays date:

so no 1 would be year 3 and no2 will be year 4.

any help would be much needed!!

rich

Hi,

To do this you can use case statements.

try this:

select startdate, case datediff(yy, startdate, getdate())

when 0 then targetyear1

when 1 then targetyear 2

.

.

etc

from yourtable

Regards

|||thanks for your help, worked a treat!|||

JMattias

sorry the example was not very good the month my change,

so I would change the yy for month...the next problem is in the selecting between months

select startdate, case datediff(mm, startdate, getdate())

when <12 then targetyear1

when >= 12 and < 24 then targetyear 2

ect..

But this does not work ......

|||

use the datediff statement in every when

Like this

select startdate, case when datediff...... then when datediff..... then etc

Regards

|||thanks ...now that did do the job!!|||Good, I'm glad to help!

IE Script error (print rss report)

Hi

I have a report that works fine on most of the clients but a few of them can only display the report. When they try to print the report they get a IE script error.

How can I fix this problem?

Best regards thn

Problem fixed....

The report faild to print because the client had the wrong regonal settings...

Friday, March 23, 2012

IDW15: DCR: Make precedence constraint editor bigger

Hello,
If I have a fairly large expression then the box to display it isn't big
enough.

Please can you let us resize the precedence constraint editor?

DCR?
Thanks.

-JamieYes, please open a DCR Jamie. Thanks for the feedback.
K|||OK. Track ID 375512625

Sunday, February 19, 2012

IdentifyTranscation log name

Hi friends
I am trying to make a query to display dinamically the name of the
database's log.
I am trying with the sysfiles table (select * from sysfiles or sysfiles1),
but i cant get an unique column to identify what is the name of the log
can anyone help me?
Thanks in advance
Try,
select
fileid,
[name],
[filename]
from
sysfiles
where
fileproperty([name], 'IsLogFile') = 1
go
AMB
"Tinchos" wrote:

> Hi friends
> I am trying to make a query to display dinamically the name of the
> database's log.
> I am trying with the sysfiles table (select * from sysfiles or sysfiles1),
> but i cant get an unique column to identify what is the name of the log
> can anyone help me?
> Thanks in advance
>

IdentifyTranscation log name

Hi friends
I am trying to make a query to display dinamically the name of the
database's log.
I am trying with the sysfiles table (select * from sysfiles or sysfiles1),
but i cant get an unique column to identify what is the name of the log
can anyone help me?
Thanks in advanceTry,
select
fileid,
[name],
[filename]
from
sysfiles
where
fileproperty([name], 'IsLogFile') = 1
go
AMB
"Tinchos" wrote:

> Hi friends
> I am trying to make a query to display dinamically the name of the
> database's log.
> I am trying with the sysfiles table (select * from sysfiles or sysfiles1),
> but i cant get an unique column to identify what is the name of the log
> can anyone help me?
> Thanks in advance
>

IdentifyTranscation log name

Hi friends
I am trying to make a query to display dinamically the name of the
database's log.
I am trying with the sysfiles table (select * from sysfiles or sysfiles1),
but i cant get an unique column to identify what is the name of the log
can anyone help me?
Thanks in advanceTry,
select
fileid,
[name],
[filename]
from
sysfiles
where
fileproperty([name], 'IsLogFile') = 1
go
AMB
"Tinchos" wrote:
> Hi friends
> I am trying to make a query to display dinamically the name of the
> database's log.
> I am trying with the sysfiles table (select * from sysfiles or sysfiles1),
> but i cant get an unique column to identify what is the name of the log
> can anyone help me?
> Thanks in advance
>