Forum Replies Created

Viewing 12 posts - 1 through 12 (of 12 total)

  • RE: Large text variable

    I'm not sure i get you correctly but why store a xml of 20000+ chars in the database? Just curious...

    Ontopic.. Maybe you could pass the id to the xml...

  • RE: Best Way to Calculate Age

    And is this the best way to calculate age? I'm not so sure... How about converting the date to seconds and calculate from there? I think performance wise this should...

  • RE: Sales figures by financial years

    In a left outer join all values not avalable will become null and you are trying an inner join on the client table with a null value. That is why...

  • RE: Sales figures by financial years

    left outer join on the months table should work... This looks familiar 😛

  • RE: Sales figures by financial years

    In my first example it will come up with the months as columsn

    truncate table #invoices

    insert into #invoices (invoiceid, invoicedate, invoicetotal, salesperson, clientid)

    select 1, cast('2008-1-15' as datetime), 200, 1, 1

    union all

    select...

  • RE: Sales figures by financial years

    [EDIT] Lol i see you do not need this 🙂 Sorry about that [/Edit]

    Hope this helps you on your way

    create table #Month ( [month] varchar(32))

    insert into #month ([month])

    select '1' [Month]

    union...

  • RE: time

    select cast(cast(1.1 as decimal(19,1)) / cast(5.0 as decimal(19,1)) as decimal(19,1))

    Obviously you can change the 1 into different numbers to add decimals. Also the cast of the numbers is not necessary...

  • RE: Guids allow database designs with less join tables?

    I'm not sure how big the database is going to be but storing guids does take up much space relative to an int. This is something i think you should...

  • RE: Query for nth lowest sequence in a group

    Are the sequence numbers always incremented with 1 per cuslink? If so there is an easier way to do this 🙂

    I ran my query and found out that one sequence...

  • RE: Extract duplicated records into new table!

    Don't know if this is usefull for you but the following script allows you to find the oldest version of the record and when you know that you could delete...

  • RE: how to pass a parameter to stored procedure of text more than 40000 characters of all type

    You could also create a SQL_STATEMENTS TABLE with an id text and link_id... Pass the id to the stored procedure and you can reproduce the SQL there with for example...

  • RE: CASE in WHERE Clause

    Perhaps you should consider rewriting your query, because i dont think this is the fastet way to do it. I noticed you used a case.. You can also use and...

Viewing 12 posts - 1 through 12 (of 12 total)