Viewing 15 posts - 76 through 90 (of 519 total)
LOL.....it's punishment for using a cursor......
March 22, 2006 at 3:55 pm
What your talking about has been pretty standard methodology through my experience, and works well. However, with the new SYSSCHEMA views, and them actually having the metadata you would need,...
March 22, 2006 at 2:00 pm
be aware that sp_helptext only gives you the first 255 characters of the proc text per line........but if you examine the proc, it gives the table name I can't think...
March 22, 2006 at 12:49 pm
You can set the results of a sql statement to a variable of type object, and reference the variable in your for each loop as well......that's how we handle it....it...
March 22, 2006 at 12:44 pm
LOL......I overcome the 8000 char limit by using temp tables to hold the scripts...and do the full database.....want mine too?
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
if exists (select * from...
March 22, 2006 at 12:35 pm
It is very straight forward and simple......two ticks together within a string translate to a single tick in the results.....it just looks difficult....
So 'Hello '' People' would turn out as...
March 22, 2006 at 12:12 pm
Replace the Set statement with this one:
SET
@sqlscript =(select ' sp_changeobjectowner ''manager.' + table_name
March 22, 2006 at 11:46 am
Ah, I just noticed....change the criteria for tablename to be a list of tablenames....either from sysobjects, or whereever......I had a tablelist of specific tables I referenced.....
March 22, 2006 at 9:59 am
This will get you foreign keys:
SELECT 'ForKey',
child_table child_table,
obj.name constraint_name,
child_column child_column,
child_pos pos,
parent_table parent_table,
parent_column parent_column
FROM (
SELECT tab1.name child_table,
col1.name child_column,
CASE col1.colid
WHEN ref.fkey1 THEN...
March 22, 2006 at 9:46 am
There is a system table, unfortunately I've forgotten the name of it, but the proc text is held in the text field in this table, so long as it's not...
March 22, 2006 at 9:38 am
Select
A.WS_NUM, A.ComponentValue, A.auditid
From
testx A
Inner
...
March 21, 2006 at 3:12 pm
It could be done by looping the records, but not in a single select.
March 21, 2006 at 3:05 pm
This is one of the options I tried, and can tell you that the results are incorrect like this. Run the two statements together, and you'll see what I am...
March 16, 2006 at 3:32 pm
It appears that you are looking for the minimum start date and maximum end date by item and price. If that is correct, then :
Select Item, Min(StartDate) as StartDate, Max(EndDate)...
March 16, 2006 at 1:41 pm
Yes, not only can you do this, but If you create the same statements using the left outer join syntax, run both statements in the same query window and turn...
March 16, 2006 at 10:28 am
Viewing 15 posts - 76 through 90 (of 519 total)