Another quick server management studio quick tip. We had just set up a test server for our project, but everytime I used SQL server management studio, and ran a query, it would run it on Master database and not on our database. Just for convenience, you can set up the default DB as so:
1. In [...]
Entries Tagged as ‘SQL’
February 5, 2008
Setting your default database in SQL Server Management Studio
January 23, 2008
SQL tip #2
This one will be singular as its a small tip I just learnt a minute ago.
I am currently converted some Access forms and Reports, and somehow this one record source didn’t work:
SELECT TOP 100 PERCENT pl.PositionID, (SELECT Title FROM atbv_Personnel2_Positions WHERE PositionID = pl.PositionID) AS Title, pl.Percent AS PosPercent, pl.Location, pl.LocationID, p.Name, pl.FromDate, pl.ToDate, ISNULL(pl.MhrsRate, [...]
January 18, 2008
displaying numbers with thousand separator and .00
On my previous project, I needed to select a number stored in the database, such as 36749384 or 934834.23 which were monetary values, and display them as 36,749,384.00 and 934,834.23. Basically, in monetary terms.
I was thinking of using string manipulation but that would only work in my .net development, so if you need these kinds [...]
January 16, 2008
SQL tips #1
definitely purely for newbies, helpful tips my colleague in Houston passed on to me, so thanks to Alex, SQL guru.
Playing it safe
This is very useful if you are running SQL that will change data or insert data. So this is how I recently wrote a buncha of SQL codes that would modify menus, [...]




