Viewing 15 posts - 9,196 through 9,210 (of 15,381 total)
What you are referring to is called a cross tab or pivot. See the articles in my signature about those topics.
March 4, 2013 at 9:01 am
atikpatil2005 (3/4/2013)
March 4, 2013 at 7:58 am
vinodkel (3/1/2013)
agreed, constraint can be used instead of trigger.
but the requirement is something different, if i use constraint it will check the defined uniqueness within the...
March 4, 2013 at 7:42 am
Lowell, you would have to add a where clause to only return those rows that match. Notice below this will return a cartesian product.
select *
from @test1 t
OUTER apply dbo.delimitedsplit8k('d;c;b;a;e',';')...
March 1, 2013 at 3:25 pm
To do this you will first need to parse your delimited string. The easiest way to parse a delimited string like is to use DelimitedSplit8K. You can find out about...
March 1, 2013 at 3:14 pm
ScottPletcher (3/1/2013)
Sean Lange (3/1/2013)
ScottPletcher (3/1/2013)
Or simply:
SELECT CONVERT(char(2), myDate, 1)
I don't think will quite work Scott. The OP said they are using month(MyDate) which will return an int. Casting a single...
March 1, 2013 at 2:51 pm
RZ52 (3/1/2013)
Thanks for help.
I know how much headache I will get to find a stable solution but your suggestion is a really helpful starting point.
I will work on...
March 1, 2013 at 2:05 pm
ScottPletcher (3/1/2013)
Or simply:
SELECT CONVERT(char(2), myDate, 1)
I don't think will quite work Scott. The OP said they are using month(MyDate) which will return an int. Casting a single digit int to...
March 1, 2013 at 1:57 pm
What a nightmare!!! Nothing like creating queries against a moving target. I know it isn't your design but the nightmare you are dealing with is because of the lack of...
March 1, 2013 at 1:50 pm
RZ52 (3/1/2013)
I have three tables and the structures are :
Table1 : [PATIENT_ID],[Name],[Age],[City],[TEST1],[TEST2]...... (the AB? are test names dynamically added to table)
Table2 : [PATIENT_ID],[Name],[Age],[DR1],[DR2],...... (the DR? are drug names dynamically added...
March 1, 2013 at 1:06 pm
Jeff Moden (3/1/2013)
Sean Lange (3/1/2013)
Irozenberg 1347 (3/1/2013)
Elementary sub-query or EXISTS clause wouldRadically improve performance.
If you like fancy coding you could pass XML as
parameter and use XQUERY.
You should...
March 1, 2013 at 8:17 am
Irozenberg 1347 (3/1/2013)
Elementary sub-query or EXISTS clause wouldRadically improve performance.
If you like fancy coding you could pass XML as
parameter and use XQUERY.
You should read the article about...
March 1, 2013 at 7:18 am
sql1411 (2/28/2013)
Thanks for your response. This is what I needed. However, is it possible to embed this logic to create a scalar valued function so that I can use...
February 28, 2013 at 12:27 pm
spencer_robinson (2/28/2013)
So thanks for your help, though that Tally table is still making me sratch my head - Time to look up some tutorials. 🙂
Try this one!!! http://www.sqlservercentral.com/articles/T-SQL/62867/%5B/url%5D
Glad that my...
February 28, 2013 at 10:13 am
kk2286 (2/28/2013)
I have inserted few records and chnged the date time column.
Time_Stamp Row_Count
2013-02-28 09:44:08.760 22
2013-02-28 10:44:20.017...
February 28, 2013 at 10:07 am
Viewing 15 posts - 9,196 through 9,210 (of 15,381 total)