Showing posts with label formatting. Show all posts
Showing posts with label formatting. Show all posts

Friday, March 30, 2012

How to make this DATE format

im having some trouble getting this specifik date format:

dd-MM-yyyy hh:mm

where the time is in 24 hour format...

Date and time formatting seems a lot harder in sql server 2005 than in access

This:

SELECT convert( varchar(16), getdate(), 120 )

Returns:

-

2007-05-07 13:04

Refer to Books Online, Topic: 'Cast and Convert' for the 'style' (120, above) values.

Friday, March 9, 2012

How to link new primary key column instead of old primary key column on existing

The earlier developer, developed reports very complex formatting reports, may be he was spend lot of time on formatting. Each report is fetching data from 7 to 8 tables. All are working fine. He did very good job. He didnt used Stored Procedures in it. For Complex reports SP are giving better performance as of my knowledge. Recently I joined in the organization they assigned me reports part.

Now the problem is

Recently the database was changed accordingly their convenience. He was developed reports using old database. In the old database one table they added one new column and assigned primary key, old primary key column as set to non-key column. Now I need to link the new primary column instead of old primary key column. I dont know how to change this one, I tried verify database command. But no luck. I check report export. I am confusing on that. Can you please help me to solve this one?



Thanks in advance

NadaI believe you have been answered on another forum.