User Profile

Collapse

Profile Sidebar

Collapse
Tania Louie
Tania Louie
Last Activity: Sep 22 '11, 10:19 AM
Joined: Nov 23 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Tania Louie
    started a topic Converting Number to Time in SQL

    Converting Number to Time in SQL

    Hi,

    I just need help coverting a number to a time in SQL.

    Currently it is returning a number of 1260 for the time and I need it to show as the actual time of 9:30.

    Not sure what to use here.

    Thanks :)
    See more | Go to post

  • Condensing Multiple Rows Of Data into One Row of Data (into Columns)

    Hi :)

    I have the below data and I need to get into into just one row.

    employeecode Monday Tuesday Wednesday Thursday Friday Saturday Sunday
    502025 Rostered NULL NULL NULL NULL NULL NULL
    502025 NULL Rostered NULL NULL NULL NULL NULL
    502025 NULL NULL Rostered NULL NULL NULL NULL
    502025 NULL NULL NULL Rostered NULL NULL NULL
    502025 NULL NULL NULL NULL Rostered NULL NULL

    ...
    See more | Go to post

  • Tania Louie
    started a topic Changing Rows to Columns

    Changing Rows to Columns

    Hi All,

    I am trying to convert a table of data into columns (like you can in EXCEL using the copy and paste as 'transpose' button)

    I have the below data:

    Code Day Shift
    502025 Monday Rostered
    502025 Tuesday Rostered
    502050 Monday Not Rostered
    502050 Tuesday Rostered


    And would like to make it look like this:

    ...
    See more | Go to post

  • Ahhh... I have just realised that my databases are not exactly the same and therefore there are NULL's because the fields aren't set up in some of the databases.

    Is this the best way to join them?
    See more | Go to post

    Leave a comment:


  • Sorry I mean't the last reply (#3) was two different scripts.
    See more | Go to post

    Leave a comment:


  • Sorry - so I have figured out how to join the databases now, but the join isn't working on the third database although it isn't failing as the employees are there, it just has NULL in the cell. I have just written the below basic formula:

    use databasea
    go

    select
    employee.employ eecode,
    employee.firstn ames,
    employee.lastna me,
    employee.locati oncode,
    location.descri ption,
    ...
    See more | Go to post

    Leave a comment:


  • Sorry - I'm only learning SQL at the moment so I might not have it right, but this is an example:

    use databasea
    go

    select
    employee.employ eecode,
    employee.firstn ames,
    employee.lastna me,
    employee.locati oncode,
    location.descri ption,
    employee.positi oncode,
    position.descri ption

    from employee
    left outer join location location on
    (employee.locat ioncode...
    See more | Go to post

    Leave a comment:


  • Tania Louie
    started a topic Joining Databases with Left Outer Joins

    Joining Databases with Left Outer Joins

    Hey All,

    I really need some help here!

    I currently have 3 databases that I am writing a script for to extract data. I need to join these databases together to get one extract, but I have a whole bunch of data that I need and from different tables in the database. Therefore I have left outer joins to join up tables in there.

    SQL won't let me join the databases if I have left outer joins as well, but I...
    See more | Go to post
No activity results to display
Show More
Working...