Viewing 15 posts - 1 through 15 (of 109 total)
This looks like a job for INFORMATION_SCHEMA - specifically, information_schema.columns.
Let us consider the error message:
Conversion failed when converting the nvarchar value 'XXX' to data type int.
June 14, 2018 at 7:44 am
On the app side, adding a row to be processed is done by adding a row to the table-valued parameter. One common way to do that is to use a...
January 17, 2016 at 9:07 am
Yes, from within the proc there is the exact same 'problem'. However, it is from outside the proc you will notice dramatic performance improvements. Let's say you put 1000 records...
January 15, 2016 at 3:22 pm
in this case the application code has processed all changes in memory and needs to (at set times) write all changes to the database.
I'm surprised no one hasn't offered...
January 14, 2016 at 1:02 pm
Why not have a non-unique clustered key of MasterID on detail?
December 3, 2015 at 8:08 am
Here is the problem in a nutshell - salary opacity and salary equality.
Demigod of SQL = x$
Seat Filler = x$
Unfortunately, just as much money is allocated by management for the...
December 2, 2015 at 6:54 am
In the script, you're selecting into a variable. No matter how many rows there are, the variable only gets set once.
November 25, 2015 at 7:41 am
Well, in the spirit of answering the question asked, it'd be pretty easy to create a view that looks the same as the table with schemabinding, and put an INSTEAD...
November 24, 2015 at 6:45 am
Gotta stick my 2 cents in - how about this?
update #testTable set class4 = d.class4 from
#testTable a inner join
( select identifier,class4 from
(select identifier,max(asofDate) asOfDate from #testTable group by...
November 20, 2015 at 11:07 am
But if you're in a hurry and cannot wait for enlightenment, I suggest you find and download sp_BlitzIndex and run it in table mode on the table in question, preferably...
November 11, 2015 at 3:55 pm
We had this thingy at work to submit a claim. For a big claim, it might do 30,000-40,000 database calls. So they asks me, "Do you think you might be...
November 11, 2015 at 3:45 pm
first, try this - you'll need to run it in each database
select * from information_schema.columns where column_name in ('contact_id','contactid',etc.)
That'll give you the names of the tables. If they never change,...
November 11, 2015 at 5:03 am
How about
select f.* from fact f where date between @lastYear and @thisYear
cross apply ( select case when (ididivision=100 or iddivision=240) or date>=@thisYearBegin then 1 end) b
November 11, 2015 at 4:51 am
Oops, need a commit in there...
begin tran
delete XXX from
select top 50 * from
list a inner join
XXX b on b.key = a.key
commit
While...
November 9, 2015 at 7:01 am
You want to do it in batches, in a loop. Since 300 rows takes an hour, you definitely don't want your batch size that big. Try somewhere between 25 and...
November 9, 2015 at 6:57 am
Viewing 15 posts - 1 through 15 (of 109 total)