Forum Replies Created

Viewing 15 posts - 1,456 through 1,470 (of 3,543 total)

  • RE: The "Numbers" or "Tally" Table: What it is and how it replaces a loop.

    cry out β€œTally Ho”!

    Only when he gets on his high horse πŸ˜‰

    btw Jeff, excellent article, as always πŸ˜€

    Only the Best eh :hehe:

  • RE: ORDER BY

    Wow! Are the number of QOTD replies getter longer or what :w00t:

    There seem to be a lot of strong personalities here :crazy:

    Glad I'm not a DBA....

    always right, never wrong and...

  • RE: I got burned today at a SQL Server Interview!

    smelled a bit like Ice Cream, too

    Way... way... too much information Jeff :sick:

  • RE: I got burned today at a SQL Server Interview!

    we don't expect to get Jeff Moden in every interview (although, that'd be GREAT)

    No but I'll have one for each working day though :w00t:

    ... I'd like to work with you...

  • RE: Stripping out double quotes (") in bulk insert

    BULK INSERT / BCP will not truncate/remove trailing spaces on input data, and since you already stated that the data contains trailing spaces and is longer than the column definitions...

  • RE: Stripping out double quotes (") in bulk insert

    At the moment the issue is that it places the data in the wrong columns leaving blank columns. The data seems to be ok. It seems like it doesnt like...

  • RE: multi rows value in one select statement

    I belive you are looking for a PIVOT like this

    SELECT[ID],

    MAX(CASE WHEN IDX = 0 THEN APP_DEGREE_ID ELSE null END) AS [Degree0],

    MAX(CASE WHEN IDX = 1 THEN APP_DEGREE_ID ELSE...

  • RE: In DQL - how I do DESC at Union

    ORDER BY applies to the result of the UNION not the individual SELECT's so you can do this

    SELECT 1 AS [Result]

    UNION

    SELECT 2 AS [Result]

    ORDER BY Result DESC...

  • RE: OpenRowset Security

    The question indicates a file not a database, don't know is this makes a difference :unsure:

  • RE: Database Design Question

    OK. I'll go to the bottom of the nerd's class πŸ™

    See if this works better

    There are locations (Dealers) that represent a Car Dealership that sells cars. The code for the...

  • RE: Database Design Question

    My most sincere appologies

    No need Jeff πŸ™‚

    I thought you were making fun of a series of threads that are responsible for the current inflamed crease in my gray-matter

    Not me... but...

  • RE: Database Design Question

    What? Oh? OH? OOOOOHHHHH!!! BWAAAA-HAAAAAA.....

    Sorry Jeff...

    Did not know if you were laughing at me :crying:

    or at my question πŸ™

    or was it that I actually posted one :blink:

  • RE: Database Design Question

    I am not sure what your question is?

    Sorry Ron. I'll try to meke it clearer :blush:

    Thanks for the reply πŸ™‚

    The data is separate by Location, ie the ContactID will unique...

  • RE: Dynamic database name

    Good spot Sergiy πŸ™‚

    Maybe this instead then

    SET @sql = 'select * from [' + REPLACE(REPLACE(@dbname,'[',''),']','') + '].dbo.tblAccounts where [date]=''09/04/1998'''

    EXECUTE(@sql)

    btw your sql would not work anyway, it is...

  • RE: Dynamic database name

    Do you mean like this (for your original query)

    EXECUTE('select * from [' + @dbname + '].dbo.tblAccounts where [date]=''09/04/1998''')

    Note the number of single quotes

Viewing 15 posts - 1,456 through 1,470 (of 3,543 total)