Forum Replies Created

Viewing 15 posts - 16 through 30 (of 42 total)

  • RE: Need different date formats to be converted in 'MM/DD/YYYY' format

    As the others said, I would do the conversion in the front end and then pass the datetime value to SQL Server

    A quick search brought up this for example:

    http://www.dotnetspider.com/resources/4500-Convert-string-DateTime.aspx

    brgds

    Philipp Post

  • RE: Differences

    Good article. Well said.

    brgds

    Philipp Post

  • RE: Parse name from Email Address

    jeboesch (10/6/2010)


    The email field contains some NULL values, could that be the problem?

    Elimitate NULLs either in the WHERE condition of the query (SELECT .... WHERE email_address IS NOT NULL) or...

    brgds

    Philipp Post

  • RE: create table and indexes in the same command

    grovelli-262555 (9/25/2010)


    Thanks Philipp,

    can you give me an example of a CHECK constraints with a SELECT statement in it?

    ALTER TABLE Customers

    ADD CONSTRAINT LimitRule

    CHECK (CustomerLimit <= (SELECT MAX(Limit)

    ...

    brgds

    Philipp Post

  • RE: create table and indexes in the same command

    grovelli-262555 (9/23/2010)


    By the way, shouldn't it be

    DB_Connection.Execute SQL_Statement(i)?

    Yes, right. I copied it out of my (home made) scratchpad and simplified it a bit for easier reading. Obviously this was...

    brgds

    Philipp Post

  • RE: create table and indexes in the same command

    I am using a SQL Scratchpad form for executing all SQL commands via ADO (much better SQL support than through the Access UI)

    If you pass CREATE TABLE .... ; followed...

    brgds

    Philipp Post

  • RE: date in sql

    DATEADD(month, -1, CURRENT_TIMESTAMP) resp DATEADD(month, -2, CURRENT_TIMESTAMP) and then convert back to your year_month format.

    brgds

    Philipp Post

  • RE: date in sql

    If I understand correctly, you will need a calendar table which you can join to any DATE or DATETIME column and return the year_month portion accordingly

    CREATE TABLE Calendar

    (calendar_date DATE NOT...

    brgds

    Philipp Post

  • RE: Any performance improvement

    It is a matter of taste but usually people are not expecting to find a comma at the beginning of the line in a normal text, so putting the comma...

    brgds

    Philipp Post

  • RE: Questionable SELECT Statement Length - Maybe Funny For Some of You

    Nice one! Why building a complicated database with lots of tables when we can jam everything into one table? 😉

    brgds

    Philipp Post

  • RE: Group By problem

    Is there a way to determine the JobID of the last job based on the DateWorkDone for each CustID in 1 script?

    Untestest

    SELECT *

    FROM

    (SELECT RANK() OVER(PARTITION BY CustID...

    brgds

    Philipp Post

  • RE: Primary key on City Table

    You might want to look at the well known ISO 3166 standard for country codes and for locations at the UNECE Locodes which you can find here

    http://www.unece.org/locode/

    It is always a...

    brgds

    Philipp Post

  • RE: GETDATE

    lkerman123 (11/5/2009)


    Useful tip. Thanks!

    You are welcome! 🙂

    brgds

    Philipp Post

  • RE: GETDATE

    First I thought, this question would possibly be too easy for the readers, but apparently this was not the case. Presently just 52 % correct answers, where I expected abt....

    brgds

    Philipp Post

  • RE: MAX

    From a logical point of view the message

    "Warning: Null value is eliminated by an aggregate or other SET operation"

    is quite good as NULL might mean unknown, not applicable or optional...

    brgds

    Philipp Post

Viewing 15 posts - 16 through 30 (of 42 total)