Viewing 15 posts - 31 through 45 (of 123 total)
Remove the imbedded SQL, put everything in a stored procedure, pass in all your values, wrap it in a transaction and call it a day. That would be much...
December 5, 2013 at 5:42 am
Why not update your sproc with the logic needed? Is there a reason it can't go there? For that matter, why not in the app? Does it...
December 5, 2013 at 5:38 am
You can download an eval version and play with it for a limited time. Here's the link to the enterprise edition for 180 days:
http://www.microsoft.com/en-us/download/details.aspx?id=1279
Once you download it, you should...
December 5, 2013 at 5:34 am
Here's how you can get it back out as AM/PM:
select CONVERT(varchar(15),CAST(timin AS TIME),100) as convtimein, * from show_bus
Mark
December 5, 2013 at 5:29 am
The code works fine for me using SQL Server 2008 R2 although casting it beforehand is still a good idea.
Mark
December 5, 2013 at 5:25 am
If you're not sure of the damage, you may want to consider restoring the database from a back up to ensure everything is back the way it should be.
Mark
November 27, 2013 at 6:04 am
What does "BAU" stand for? I've seen different meanings to this over the years but in my world it means "business as usual", or support. Anything relating to...
November 27, 2013 at 6:01 am
I'm a huge fan of SQL Server 2008 Bible by Paul Neilson. Otherwise there's plenty of info on the internet and nothing replaces self-study and practice.
Mark
November 27, 2013 at 5:59 am
Try converting paid_date to varchar before using substring. Something like this:
select SUBSTRING(convert(varchar(25), paid_date),1,4) + '-' + SUBSTRING(convert(varchar(25), paid_date),5,2) + '-' + SUBSTRING(convert(varchar(25), paid_date),7,2) + ' ' + SUBSTRING(convert(varchar(25), paid_date),11,9)
Mark
November 26, 2013 at 6:03 am
Hard to say w/o your schema and sample data but would this work?
select (T1.HB-T2.HB) as CalcValue
from SampleResults T1
inner join SampleResults T2
on T1.SubjectNumber = T2.SubjectNumber
where T1.SampleType = 1
and T2.SampleType = 3
Mark
November 26, 2013 at 5:51 am
What Ed said above.
Check your values in your .net app. If present, add their corresponding params to the sproc call and that'll work.
Mark
November 13, 2013 at 6:10 am
I don't think the case statement will work that way. Maybe something more like this?
update <table>
set <field> =
case when <field> = 0 then 1
else 2
end
Before you do...
November 13, 2013 at 6:05 am
Shaun,
Here's a prior post with a few links about this topic:
http://www.sqlservercentral.com/Forums/Topic1313095-391-1.aspx
Mark
November 12, 2013 at 1:14 pm
Post the query you've been working on so we can see it.
Mark
November 12, 2013 at 1:05 pm
Did the user explain what happens when they try to sort the data? Are you able to see if yourself?
I run SSRS 2k8 R2 and my users have Excel...
October 28, 2013 at 5:17 am
Viewing 15 posts - 31 through 45 (of 123 total)