Viewing 15 posts - 4,921 through 4,935 (of 7,429 total)
You cannot do like this with EXEC. You can however use sp_executesql with output variable. There are several threads on this but I cannot seem to find one right now.
"Don't...
September 6, 2002 at 6:37 pm
Sorry you do have to put a trigger on all three.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
September 6, 2002 at 6:28 pm
Actually in Procs you can set default values and work with them.
Ex.
CREATE PROC sp_InData
@FirstName = NULL, Default value of NULL
@LastName --No default is required.
AS
INSERT INTO
tblUser (FName, LName)
VALUES (@FirstName, @LastName)
SELECT *...
September 6, 2002 at 10:44 am
I tried this once with a SQL 7 server using the 200 EM client tools to shirnk to a specific size. It worked and I saw no issues but that...
September 6, 2002 at 5:34 am
Which version of MSDE, most will work with DBCC SHRINKFILE if I remember correctly.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
September 6, 2002 at 5:29 am
You can still use SP's the key is create a security layer for the incoming code.
Ex.
CREATE PROC sp_DynamSQL
@keywords VARCHAR(8000),
@col INT
AS
SET NOCOUNT ON
if CHARINDEX('TRUNCATE', @keywords) > 0 OR
CHARINDEX('DROP', @keywords) > 0...
September 6, 2002 at 5:27 am
Has to do normally with the account Agent or SQL itself are running under. If LocalSystem then it cannot see remote drives even mapped drives since it cannot login. This...
September 6, 2002 at 5:17 am
This is another option that takes into account the rounding on the .365252 however MS SQL datetime for some reason will move 2+ or 1- sec in comparison for some.
DECLARE...
September 6, 2002 at 5:12 am
ifmanish the use only remains in effect for the duration of the EXECUTE process. Any code outside this will remain in the same DB context.
However to save soem developement hassels...
September 6, 2002 at 4:46 am
Or this which is a bit shorter.
ORDER BY
CASE @SortBy
WHEN 'CompetitorID' THEN CompetitorID
WHEN 'LastName' THEN LastName
WHEN 'State' THEN State
END
However, if you are doing this in a Stored...
September 6, 2002 at 4:40 am
Using Gregory's example tables.
Or just a variation which is a bit smaller and more concise.
SELECT
c.[name] AS Company,
COUNT(u.lastname) AS Employees,
SUM (case WHEN u.smoke = 'Y' THEN 1 else 0 END)...
September 6, 2002 at 4:22 am
Procedure grouping in SQL works like so, but I think I hit this before and found it was a different type of grouping, but hopefully we are talking same here.
CREATE...
September 6, 2002 at 4:16 am
For some reason this was removed in EM in 7 and 2000 (may want to make a request to MS for this option). Now as for what Andy stated you...
September 6, 2002 at 4:00 am
Here is a script I wrote a while back to convert money to the word value. Depending on what you need to accomplish you will have to alter to fit...
September 6, 2002 at 3:38 am
QA by default only displays 255 charcters max per column. However, you can change this by going to the menu Tools/Options then on the dialog that appears choose the Results...
September 6, 2002 at 3:26 am
Viewing 15 posts - 4,921 through 4,935 (of 7,429 total)