Click here to Skip to main content
15,890,370 members

Ilka Guigova - Professional Profile



Summary

    Blog RSS
3,733
Author
60
Authority
328
Debator
193
Editor
5
Enquirer
346
Organiser
888
Participant

Reputation

Weekly Data. Recent events may not appear immediately. For information on Reputation please see the FAQ.

Privileges

Members need to achieve at least one of the given member levels in the given reputation categories in order to perform a given action. For example, to store personal files in your account area you will need to achieve Platinum level in either the Author or Authority category. The "If Owner" column means that owners of an item automatically have the privilege. The member types column lists member types who gain the privilege regardless of their reputation level.

ActionAuthorAuthorityDebatorEditorEnquirerOrganiserParticipantIf OwnerMember Types
Have no restrictions on voting frequencysilversilversilversilver
Bypass spam checks when posting contentsilversilversilversilversilversilvergoldSubEditor, Mentor, Protector, Editor
Store personal files in your account areaplatinumplatinumSubEditor, Editor
Have live hyperlinks in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Have the ability to include a biography in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Edit a Question in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Edit an Answer in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Delete a Question in Q&AYesSubEditor, Protector, Editor
Delete an Answer in Q&AYesSubEditor, Protector, Editor
Report an ArticlesilversilversilversilverSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubEditor, Mentor, Protector, Editor
Edit other members' articlesSubEditor, Protector, Editor
Create an article without requiring moderationplatinumSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending QuestionProtector
Approve/Disapprove a pending AnswerProtector
Report a forum messagesilversilverbronzeProtector, Editor
Approve/Disapprove a pending Forum MessageProtector
Have the ability to send direct emails to members in the forumsProtector
Create a new tagsilversilversilversilver
Modify a tagsilversilversilversilver

Actions with a green tick can be performed by this member.


 
GeneralSlide-In Image Captions Pin
Ilka Guigova27-Aug-11 19:49
Ilka Guigova27-Aug-11 19:49 
General30 Useful jQuery Tabs Tutorials Pin
Ilka Guigova9-Jul-11 14:36
Ilka Guigova9-Jul-11 14:36 
GeneralOne-liners Pin
Ilka Guigova4-Jun-12 7:34
Ilka Guigova4-Jun-12 7:34 
GeneralLogical XOR in Javascript Pin
Ilka Guigova25-Apr-11 14:36
Ilka Guigova25-Apr-11 14:36 
GeneralA Collapsible Outline of Indented Text in Javascript Pin
Ilka Guigova6-Feb-11 16:19
Ilka Guigova6-Feb-11 16:19 
GeneralPython calculations - arrangements Pin
Ilka Guigova30-Aug-10 7:44
Ilka Guigova30-Aug-10 7:44 
GeneralVisualStudio 2005 Slow On Save Pin
Ilka Guigova23-May-10 13:44
Ilka Guigova23-May-10 13:44 
GeneralT-SQL Cursor and XML Basic Example Pin
Ilka Guigova3-Apr-10 13:13
Ilka Guigova3-Apr-10 13:13 
MSSQL Server 2005 provides native support for the XML data type, and new methods to directly parse and read the data.

