First  |  Prev |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13
Building Dynamic Case Statement
Hi All can any body help me for the following logic. Input ------- a,b output --------- case when isnull(a,0)=0 then b else a end Input ------- a,b,c output --------- case when isnull(a,0)=0 then (case when isnull(b,0)=0 then c else b end) else a end Input ------- a,b,c,d output -----... 9 Aug 2010 13:28
find if local variable exists
Hello there I have two procedures which one calls another. Proc1 sometimes declare @@var and sometimes not. I would like to build statement on Proc2 that if @@var exists do one else do another thing. Is there a way to do it without try..catch? ... 8 Aug 2010 11:14
Running a query in SSIS thwn importing Excel spreadsheets
I've just been learning SSIS to import Excel 2003 spreadsheets into SQL Server 2005, and so far, so good. I want to take my use of SSIS to the next level, so to speak, and could use some help. Here's the scenario: I've got spreadsheet data representing names that must be consolidated. As can happen with s... 8 Aug 2010 13:25
Using ODBC in a trigger
Can someone point me in the right direction on how to connect 2 tables, in 2 different SQL Servers, with ODBC? I have no idea what the syntax would be for the connect. ON INSERT into Table1, I need to INSERT that record into Table2 on the remote SQL Server. thanks! ... 8 Aug 2010 05:51
help
I have a table Contest with ContestId (PK int), ContestName, ContestDate. I have another table Registration which stores the data for people who register for the contest. Registration has RegistrationId (PK int), ContestId (FK int) , PersonsName (varchar), Isawinner(bit) I would like a query which would return me ... 7 Aug 2010 11:29
How to Find any connection over internet
Dear Sir, How to find the any user is connected to SQL Server over internet using any views like Sys.DM_Exec_Connections etc. Sanjay Shah ... 7 Aug 2010 08:15
Estimated plan using view vs. guts of view
i have a SELECT from a VIEW that is taking ~43 seconds. If i inline all the SQL (instead of using view) i can get the same result set in under 1 sec. The estimated plans for each select match the actual plans. What i don't know how to do is figure out why the optimizer chose the plan in the VIEW's case. Why w... 6 Aug 2010 18:12
Estimated number of rows
Hi, I am working with a query which gives my inconsistent actual execution plan results. I have a query with a temporary table (#T) which is joined with some normal tables. Case 1 ------ The estimated number of rows is same as the real number of rows (23K) if I set a specific index on #T. The subtree c... 7 Aug 2010 06:07
Clustered and Keys
Hello, When should I use clustered or not clustered for primary keys? And in a table that performs only Many to Many relationship (please, see ResourcesConstratains) should I have another primary key instead of using the composition of the other two? This is my T-SQL code: create table dbo.Constraints ( ... 9 Aug 2010 22:19
Help querying for a specific date
I work for a company who sends traveling nurses out on jobs across the country. They could have had several jobs with us over time and each job they go on gets inserted into a table with the Start Date of when they started each particular job. In this table, there is also a field that is an ID of a "termination rea... 7 Aug 2010 05:03
First  |  Prev |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13