Viewing 15 posts - 13,891 through 13,905 (of 15,381 total)
basshole8117 (9/29/2011)
September 29, 2011 at 10:20 am
waxingsatirical (9/29/2011)
Nope, no errors, just never finishes executing.Although, you are right I could safely add WITH (NOLOCK) on all of these joins.
I would be very reluctant to just toss a...
September 29, 2011 at 10:14 am
ghanshyam.kundu (9/29/2011)
you should have deptid in emp table as department is...
September 29, 2011 at 7:53 am
Welcome to SSC. All the challenges you are running into is exactly why you want have strongly typed data. As you are discovering things like date ranges are just about...
September 29, 2011 at 7:48 am
According to the documentation I linked it is how MS designed it to work. You are assigning a value to a variable that is larger than 15 so the data...
September 29, 2011 at 7:15 am
GSquared (9/28/2011)
select *from dbo.MyTable
order by case Users when 'ALL' then 1 else 2 end, Users ;
That avoids even things like entries that begin with low-ASCII-value punctuation coming before "ALL".
Nice...
September 28, 2011 at 1:52 pm
You just need to get a little tricky in your sort.
Something like this should work.
create table #Users
(
val varchar(20)
)
insert #Users
(val)
values
('All'),
('Admins'),
('Developers'),
('Programmer'),
('Webmasters')
select * from #Users order by case val when 'All' then '_'...
September 28, 2011 at 1:02 pm
That is what a left join does...http://msdn.microsoft.com/en-us/library/ms191472.aspx
select [Columns]
from MyTable
left join Table2 on ??
left join Table 3 on ??
September 28, 2011 at 12:05 pm
This is from BOL page about ANSI_WARNINGS. http://msdn.microsoft.com/en-us/library/ms190368.aspx
ANSI_WARNINGS is not honored when passing parameters in a stored procedure, user-defined function, or when declaring and setting variables in a batch statement....
September 28, 2011 at 10:14 am
drew.allen (9/28/2011)
Sean Lange (9/28/2011)
I will reformat this in c style blocking so you can see what was happening with the structure the way you had it.
Since you didn't include your...
September 28, 2011 at 10:05 am
I will reformat this in c style blocking so you can see what was happening with the structure the way you had it.
If @SQLVersion >= 9
{
...
September 28, 2011 at 8:51 am
Before anybody can possibly make any suggestions on your data structures we have to know what they are. Can you post your ddl for the tables in question?
September 28, 2011 at 8:14 am
The problem is due to your if structure.
you have this
If @SQLVersion >= 9
if exists (select 1 from master.sys.sql_logins where name = 'pos_reporting')
...
September 28, 2011 at 7:27 am
All I did was added some ddl and data in a consumable format and ran the query exactly as the OP posted it and it returned the exact results they...
September 28, 2011 at 7:08 am
GSquared (9/27/2011)
Sean Lange (9/27/2011)
GSquared (9/27/2011)
The Active Threads link is only showing 5 other discussions.
(Probably my fault for going political...
September 27, 2011 at 2:39 pm
Viewing 15 posts - 13,891 through 13,905 (of 15,381 total)