query

  • Hi All,

    My question is how can i find the chat messages from which user to which user strored in sql database.

    I'm able to run the reports below format.

    ID , DATE ,FROMID,TOID,BODY,USERID,FROM MAILID.

    Instead of from id , to id, i want from mail id , to mailid.

    like below format

    ID,DATE ,BODY USERID,FROM MAIL ID, TO MAILID.

    i have tried all the ways,but i am unable to find.

    Pls do the needful...

    thanks, kumar

  • I assume that Mail ID is a column you are trying to reference. If the table has a space in it you can use braces to denote it. Generally it is not a good idea to put spaces in objects... Using your example here's the syntax:

    Try this: ID,DATE ,BODY USERID,FROM [MAIL ID], TO [MAIL ID]

    Cheers,

    Brian

  • please find the tables and columns

    table 1:- messages - id,date,body,fromid,toid

    table 2:- users- userid,userri

    thanks, kumar

Viewing 3 posts - 1 through 2 (of 2 total)

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