Thanks, I appreciate the replies. I placed an Index on the bit column being solely mentioned in the WHERE clause because I believed that in that way...
Thanks. The table has at moment only 400 rows. It is an auxiliary table that I have created as bridge when integrating 2 systems. I have just created...
Hello I have a table with 13 columns, where column13 is of type bit and has an index (actually, the sole index in this table). I have a simple SELECT...
Thanks for the reply. The trigger code is a simple update statement without a cursor. That is, whenever certain columns are updated, the trigger...
If I recall correctly, the error was something like "Invalid Cursor Operation". The trigger is defined as AFTER UPDATE. The idea of this trigger is...
Hello I have a table called MyTable with an UpdateTimeStamp column (of type datetime). There is an after update trigger that supposedly updates that...
Yes, the same datatype as the UpdateTimeStamp column.
Of course, is a different Index created specifically to retrieve faster the rows where UpdateTimeStamp>@LastTransfer And I have just noticed that if...
Thanks a lot for your reply. As suggested, I used the following sentenced and it worked nicely:ALTER TABLE MyTable ADD CONSTRAINT...
Thanks for your reply. The mentioned Index convers only the UpdateTimeStamp column in ascending order.
Hello I have a table called MyTable with a field named UpdateTimeStamp (a datetime). I would like to know if it is possible that whenever there is a...
Hello I have a table with a field called UpdateTimeStamp, with a datetime datatype and there is an Index for that field. In the following simple...
Hello Suppose that there is a table MyTable(col1 tinyint, col2 tinyint, col3 int, col4 bigint). What would be the most efficient way of updating col4...
Hello I have a CurrentStock Table with the structure (#StoreCode, #SKU, Stock). I would like to retrieve all SKUs that have at least 5 units in...
A single scalar value (char(7)), which would be the Business Week. I would use it like: Select GetBiWk(LT.MyDateField) as BiWk from LargeTable as...
Hello Suppose that I have the table BusinessWeek(BiWk char(7), InitialDate date, EndDate date). I want to create a function that given a date, it...
Hello I have a CSV where every single value is surrounded by quotes, even the numbers. I would like to know how to handle this, because the BULK...
Hello I hae read that when using the IN operator, the query engine does not use indexes. So my question is, shouldn't the query engine be smart...
Hello I use the MERGE statement for updating a Local table using a Remote table as the source, and this is made every 30 minutes. The Local table is...
Hello How can I get a resultset with a single column where every row is a Date from a given month from start day to the end? All of this using a...
Separate names with a comma.