Dummy_val

  • Occasionally, I see a query submitted from Entity Framework with 'Dummy_VAL' in the where clause, like WHERE [Extent1].[SiteId] = 'DUMMY_VAL' - - -  What is Dummy_VAL and how does sql interpret it?

  • A quick google of 'Entity Framework "DUMMY_VAL"' returned few results; one of which was this very topic. Sounds like somewhere in your application that's the query that is being used; caused eitger by user entry or hard coded.

    As for "how does sql (server) interpret it"? 'DUMMY_VAL' is a literal string, a varchar(9) to be specific, so it'll treat it like it would any other varchar(9); and if the data type of SiteId is an int, then the statement (unsurprisingly) will generate a conversion error.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • jwmott - Thursday, May 31, 2018 10:15 AM

    Occasionally, I see a query submitted from Entity Framework with 'Dummy_VAL' in the where clause, like WHERE [Extent1].[SiteId] = 'DUMMY_VAL' - - -  What is Dummy_VAL and how does sql interpret it?

    It's nothing but a string of characters.   The query will simply check the values of the SiteId column in the Extent1 table and only return rows where the value in said column is actually DUMMY_VAL.   It's not uncommon for developers to code up dummy data using similar string values in character columns.   If that SiteId column is not of a character string data type, you would get an error instead, as Thom A has already pointed out.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • Thank you gentlemen.

  • jwmott - Thursday, May 31, 2018 2:01 PM

    Thank you gentlemen.

    You're welcome.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply