Viewing 15 posts - 46 through 60 (of 79 total)
Here is a UDF which return a table:
--START tsql
if exists (select * from sysobjects where id = object_id('dbo.fnc_10_parse_string') and xtype = 'TF')
drop function dbo.fnc_10_parse_string
GO
CREATE FUNCTION dbo.fnc_10_parse_string( @list varchar(8000))
RETURNS @tablevalues TABLE
...
June 29, 2004 at 1:01 pm
UDF's (user defined functions) are functions at their purest form.
You pass in data, and you get ~something back. The UDF doesn't "do" anything , except return a value to you.
In...
June 29, 2004 at 12:55 pm
That's the easiest manual way. It will make a COPY of the data. If you pick "LINK" it will (duh) link to the data, so if you changed it in...
June 29, 2004 at 12:46 pm
Well, I don't know exactly what to do, but will give you some tips:
<<< CODE 1 >>>
declare @s-2 varchar(32)
declare @dt datetime
declare @holder table ( datetimevalue varchar(32)...
June 29, 2004 at 8:33 am
While dynamic sql is handy sometimes, it should be used ONLY when there is NO other solution.
With dynamic sql, the RDBMS cannot preformulate the query tree, and has to do...
June 29, 2004 at 7:38 am
No.... the procedure itself takes a "text" parameter.
CREATE PROCEDURE usp_insert_pubs_authors (
@xml_doc TEXT )
My ~~example~~ (to call the procedure in t-sql) uses a varchar, and only because you cannot declare a local variable...
May 27, 2004 at 6:38 am
You also need to look closely how you're using your CASE statement.
its useage/mentality is not exactly the same as VB or other languages.
CASE (state)
WHEN 'KS' THEN 'thisIsKS'
WHEN 'MD' THEN 'thisIsMD'
ELSE...
May 26, 2004 at 3:20 pm
I would create a @variableTable and then populate it using the Case statement. Then update your table against the @variableTable.
Here is an example:
This example will screw up a couple of "address"(es)...
May 26, 2004 at 3:15 pm
Here is a sample, using the input as a text object.
--first , create the stored procedure.
if exists (select * from sysobjects
where id = object_id('dbo.usp_insert_pubs_authors') and sysstat & 0xf = 4)
drop...
May 26, 2004 at 2:55 pm
You did the right thing. There is no xml features in 7.0.
2000 is the ticket.
May 26, 2004 at 2:52 pm
Here is a sample, using the input as a text object.
--first , create the stored procedure.
if exists (select * from sysobjects
where id = object_id('dbo.usp_insert_pubs_authors') and sysstat & 0xf = 4)
drop...
May 26, 2004 at 2:50 pm
Personally, I always throw my xml data into a @variabletable, first thing.
Sometimes I populate mulitple @variableTables with the same xml doc.
My xml doc data is usually for bulk inserts, that...
May 26, 2004 at 2:44 pm
I think you need to list out the fields.
I had an archive process that did this.
And I remember cutting and pasting alot.
You might play around with this, if you're new...
May 26, 2004 at 2:19 pm
I'd like a combination of
Bill Nye's solution, and my input.
You can use his solution to verify my claims. Or you can...
April 12, 2004 at 11:57 am
I use the below.
While I haven't anally been concerned with the ordinal inserts, my experience says it does go in "in order" from the cvs file.
By using the "entryid", you...
April 12, 2004 at 11:45 am
Viewing 15 posts - 46 through 60 (of 79 total)