Jump to content

Search the Community

Showing results for tags 'MSSQL'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 11 results

  1. Hi Guys, I have been surfing the internet looking for a prompt app dev software because I have seen one of Appoly's and Red C's mobile applications which looked amazing. I am currently creating a sports app that provides quizzes and information on athletes. What would be the best mobile application software?
  2. Can any one tell me how to add(sum) two columns from two different tables but from same database. please send me exact query if you know..
  3. So who's tried it? I know Marc just got a book on it and started studying for certifications. I have yet to take a look.
  4. Have had people ask me in the past what is the best way to go about optional parameters when using a stored procedure in sql server, so thought I would put up the way in which I do this Example CREATE PROC blahblah @startdate DATETIME, @enddate DATETIME, @customerid INT AS SELECT * FROM myOrders WHERE CustomerID = @customerid AND orderdate BETWEEN @startdate AND @enddate Now lets say in the above we want to have customerid as optionally set. To do this we would need to give @customerid a default value. So we do this by adding "=NULL" to the end which will give it a defa
  5. 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
  6. Thought I would post up a bit of an example on row numbers within MSSQL. This is something that can come in handy in a multitude of senarios and there are a couple of handy things you can do with in sql server. Lets say I have a dataset consisting of just name, value and I want the top 10 with the highest value first along with their rank. This is somewhere that adding a row number would be quite handy. So do this you would use the following: SELECT TOP 10 ROW_NUMBER() OVER(ORDER BY value DESC) as RANKING, [name],[value] This will give me a row number next to each re
  7. 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
  8. 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())
  9. 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
  10. This is a quick and easy way to change the owner of an object if needed with sp_changedobjectowner sp_changeobjectowner 'oldownername.nameofobject', 'newowner' example: sp_changeobjectowner 'nathan.p_Customer1', 'nriley' The following changes the owner from "nathan" to "nriley"
  11. The following script will allow you to search all the data in all the tables within a certain database. This is useful for poorly labeled databases or when you have no data diagram to work off. If you know a unique piece of data that you see within the application itself you can then query the database for it. However, I wouldn't recommend running it on a production server during business hours. All you need to do is replace "DatabaseName" with you database name. Then execute it and it will be written into your database. Then just call it with the string of text you are
×
×
  • Create New...