Viewing 15 posts - 8,641 through 8,655 (of 13,460 total)
you've got to use a counter or a where statement which preventrs teh same row from being processed.
for example, if your table has an identity column:
dim @start int
dim @end int
SELECT...
October 1, 2010 at 5:12 am
Shekhar this is a very common scenario...table changes are made, and procedures that are dependant on that table's schema may fail;
I like to use this cursor *gasp* below, which...
September 30, 2010 at 5:48 am
sc-w (9/30/2010)
Thank you for your help but the answer that i needed was this so i help it helps someone else.
alter table yourtable
add autonumber int identity(1,1)
go
yes that works, but...
September 30, 2010 at 4:30 am
not sure by what you mean as a "virtual field"
are you talking about a column in a view, which does not exist in the underlying table?
September 30, 2010 at 4:21 am
yes you can, the syntax is the same as when you select something based on other data, just make sure the column name is assigned;
ColumnName = [calculation,case statement, formula,etc]
or
...
September 30, 2010 at 4:13 am
another option is to use the SSMS GUI and design the table;
if you add the new column, and make sure you select that it has the identity property, the GUI...
September 30, 2010 at 4:04 am
Ritesh glad I could help, and thank you very much for the positive feedback. It's nice to know when something works well for someone.
September 30, 2010 at 3:46 am
i think you want to avoid giving the db_datareader role in database 1.
the two roles are additive..meaning db_datareader can read EVERY view and table...so adding them to a "restricted" role...
September 29, 2010 at 9:36 pm
i hope i can explain this well...
a correlated sub query is where a column from the OUTER query is referenced in the sub query to limit the results:
SELECT
...
September 29, 2010 at 9:28 pm
here's one example using a CTE Tally Table:
with Tally as (
SELECT TOP 11000 --only need ten digits for this job, though
ROW_NUMBER() OVER...
September 29, 2010 at 9:18 pm
well, there's a few things going all wrong here;
the first one is such a large report ....three million rows.you've lost sight of what an HTML report is supposed to do.
it's...
September 29, 2010 at 8:48 pm
it's actually pretty easy;
INSERT INTO Letter_C (list of columns)
SELECT (same list of columns,same order) FROM #Temp
EXCEPT
SELECT same list of columns,same order FROM Letter_C
this will find all the...
September 29, 2010 at 7:21 pm
well all you have to do is get the csv file into a table or linked server so you can use a set based operation against it.
i do not see...
September 29, 2010 at 5:03 pm
could it be that one machine is connecting to , say, the PRODUCTION database and the other connecting to a older copy of that same DB, but hosted on a...
September 29, 2010 at 1:00 pm
you've definitely got some data that cannot be converted to int, ie empty string or 'N/a' that someone data entered;
I'd suggest changing the join and the WHERE statement as...
September 29, 2010 at 12:48 pm
Viewing 15 posts - 8,641 through 8,655 (of 13,460 total)