User Profile

Collapse

Profile Sidebar

Collapse
Seun Ojo
Seun Ojo
Last Activity: Aug 23 '07, 07:11 AM
Joined: Aug 22 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Seun Ojo
    replied to SQL Running process
    First as for the problem u r tryin 2 solve; ur approach is not d optimal....or so i think...

    i would have added anoda column(say Archive) to d table dat contains d articles(lets say Articles Table)....The Archive column will have a bit data type; a value of 1 means d article is archive(as in: Archive? Yes! where yes is 1) n 0 means Not Archived....The default value will be 0, of course, for ds column

    So u can write a...
    See more | Go to post

    Leave a comment:


  • Seun Ojo
    replied to Update a column
    Note dat i didnt put d where clause....its no mistake....its based on d assumption dat u intend 2 change ol d records in d table or dat ol records r to be affected...
    u can put d where condition if mi assumption is wrong....
    dat way it will be something like ds for d second solution:

    Update Tabl
    set Colm = REPLACE(Colm,'-','')
    {where id = (specify criteria expression)}
    GO

    d curly signifies...
    See more | Go to post

    Leave a comment:


  • Seun Ojo
    replied to Update a column
    Lets say d table name is Tabl n d col to change is Colm

    try any of ds:

    Update Tabl
    set Colm = SELECT REPLACE(Colm,'-','')
    GO

    Or

    Update Tabl
    set Colm = REPLACE(Colm,'-','')
    GO


    Op it works....Be good man!
    See more | Go to post

    Leave a comment:


  • Seun Ojo
    replied to Converting strings to dates
    i op u tried d 2nd version not d first....ol d same

    try ds....

    update dwsubmit
    set authoreddate = select datepart(dd,aut horeddate) + '-' + select datepart(mm,aut horeddate) + '-' + select datepart(yy,aut horeddate)
    where id = 841
    See more | Go to post

    Leave a comment:


  • Seun Ojo
    replied to functions and procedures
    let mi start by saying im a stored procedure envangelist, lover n guru...so u can direct any problem or tots in ds direction to mi personally...

    Stored Procedures are precompiled functions that encapsulate some basic fxns...pretty much like functions in regular procedural languages like vb e.t.c; but its compiled once....n runs straight(faster ) when called...optimi zes network traffic

    Basically u pass parameters(or list...
    See more | Go to post

    Leave a comment:


  • Seun Ojo
    replied to SQL Round
    try floor(number/5) * 5 for the first part

    then:

    your answer above, lets say x:

    Final Answer = x * 0.30

    op dat wuz useful?
    See more | Go to post

    Leave a comment:


  • Seun Ojo
    replied to Converting strings to dates
    sorry i mixed it up

    update dwsubmit
    set authoreddate = (select datepart(dd,aut horeddate))+'-'+(select datepart(mm,aut horeddate))+'-'+(select datepart(yy,aut horeddate))
    where id = 841

    it should be ds way....sorry about dat...
    See more | Go to post

    Leave a comment:


  • Seun Ojo
    replied to Converting strings to dates
    I understand ur pain man....but u r doin it wrongly. Try this:

    update dwsubmit
    set authoreddate = (select datepart(author eddate,dd))+'-'+(select datepart(author eddate,mm))+'-'+(select datepart(author eddate,yy))
    where id = 841

    op it works for u....av fun!
    See more | Go to post

    Leave a comment:


  • Seun Ojo
    replied to Distinct
    u cannot use an expression directly on the column name, so try:
    "Select * from Events where EventDate >= " & FormatDate(Now( ),"YYYYMMDD") & " order by EventDate asc"
    See more | Go to post

    Leave a comment:


  • Seun Ojo
    replied to Changing DSN to DSN-Less
    Use this t replace what u av:
    *************** *************** *************** *************** *************** *********
    <%
    ' FileName="Conne ction_ado_conn_ string.htm"
    ' Type="ADO"
    ' DesigntimeType= "ADO"
    ' HTTP="true"
    ' Catalog=""
    ' Schema=""
    Dim MM_connme_STRIN G
    MM_connme_STRIN G = "Provider=SQLOL EDB.1;Persist Security...
    See more | Go to post

    Leave a comment:


  • Seun Ojo
    replied to Distinct
    First let mi say that MSSQL Server supports most(if not all) of the sql u write in Ms Access; it however builds on this to provide proprietary utility aggregate functions using T-SQL....
    So depending on ur calling application(fro nt end)...use 'select distinct' in ur SQL cmd to get distinct record temporarily or u just go 2 d database to do dat - select distinct into a temporary table, delete d table n insert d distinct records into a new table...
    See more | Go to post

    Leave a comment:


  • Seun Ojo
    replied to filtering problem
    u can try using yes or no is ur filter query....someth ing like:
    select * from news where archive = yes

    or

    select * from news where archive = no

    depending on wot ur intentions are....

    i expect u 2 make ur filter query dynamic...so dat d value parts are dependent on wot is returned from d form...

    As for d form part...I suggest u make use of checkbox....
    so on the...
    See more | Go to post

    Leave a comment:


  • Seun Ojo
    started a topic SQL Http Interface

    SQL Http Interface

    Hi!

    I know its possible to run query(s) over http...is it possible to turn d tables....

    As in:

    is it possible to make an Http Request from inside SQL SERVER [a stored procedure for example] to get data from another URL [XML or some plain formated text or message]...

    dis is actually possible in Oracle n some server side programming languages like Coldfusion n PHP....

    Im wondering...
    See more | Go to post
No activity results to display
Show More
Working...