Here\'s my scenario: I have two tables A, B which (for the sake of this question are identical): Table X (PK)
In a table, I 开发者_如何学Chave a text-field. I need to be able to select only the first 200 chars of the field - but LEFT does not work with TEXT-fields.
After years of using TSQL, I still cannot figure out when to use SET, WITH or ENABLE. When you read TSQL statement like,
I have 3 tables Site, Price and PriceMonth.Site has many Prices (joined on siteId). PriceMonth holds a date which is a looked up by Price (joined on PriceMonth).
There is a view in my DB that someone defined with a * from one table.I just added a new column to that table and I want the view to reflect the new column.Besides re-executing the view creation sc开发
I have a complex query that I need to use in a subsequent query (actually update statement).I have tried both using a CTE and a temp table.The performance using the CTE is horrible vs the temp table a
How do you look up a list of lang开发者_运维技巧uage IDs available within SQL Server? I am specifically looking if there are any views within sys schema.
I want to know whether one SP is referenced anywhere. Currently I am checking using SP_DEPENDS. Is there an开发者_JAVA技巧y other way to check this...?If your dependencies are broken, the only way I
Using SQL Server 2000 Table1 DateHoliday 23-02-20090 24-02-20091 25-02-2009 开发者_开发知识库0 Table2
I have the a query which is union of two queries, the resulting query is returning duplicate records, I don\'t want duplicate records. I tried using DISTINCT but still getting the same result, can any