tsql help - get change or created line item6599 (9/2/2010 12:57:03 PM) UtfHi All,
I have an order history file.
It has an Action column to store action performed on the order.
Order Id, Action, Date
1, Created, 8/1/10
1, Changed, 8/15/10
1, Changed, 9/1/10
What is the be...
Need Help for Parent Child Table Join Output4886 (9/8/2010 3:05:38 PM) chintu4uinHi frnds I want to know whether following thing is possible through
Pid | PField1 | PField2 | PField3 | PField4
1 A Aa Aaa Aaaa
Duration between 2 dates11090 (9/9/2010 9:10:38 PM) KruHi,
I need some help on calculating number of days between two dates
excluding weekends and holidays. Is there a function in sql that can
Like excel has NETWORKDAYS function.
Any help is muc...
how to fix "Check Catalog Msg 3851" error21604 (9/9/2010 11:25:13 AM) RogerI've got two sql server 2005 systems (production & development)
nightly, I backup my production databases and do a test restore on my
as part of the test restore, today I added this statem...
Doing the same over and over in different tables3635 (9/8/2010 9:51:03 PM) UtfHi
i have to do the same operation several time on different tables.
I want to get the value of a column (baseline) from @tableName, store it
into a variable and use this to update @tableName later on...
Extracting Data6768 (9/9/2010 6:51:39 PM) KruHi.
I need some help on extracting certain data from a field.
For example I want to extract anything after the CVC-IBM or CVC-
So the column field would ...
sa user permission error63172 (9/7/2010 6:58:21 PM) scottWhen I use sp_configure on my SQL2K8 R2 server while using the "sa" user
account, I'm getting the below error. If the sa account has the sysadmin
role, why would sql tell me that the sa account doesn't have...
why is this proc so slow?4864 (9/8/2010 6:34:17 PM) soni2926Hi,
I have the below proc, it seems to be running very slow ever since i
setup encryption on one of the columns. running it takes almost 2
mins, but if i run the same script outside of the proc, just in quer...
SELECT * in Programs7519 (8/30/2010 5:33:03 PM) UtfAs far as I can remember, this has been a "no no". But what would you answer
developers who say " We want the program to bomb when the table is out of
sync with program definiton"?
Thanks in advance
sql help required 09-09-101767 (9/9/2010 3:49:19 AM) Jami
following is DDL and sample data
CREATE TABLE #tmp
lname varchar (10),
INSERT INTO #tmp VALUES ('John','Terry',null)
CONSTRAINT to disable the update of some values10837 (9/6/2010 5:13:03 PM) UtfHello,
I have a a table with data from some operations. The status (char(2)) of the
operations can be changed. But there are some status that are "final" and
should not be changed.
Is there a way the ...
How to assign MAX(ROW_NUMBER) to a variable81427 (12/9/2009 11:01:55 PM) jtertinI would think this would be straight forward:
DECLARE @TotalRows INT
With Temp AS (SELECT ROW_NUMBER() OVER(ORDER BY rID) AS RowNumber
EXEC syntax in sp10850 (9/7/2010 10:50:07 PM) UtfI have a stored procedure that I want to run another stored procedure inside
of it. I have the following line in the sp but it seems to be failing. What
am I missing? Thanks.
Recursive Query3775 (9/7/2010 9:54:25 PM) K2missionI've been working with a recursive query recently and I've been unable
to get the expected results. I'm looking to pull a customer purchase
record for each time they purchased a particular product and to give...
Help for MS Access homework5810 (9/8/2010 2:44:39 PM) riccelalsimFor our homework in our Computer science class, we were tasked to research by
asking expert advice on database forums. We were first asked to download
Census data to be analyzed using Microsoft Access. The da...
Execution Plan Problem31211 (9/7/2010 1:43:09 PM) fromeoHi,
I'm trying to performance tune a query that I can't run in an ad-hoc
manner (SS2K5 SP2).
I've managed to get back an XML version of the execution plan that has
been cached by using a DMV.
I can right...
Remote Server Syntax51155 (9/6/2010 11:05:37 PM) scottI'm connected to a remote sql 2008 server. I will be running some update
queries from within mang. studio to update the remote server's db with data
from my local sql server.
What would the SELECT syntax...
Quesion on Visio moving tables to database51202 (9/6/2010 7:33:35 PM) tshadI built my tables in visio for my database and thought you could get the
code to create the tables and relations but I can't seem to find it.
There is a view code page but not sure if that is the schema co...
accumulated total in table21492 (9/7/2010 2:08:20 PM) DarinI have a stored procedure that i am trying to update a table coming from
a bunch of different calculations.
i have a temporary table that has item, count, acc_count.
i populate the item and ...
CTE4763 (9/7/2010 4:46:14 PM) tshadI have read and seen that CTE can be slower than a SQL statement with a
derived table (I am not talking about recursion).
I had seen where this was said to be slower because SQL creates temp tables