I have noticed quite a few mentions of the word "materializing" when people are talking about using temporary tables in SQL Server. Can someone expand on what it is that means? I am just trying to get a better understanding of what that means in terms of using temp tables?
Thanks!
S
...
Hi folks,
I have the following sql query for a SQL Server 2008 db.
SELECT TOP(@NumberOfStreetResults) LocationType, LocationId, Name
FROM [dbo].[LocationNames]
WHERE CONTAINS(Name, @SearchQuery)
AND LocationType = 7
Notice how I'm using the CONTAINS keyword? I have an FTS on the Name field.
I'm not sure what index(s) I need to ...
This issue is similiar to here.
http://stackoverflow.com/questions/1155263/what-causes-internal-connection-fatal-errors
Except it's only happening on one stored procedure and is happening all of the time and is only happening when I access this stored procedure from my website.
I've even ran the stored procedure in SQL Server and it s...
I want to get the absolute days away a datetime is from today. For example, i would like to know if a date is 2 days away, or 78 days away, or even 5,239 days away (not likely, but you get the idea). I am using an MS SQL database which is returning datetimes where the time components are all 00:00:00.
date_diff returns relative values...
Hi,
I have a UDF that does most of the joins and when I run it, it read about 100-150 pages (from sql profiler) but if I wrap this UDF in sp then the sp will do the read about 243287 pages.
Furthermore, the UDF itself performs index seek but the sp performs index scan on one of the searched columns.
Can anyone please advise?
...
I have 2 tables T1 AND T2
T1 has 10 unique records with a primary key (Identity Seed)
T2 has multiple entires with Foreign Key for each record in T1
T1 has 2 columns : PrimaryKey - DATA
T2 has 2 columns : PrimaryKey - FoeignKey (this FK is the Primary Key of T1)
I need to write a query which will select all the records from T1 and INS...
How can I Convert the SQL Server 2008 to SQL Server 2005
I need the Data of the database and not only the structure using the generate script
...
Hi All
I have the following insert stored procedure:
CREATE Procedure dbo.APPL_ServerEnvironmentInsert
(
@ServerEnvironmentName varchar(50),
@ServerEnvironmentDescription varchar(1000),
@UserCreatedId uniqueidentifier,
@ServerEnvironmentId uniqueidentifier OUTPUT
)
WITH RECOMPILE
AS
-- Stores the ServerEnvironmentId...
I have a ##table which can be accessed across all the sessions but sometimes I am getting error
There is already an object named
'##table' in the database.
WHY and how to resolve it.
...
Hi All,
I am writing a query to fetch results for all the values in a column which is of varchar type.. are less than '29/08/2010' (date)
My Query:
SELECT * FROM EMPLOYEES WHERE COLUMN1 < '29/08/2010'
Here the column1 is of varchar type. I am using SQL Server 2005
Is there a way to make this possible..??
Pls help me.
Thanks in ad...
I'd like to find the best editor for flat SQL Server Compact edition databases. Essentially we want to push around arbitrary flat typed datasets of under 4 Gb each and have a good editing experience for manipulating this data. Access isn't the first thing that comes to mind, but I'm looking for a more "de facto" approach rather than the ...
Hi What is the difference between
set @flag=1 and set @@flag = 1 in SQL Server?
Thank you
...
Hi, this is pretty strange.
I've got this string that connect to a SQLServer in the same domain as the computers are running and compares username with employeeID. Then takes that row and dumps it into the lokal computers registry. This is working in Windows XP, but not Windows 7 it seems.
I get this exact error message:
Line:39
Char:...
As the title suggests I am confused as to why some tables in my database fall over if you do something like;
SELECT * FROM [user].[table]
And yet on another tables it works fine.
I am testing some code that will eventually be on a server that cries if you don't use [user].[table] so I would really like to force this on my machine.
C...
I have a string in the following format 'DOMAIN\username'.
I wish to trim the domain and the backslash from the string. I cannont simply use RIGHT() as we have multiple domains of varying length.
What is the most portable way to do this?
Thank you.
...
Hi, I am designing a question module.
What i want is while i'm typing something in a textbox (called title), it should list titles of other questions that have already been asked. But not done as AutoCompleteText.
I'd like those listed questions to pop up near the textbox and be set as a hyperlink, and by clicking on that link will res...
How to change one attribute in a table using T-SQL to allow nulls (not null --> null)? Alter table maybe?
...
Hi All,
I'm probably missing something (looking at it too long), but in a stored procedure can I select all distinct values from one table and then do a for each loop based on each of those returned rows, which themselves build up sql statements based on the distinct values?
Cheers.
...
I tried to reproduce the situation of question [1].
On table, taken and filled with data from wiki's "Isolation (database systems)" [2],
in SQL Server 2008 R2 SSMS, I executed:
1) first in first tab (window) of SSMS
-- transaction isolation level in first window does not influence results (?)
-- initially I thought that second ...
Hi,
I have a SQL Server clustering test environment. One domain controller, two nodes. Can I install other instance on the two node beside the clustered instance?
Thanks.
...