Viewing 15 posts - 466 through 480 (of 599 total)
"employee" is the table in the database
"inserted" is the 'table' containing the data to be inserted.
so, for your example:
SELECT ID
FROM my_table
WHERE ID= the_id_being_imported
it would look like:
SELECT ID
FROM my_table t
INNER JOIN...
May 17, 2006 at 8:19 am
If the column is defined as datetime, then there is no such thing. What you are seeing is a translation of the actual stored value into a displayable format. To...
May 17, 2006 at 7:23 am
Well, not "my" temp tables. But yes, the procs that I have inherited have temp tables with columns defined as NOT NULL.
May 16, 2006 at 4:40 pm
You should also take a look at QUOTENAME:
http://msdn2.microsoft.com/en-us/library/ms176114(SQL.90).aspx
May 16, 2006 at 3:09 pm
There is no indexing (though I may be changing that...).
So if it's just insert and select, then your second point does not apply so removing the NOT NULL restriction could...
May 16, 2006 at 2:50 pm
SELECT
LEFT(MyCol, 100) as LeftVal
SUBSTRING(MyCol, 1, 100) as SubStrVal
FROM MyTable
May 16, 2006 at 10:54 am
inserted is the name of the "table" in the insert trigger.
An example from the link:
SELECT @min_lvl = min_lvl,
@max_lvl = max_lvl,
@emp_lvl = i.job_lvl,
@job_id = i.job_id
FROM employee...
May 16, 2006 at 10:51 am
no need to
REPLACE(MyData,' ','') will replace/remove every space.
May 16, 2006 at 10:33 am
Have a look at the examples here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_create2_7eeq.asp
Essentially, you'd do a select on inserted and the table in question, joining on the PK / unique data.
Very rough pseudo-code:
If EXISTS(select.....)
begin
RAISERROR...
May 16, 2006 at 10:29 am
You might want to post this in the Access forum.
May 16, 2006 at 7:44 am
Have you looked at the query plan?
Is the temp table indexed?
For ptcp, you should defnintely have the join condition indexed (and probably clustered).
Without more detailed informatio those are the...
May 15, 2006 at 12:23 pm
Ah, now that's a bit more helpful. Did a little MSDN searching and came up with the following:
http://forums.microsoft.com/msdn/showpost.aspx?postid=260352&siteid=1
I would agree with the poster - put the values into a...
May 11, 2006 at 3:28 pm
Viewing 15 posts - 466 through 480 (of 599 total)