Viewing 15 posts - 856 through 870 (of 1,183 total)
CREATE VIEW dbo.cte_view_test
AS
WITH cte_test
AS
(SELECT id, val FROM dbo.test)
SELECT
id,val
FROM cte_test
Where test is your table
October 17, 2007 at 10:34 am
The quickest way to answer that question is to try it. 😛
Yes, a CTE can be used in a view. You should then be able to reference the view in...
October 17, 2007 at 10:14 am
I humbly :hehe: submit this article http://www.sqlservercentral.com/articles/Development/2824/.
I'm sure you can use this method by either creating a Trigger to fire it, or a scheduled job.
Hope this helps....
October 17, 2007 at 9:12 am
Are you positive that the data in the "first" row is unique?
What happens when you run the query commenting out the insert?
How many entries for the first row?
Now the bad...
October 16, 2007 at 1:02 pm
1. Move your "FETCH NEXT ... INTO" just after your "BEGIN" in the WHILE loop.
2. You might also read up on Triggers. BEFORE UPDATE triggers would be another way to...
October 16, 2007 at 12:12 pm
Well, my suggestion would then be to alter your table and change the key to an IDENTITY column. Tie-ing yourself to a procedure that gets the next key for a...
October 16, 2007 at 11:51 am
Kenena,
What exactly does the procedure "SequenceValue 346, @Gridkey Out" do? I would assume this is giving you a key to use, but what else does it do?
The reason I ask...
October 16, 2007 at 11:28 am
They do on my machine.
Wait, do you mean Query Analyzer or Management Studio? They show in SSMS.
I can definitely see that Steve and the guys need to work on...
October 16, 2007 at 9:08 am
I'm not sure with the multi-select parameter feature in RS 2005.
October 16, 2007 at 8:29 am
Set a default value for the (@office) office parameter to something like "N/A" and then change your query to...
Select Date, Office, Name from Info_table
Where Date >= '01/01/2007' and
Date <= '02/01/2007'
and...
October 16, 2007 at 8:13 am
David Burrows (10/16/2007)
what is the datatype and what makes you think it did not work
btw
preceding a column or variable with - will achieve the same, eg
DECLARE...
October 16, 2007 at 7:17 am
Right, you search for "vmdproduction" and it will give you a list of all objects that have the server name hard-coded. You can then copy the SQL from the results...
October 15, 2007 at 10:06 am
Not sure about the replacing, but SQL Digger is pretty handy and will find all of the objects that need modified.
October 15, 2007 at 9:47 am
OK, My turn to test. ...
October 12, 2007 at 5:52 am
Sometimes your just TOO close to a problem to see a simple solution. I know I've been there many times!
October 12, 2007 at 5:45 am
Viewing 15 posts - 856 through 870 (of 1,183 total)