![]() Here is a method that uses the FLOOR and CAST function to truncate the time portion from a date. Below, is a DATEPART example that once again returns all the records that have a SAMPLE_DATE in ''.SELECT * FROM DATE_SAMPLE WHERE DATEPART(YEAR, SAMPLE_DATE) = '2003' AND DATEPART(MONTH,SAMPLE_DATE) = '04' AND DATEPART(DAY, SAMPLE_DATE) = '09'Using the FLOOR Function:As I have said before there are many ways to accomplish the same thing. With the DATEPART function you can build a WHERE statement that breaks apart each piece (year, month, day) of the SAMPLE_DATE and verifies that each piece is equal to the year, month and day you are looking for. This record would not be returned because when SQL Server converts the string '' to a date/time value it would be equal to the SAMPLE_DATE on record 4.Using the DATEPART Function:Another way to return the records that have a SAMPLE_DATE for a particular date is to use the DATEPART function. If only the greater than sign was used the SELECT statement would not return record 4. Here's what I found while playing around, please let me know if it helps you.SELECT * FROM DATE_SAMPLE WHERE SAMPLE_DATE >= '' AND SAMPLE_DATE =) expression instead of just greater than (>). I'd love suggestions on how to get rid of the absolute path within the sqlite-manager script.Okay, we're getting a little out of my league here, but I'll try to help. The only limitation of this approach is that it breaks when you move the application or rename it. You can do that by editing sqlite-manager.app/Contents/ist and setting CFBundleExecutable to sqlite-manager like this: CFBundleExecutable Now you have to tell OS X to run sqlite-manager instead of xulrunner. "$APP_PATH/Contents/MacOS/xulrunner" -app "$APP_PATH/Contents/Resources/application.ini" #!/usr/bin/env bashĪPP_PATH="/Applications/sqlite-manager.app" You can then create a wrapper script that runs the xulrunner within the generated app with the application.ini file as described here.įor example, put the following into sqlite-manager.app/Contents/MacOS/sqlite-manager and make it executable. Use the xulrunner -install-app command to create the application and then copy all contents of XUL.framework/Versions/Current into the generated application at /Applications/sqlite-manager.app/Contents/MacOS. Here's how you can make a self-contained application you can run from the Dock. (And, despite the stackoverflow page above noting that -install-app may not really be supported, it is in the XULRunner help listing - which I guess doesn't necessarily mean it'll work ) /Library/Frameworks/XUL.framework/xulrunner-bin -install-app Downloads/sqlitemanager-xr-0/ /Applicationsįollowing a suggestion below, I checked for an exit code. No application appears under Applications. When I run the following command in Terminal, with or without sudo, it just immediately returns to the command prompt. Here are the contents of the application.ini file: (c) 2008 - 2011 lazierthanthou I am able to run the app from Firefox using this command (after changing the max version in sqlitemanager-xr-0/application.ini to 11.0 from 11.0a1): /Applications/Firefox.app/Contents/MacOS/firefox -app ~/Downloads/sqlitemanager-xr-0/application.ini I am able to get the help listing with this command: /Library/Frameworks/XUL.framework/xulrunner-bin -h Stackoverflow: How to Install and run a XulRunner Application on Mac OS X? I have read and tried the suggestions here (though they're for version 6.0): Kiveo - Mac SQLite Manager Standalone App I have installed XULRunner 11.0 (xr) from here:ĭownloads - sqlite-manager - Extension for Firefox and other apps to manage any sqlite database - Google Project Hosting ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |