Viewing 15 posts - 1,561 through 1,575 (of 1,920 total)
Malaivaka, tel us if the following code helps you
SELECT CASE DURATION
WHEN '60' THEN '01:00'
...
May 12, 2010 at 6:12 am
Ankur, there are many methods of grouping data , based on the way we want our output to be!
I recommend you go through the following article:
May 12, 2010 at 5:07 am
Hey there, you can use on of the following
SELECT
EP.EMPLOYEE_ID,
EP.FIRST_NAME + ' ' + ISNULL(EP.MIDDLE_NAME, ' ') + ' ' + ISNULL(EP.LAST_NAME, ' ') AS FULL_NAME,
MB.BUSINESSUNIT_NAME,
CONVERT(VARCHAR(10), EP.DATE_OF_BIRTH, 101) AS DATE_OF_BIRTH,...
May 12, 2010 at 4:36 am
For another server, you can use
SELECT * FROM <Your_Server_Name>.<Your_Database_Name>.sys.identity_columns
provided you have the 2 servers linked using Linker Servers!
Or you can use OPENROWSET or OPENDATASOURCE to access data on another...
May 12, 2010 at 2:29 am
Hi friend!
Here is a code that might do what you wished!
;WITH DATE_CTE AS
(
SELECT DISTINCT DATEPART(MM,from_date) [MONTH] FROM #sample_data
)
SELECT SD.facility , DC.[MONTH], COUNT(*) ...
May 12, 2010 at 2:01 am
If you wish to see the column names, then use the sys.identity_columns catalog view
Sample SQL code for this:
SELECT * FROM sys.identity_columns
To read more about this, click here :- sys.identity_columns!
Hope this...
May 11, 2010 at 11:55 pm
You can use IDENT_INCR and IDENT_SEED functions to get the seed and increment of a table/view.
For more on them, click on them!
Hope this helps you!
Cheers!
May 11, 2010 at 11:49 pm
I dint understand your Expected result.. can u pls elaborate??
I see that
1. For the first month, you are finding the count of distinct facility - which gives '01'...
May 11, 2010 at 11:40 pm
Now that you have posted the sample data and table structure, half the job is prettily done 🙂 Now can you give us some visual representation of how your expected...
May 11, 2010 at 8:40 pm
hmmm.. yes.. lets wait for FilMar to march on! 😀
May 11, 2010 at 6:39 am
Gianluca Sartori (5/11/2010)
ColdCoffee (5/11/2010)
Wow, Gianluca.. cool code.. 😎Thanks, but we still don't know if this is what the OP is after.
Could turn out to be cool... garbage! 😛
:-P. Gian, i...
May 11, 2010 at 6:28 am
Again, without seeing your BREED table and K9 table how are we to assume what data is in, where you are going wrong and what we can do for you.
Please...
May 11, 2010 at 3:28 am
I din't understand your requirement clearly; But stil, as far as i understood, here is a piece of cdoe that might interest you.
Look at how i am posting the data...
May 11, 2010 at 3:21 am
Viewing 15 posts - 1,561 through 1,575 (of 1,920 total)