The following two articles discuss the MSSQL Server 2005 XML capabilities:
  • http://www.setfocus.com/TechnicalArticles/Articles/sql-server-2005-xml.aspx[^]
  • http://www.15seconds.com/Issue/050803.htm[^]

  • And here is a basic example:
    SQL
    -- xml: http://www.setfocus.com/TechnicalArticles/Articles/sql-server-2005-xml.aspx
    -- XQuery: http://www.15seconds.com/Issue/050803.htm
    DECLARE	@XMLText XML
    SET	@XMLText = '
    <Customers>
      <Customer>
        <FirstName>Kevin</FirstName>
      </Customer>
      <Customer>
       <FirstName>Steve</FirstName>
      </Customer>
    </Customers>'
    SELECT	@XMLText.query('/Customers/Customer/FirstName')
    /* Output
    <FirstName>Kevin</FirstName>
    <FirstName>Steve</FirstName>
    */

    Now let's assume that we have a table (#MAP) that contains a xml mapping to another table (#NODE). In order to validate the mappings, we need to check if a node referenced in a xml map exists in the #NODE table.

    A solution is to use a cursor.

    And here is a basic example of a cursor:
    SQL
    -- cursor: http://msdn.microsoft.com/en-us/library/ms180169.aspx
    DECLARE	@tablename sysname
    DECLARE	tables_cursor CURSOR FOR
    	SELECT	name
    	FROM	sys.objects
    	WHERE	type = 'U' AND UPPER(NAME) LIKE UPPER('%%')
    
    OPEN tables_cursor
    FETCH NEXT FROM tables_cursor INTO @tablename
    
    WHILE @@FETCH_STATUS = 0
    BEGIN
    	EXEC ('SELECT Top 1 * FROM ' + @tablename)
    	FETCH NEXT FROM tables_cursor INTO @tablename
    END
    CLOSE tables_cursor
    DEALLOCATE tables_cursor


    However, since cursors are the slowest way to access data inside MSSQL Server (http://www.sqlteam.com/article/cursors-an-overview[^]), the following snippet includes both the cursor and the set-based way to scroll through and validate the mappings:

    SQL
    CREATE TABLE #NODE
    (
    	ID INT IDENTITY, 
    	NAME NVARCHAR(MAX)
    )
    
    INSERT INTO #NODE VALUES ('TESTNODE')
    
    CREATE TABLE #MAP
    (
    	ID INT IDENTITY, 
    	XML_TEXT NVARCHAR(MAX),
    	IS_ENABLED BIT
    )
    
    INSERT INTO #MAP VALUES ('<MAP><INPUT><NODE><ID>1</ID></NODE></INPUT><OUTPUT>1234</OUTPUT></MAP>', 1)
    INSERT INTO #MAP VALUES ('<MAP><INPUT><NODE><ID>11</ID></NODE></INPUT><OUTPUT>1234</OUTPUT></MAP>', 1)
    
    /*
    SET NOCOUNT ON  -- http://msdn.microsoft.com/en-us/library/ms189837.aspx
    DECLARE @MAP_ID INT, @MAP_XML XML, @NODE_ID INT
    DECLARE	map_cursor CURSOR FOR
    	SELECT	ID, XML_TEXT
    	FROM	#MAP
     
    OPEN map_cursor
    FETCH NEXT FROM map_cursor INTO @MAP_ID, @MAP_XML
     
    WHILE @@FETCH_STATUS = 0
    BEGIN
        SET @NODE_ID = ISNULL(@MAP_XML.value('(//NODE/ID)[1]', 'INT'), 0)
    
        IF NOT EXISTS(SELECT ID FROM #NODE WHERE ID = @NODE_ID)
        BEGIN
            PRINT 'UNDEFINED NODE ID: ' + CAST(@NODE_ID AS NVARCHAR(30)) + ' IN MAP: ' + CAST(@MAP_XML AS NVARCHAR(MAX))
            UPDATE #MAP SET IS_ENABLED = 0 WHERE ID = @MAP_ID
        END 
         
        FETCH NEXT FROM map_cursor INTO @MAP_ID, @MAP_XML
    END
    CLOSE map_cursor
    DEALLOCATE map_cursor
    */
    
    UPDATE #MAP SET IS_ENABLED = 0
    --SELECT *  
    FROM #MAP M
    LEFT JOIN #NODE N ON N.ID = ISNULL((CAST(M.XML_TEXT AS XML)).value('(//NODE/ID)[1]', 'INT'), 0)
    WHERE N.ID IS NULL
    
    DROP TABLE #MAP
    DROP TABLE #NODE

    GeneralT-SQL Auto Increment Variable Pin
    Ilka Guigova2-Apr-10 20:04
    Ilka Guigova2-Apr-10 20:04 
    GeneralApplying XSL Transformations Pin
    Ilka Guigova29-Mar-10 11:05
    Ilka Guigova29-Mar-10 11:05 
    GeneralXML DOM Load Functions Pin
    Ilka Guigova10-Aug-12 13:46
    Ilka Guigova10-Aug-12 13:46 
    GeneralWorking with durations in MSSQL server Pin
    Ilka Guigova31-Jan-10 13:11
    Ilka Guigova31-Jan-10 13:11 
    GeneralRe: Working with durations in MSSQL server Pin
    Grunge Boy31-Jan-10 23:29
    Grunge Boy31-Jan-10 23:29 
    GeneralRe: Working with durations in MSSQL server Pin
    Ilka Guigova1-Feb-10 7:17
    Ilka Guigova1-Feb-10 7:17 
    GeneralThe hidden __arglist keyword Pin
    Ilka Guigova9-Aug-09 14:38
    Ilka Guigova9-Aug-09 14:38 
    GeneralServices Pin
    Ilka Guigova9-Aug-09 14:27
    Ilka Guigova9-Aug-09 14:27 
    GeneralTerminal Services Pin
    Ilka Guigova9-Aug-09 14:24
    Ilka Guigova9-Aug-09 14:24 
    GeneralSerial com ports Pin
    Ilka Guigova9-Aug-09 14:18
    Ilka Guigova9-Aug-09 14:18 
    GeneralScrollable GridView Pin
    Ilka Guigova9-Aug-09 13:58
    Ilka Guigova9-Aug-09 13:58 
    GeneralHow to instantiate a class from a class name Pin
    Ilka Guigova9-Aug-09 11:08
    Ilka Guigova9-Aug-09 11:08 
    GeneralDebugging COM+ Components in Visual Studio Pin
    Ilka Guigova9-Aug-09 10:41
    Ilka Guigova9-Aug-09 10:41 
    GeneralRetrieving the COM+ class factory for component failed Pin
    Ilka Guigova29-Jul-10 12:10
    Ilka Guigova29-Jul-10 12:10 
    GeneralDebugging COM+ Components in Delphi Pin
    Ilka Guigova9-Aug-09 9:27
    Ilka Guigova9-Aug-09 9:27 
    GeneralCOM Surrogate error Pin
    Ilka Guigova9-Aug-09 9:07
    Ilka Guigova9-Aug-09 9:07 
    GeneralC++ conversion - text to currency Pin
    Ilka Guigova9-Aug-09 8:54
    Ilka Guigova9-Aug-09 8:54 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.