Jump to content

Search the Community

Showing results for tags 'query syntax'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome
    • Announcements & News
    • New Arrivals
  • Web Development
    • Programming
    • Database Development
    • Server Administration
    • Hosting & Domains
    • Frameworks
  • Web Design
    • HTML & CSS
    • Graphics & Multimedia
  • Desktop Discussion
    • Linux Development
    • Windows Development
    • Mac/Apple Development
    • Hardware Discussion
  • Marketing & Business
    • Advertising, Marketing, Monetization & Social Media
    • Search Engine Optimization & Traffic Building
    • Buy, Sell or Trade
  • Prodjex Web Development Applications, Tools and Plugins
    • IP.Board Applications and Plugins
    • Web Tools
  • The Developer Dump
    • General Chat

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 5 results

  1. Sometimes if the database is not designed correctly you will find dates stored as text values. When trying to compare dates to text you will have problems and it's not efficient. So that's where the cast function comes in. Table: Invoice Field: InvoiceDate Data Set: 20080515 20081025 20070113 20091007 Expected Data Set: 05/15/2008 10/25/2008 01/13/2007 10/07/2009 To do this simply cast the field as a date: select cast(InvoiceDate as datetime) from Invoice
  2. My below code isn't returning data for <h1><?php echo($query['id']); ?><h1> What am I missing? <?php //Connect to the Database $host = localhost; $username = db_user; $password = 'pass'; $connect = mysql_connect($host,$username,$password); //Select the Database $db = 'db_pm'; mysql_select_db($db); //Query the needed data $query = "select id,userid,title,description from projects where id=1"; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); ?> <link href="../assets/front.css" rel="stylesheet" type="text/css" /> <?php inclu
  3. Some time ago I was reading data from a flat .txt file and inserting it into my database. My table in the database was only setup to handle 40 characters for the company or person's last name. If it was a company some would be longer than 40 and my job would fail. I chose to fix it with the substring function in MSSQL. Table: Debtor Field: RespLName My original code: select case when ltrim(rtrim(RespLName)) is null then P.LastName else ltrim(rtrim(RespLName)) end as LastName from Debtor After adding the substring function: select case when ltrim(rtrim(substring(RespL
  4. With this example I was trying to subtract 30 days from the current date. You can do this with the dateadd() function in MSSQL. select getdate(day,-30,getdate())
  5. A while back I was trying to round some numbers to only 2 digits after the decimal in MSSQL. I figured out how to do and wanted to share. Name of Table: Invoice Field Name: BalanceDue Data Set: 100.0001 34.532 49.4732 234.567000 Expected Data Set: 100.00 34.53 49.47 234.57 To do this you can use the ROUND function within MSSQL. select round(BalanceDue,2) from Invoice
  • Create New...