Thanks Dieter!!
Yes it is MS SQL server (sorry for not mentioning earlier). Your second solution works just fine.
I took the very first solution and tried to make it work on MS SQL server as follows: (can you suggest if this is a good way of doing also)
SELECT
one.rowid,
one.dt AS...
Here is my situation:
CREATE TABLE Test
(Rowid int,
Dt Datetime)
INSERT INTO Test VALUES(1, '01/01/2004')
INSERT INTO Test VALUES(2, '01/15/2004')
INSERT INTO Test VALUES(3, '01/31/2004')
and I want data like:
Rowid start_dt end_dt
1 01/01/2004 01/14/2004
2 01/15/2004...
I have a Crystal Report that has few groups.
How can I export that report to an Excel file (Book) such that each Group gets exported as a separate tab (worksheet) with Group name as the tab's name.
This can be done very easily while you create a report. Just go to create a new formula in report design view then find a formula called: ToWords, it is localed under String Functions
How to do I make this happen that when my user (who is presently visiting my site) creates a shortcut to my site, he/she gets a diffrent ICON than the regular "E" looking icon for this shortcut.
For example when you create a shortcut to MSN site, it creates an ICON with a colored...
You can try to import data first into a staging table and then you can write a SP/SQL statement that makes use of "replace" function to clean up the data that contains "," with "." and then finally put that data back to the actual table.
We shrink our database twice a day. I have scheduled that as a job and it works just fine. In your case you might want to do it more often or identify what causes to grow TempDB to so big and when does that SP/Job occurs and then you can schedule of TempDB shrinking around that.
I have accomplished this by using a Case statement
for example:
SELECT * FROM Customers
Order By
CASE WHEN Region is Null Then 1 Else 0 End,
Region
You can modify CASE statement to suit your needs
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.