Viewing 15 posts - 391 through 405 (of 596 total)
Here's a method that uses a user-define function (UDF). First, create the UDF dbo.fGetToken(). I used the following as a test. I've commented out the DROP TABLE statement. This may not...
April 26, 2005 at 6:55 am
Maybe this example using DBCC INPUTBUFFER will help. The only problem is, I've never figured out how to supress the "DBCC Execution completed." message.
/*
DROP PROCEDURE P1a
DROP PROCEDURE P1b
DROP PROCEDURE P2
*/
GO
CREATE...
April 8, 2005 at 9:15 am
Congratulations, Frank! We're proud of you. You are a big reason that this forum is better than all the others.
Mike
April 8, 2005 at 5:54 am
Instead of a cursor and dynamic SQL (both of which should be avoided whenever possible), see my response to another post at http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=143488
As in that post, I would create...
April 6, 2005 at 7:42 am
check this out: http://support.microsoft.com/default.aspx?scid=kb;en-us;274750&sd=tech#4
It says, in part:
Windows 2000 Server
SQL Server 2000
Normally, both the SQL Server 2000...
April 6, 2005 at 5:57 am
Are you trying to sort the results by p.Country?
If so, use ORDER BY p.Country instead of GROUP BY, which is used with aggregate functions ( like SUM(), COUNT(), etc. )...
April 1, 2005 at 8:05 am
You didn't provide the information to determine how the two tables are joined, so I couldn't fill that part in (which I highlighted in the UPDATE statement). Also, I assumed...
April 1, 2005 at 5:55 am
What is the data type of the stored procedure's parameter?
If it's int, try this:
... = "exec spShipping_sched_daterange " & num_days
If it's char or varchar, try:
... =...
March 31, 2005 at 8:22 am
Do you want to just truncate the fractional part, or round it (i.e. 123.4 becomes 123, while 123.8 becomes 124) ?
Here's an example using elements from both responses:
CREATE TABLE #temp
(
id...
March 31, 2005 at 8:05 am
What do you mean by "I want the current UserName in List 1 to be stamped in User_name1 in List 2" ? Please clarify your request.
March 31, 2005 at 7:03 am
The following should work:
(In this case, the BEGIN..END is not required, but I've used it here because I think it makes the code more readable):
-----------------------------------------------------
CREATE TRIGGER tru_FileUpload ON dbo.FileUpload
FOR UPDATE
AS
...
March 30, 2005 at 6:00 am
If you want to store the current datetime each time a row is updated, you would need to add a datetime column to your table, then add an UPDATE trigger....
March 28, 2005 at 7:30 am
Another way is to create a UDF, which you can then use for future tasks as well. I use the following UDF, fGetToken(), to parse delimited data sets, but you...
March 24, 2005 at 9:13 am
The scope of an IF statement is limited to a single batch. You cannot have a single IF span multiple batches. GO is the batch separator used by Query Analyzer.
Executing...
March 23, 2005 at 7:17 am
Viewing 15 posts - 391 through 405 (of 596 total)