Viewing 15 posts - 5,326 through 5,340 (of 8,731 total)
Yes, it can be done using MAX() and probably a ROW_NUMBER() to prevent aggregation.
If you post the sample data, I can show you how to do it.
January 19, 2015 at 11:20 am
TheSQLGuru (1/16/2015)
Where ltrim(rtrim(col1)) = ''I see this code ALL THE TIME at clients. Can someone tell me why both would be needed?? 😎
It's not needed.
It's probably a misconception coming...
January 16, 2015 at 1:22 pm
Yes and no.
I declare the variable like that but it could be any date to get historic reports. I believe that I tested it with a simple GETDATE().
January 15, 2015 at 6:13 pm
I got confused with your explanation. Could you post DDL and sample data (as insert statements) along with expected results based on that sample data?
That will give you better and...
January 15, 2015 at 12:57 pm
Brandie Tarvin (1/15/2015)
Sean Lange (1/15/2015)
EXISTS(select 1
is way faster than just select *. I know Gail has an article on...
January 15, 2015 at 12:36 pm
Have you checked the Synonyms?
January 14, 2015 at 2:48 pm
You need to split the data in your Value column. If possible, normalize the table so you don't have to work like that.
To split the data, you could use the...
January 14, 2015 at 1:35 pm
Brandie Tarvin (1/14/2015)
Koen Verbeeck (1/14/2015)
Luis Cazares (1/14/2015)
Congratulations Koen! When I grow up I want to be like you. :hehe:Action figures will soon be available! 😎
With or without superhero capes?
Edna Mode
January 14, 2015 at 1:02 pm
Use the variabale in the WHERE clause.
select *
from @t
where IsSalaryApproved = @IsSalaryApproved
EDIT: Sorry, I need more coffee to read carefully.
January 14, 2015 at 10:09 am
Congratulations Koen! When I grow up I want to be like you. :hehe:
January 14, 2015 at 9:49 am
I would suggest you to follow Sean's advice. You have a simple front end available called Reporting Services (SSRS).
It's a powerful tool that you could use to prevent this kind...
January 14, 2015 at 9:07 am
Even if it's readable, I wouldn't suggest using Stephanie's code. It reads the table 7 times which can become a nightmare on large tables.
January 13, 2015 at 2:19 pm
Hi, here's one possibility to get that report. There are other possibilities but this just seemed easy for me.
SELECT CustomerID,
DATEDIFF( MM,
...
January 13, 2015 at 1:35 pm
So the problem was when calling the stored procedure.
If you corrected your app code, you shouldn't have changed your stored procedure.
January 13, 2015 at 10:20 am
Without more information, I have 2 possible guesses:
Your column transaction_date_time is a string that you're comparing to a datetime and that's causing the error. To correct this error, you...
January 13, 2015 at 9:54 am
Viewing 15 posts - 5,326 through 5,340 (of 8,731 total)