Viewing 15 posts - 136 through 150 (of 272 total)
Do you really mean 50 rows and 1.5Mb? That seems so small as to make the cost of adding an index trivial.
In what way do you mean "better" I expect...
January 18, 2011 at 6:27 am
While you can create an SSIS package programmatically (in probably almost any language) most people would CREATE the package using the supplied design tools. To develop a program that creates...
January 15, 2011 at 11:58 pm
Since an update statement by definition can only update a single table I am not clear on what you are asking.
I suppose the update could be an "update from" and...
December 29, 2010 at 11:23 am
From that error message it looks like you are using Oracle and this is a SQL Server group. Either way changing to an unambiguous date format such as yyyymmdd will...
December 29, 2010 at 11:20 am
If you want to use the newer features (such as pivot) you have no choice but to change the compatibility level to 90 (or later).
The old outer join syntax is...
December 22, 2010 at 4:35 am
I think the problem lies with the stringing together of the username (it is not needed at all) and the schema name and table names.
The schema name and table names...
December 16, 2010 at 11:42 pm
The only way I have managed to achieve this with BCP is:
Create a view
The view should contain
SELECT 'col1name' as col1name, 'col2name' as col2name etc
UNION ALL -- all is...
December 16, 2010 at 1:44 pm
Does the error actiually say the word Tablename in the message or are you using that as a placeholder?
It sounds like the table you are naming does not exist. Can...
December 15, 2010 at 3:03 am
Sql Server integration services will let you (among many other things) read from Excel and insert into a table. The Import Wizard will even generate most of what is needed...
December 10, 2010 at 12:35 am
I have done similar through what (at first sight) looks horrendous code.
Basically you can use an update statement that updates the required "master rows" and each column is derived from...
December 6, 2010 at 6:31 am
Sounds like a correlated subquery as one of the columns would fit the bill:
select
GroupHeaderID, GroupName, CreatedDate, (select count(*) from table_b where table_b.GroupHeaderID = table_a.GroupHeaderID ) as number_of_bs
from table_a...
November 25, 2010 at 1:10 am
You could schedule a job inSQL Server agent to delete rows from eithe table base don any condition you choose. But I see no column in your description that would...
November 22, 2010 at 12:39 am
Hmm, That's a shame.
Two options I can think of:
a) Upgrade - you know it makes sense!
or
b) create a view that contains the patientid and status - but with a where...
November 19, 2010 at 9:53 am
A filtered index would seem ideal for this:
create unique index ix_one_scheduled on t (PatientID, Status)
where status = 0
And only one row per patient with a status of zero will be...
November 18, 2010 at 11:57 pm
Firstly I would avoid cursors unless you are absolutely certain you need one. (And even then there is probably a better way).
I think all you need is something like:
update t
set...
November 18, 2010 at 11:51 pm
Viewing 15 posts - 136 through 150 (of 272 total)