Categories
- Applications (4)
- Code (60)
- Coldfusion (42)
- CSS (6)
- FTP (1)
- Hosting (1)
- Javascript (10)
- JQuery (4)
- Mainframe (1)
- Marketing Tactics (1)
- my portfolio (4)
- News (3)
- Problems & Fixes (18)
- Products (4)
- Randomness (6)
- Rants (1)
- Snippets (33)
- Software (1)
- SQL (14)
- Uncategorized (1)
- Web Development (1)
Blogroll
Archives
Meta
Category Archives: SQL
Date Subtraction or Difference
Sometimes you need to know the differences between two dates in days months years whatever. SQL SERVER select datediff(day,date1, date2) as days_diff, datediff(month,date1, date2) as months_diff… Can also do year, quarter, week, hour, minute, and second dateparts. Dates can be … Continue reading
SQL using case to Identify blanks vs NULLs
I had a strange issue driving me nuts today. I had data with null values and could use isNull to capture most of them and assign a new value to the field. However about 10 records would not accept the … Continue reading
Posted in Code, Snippets, SQL
Tagged Blanks in Data, Null Data, Null vs Blanks, SQL Case
Leave a comment
SQL Numbering a table in sequence without IDENTITY
This is for renumbering of the rows in a table with out IDENTITY. — add a rowid to the table ALTER TABLE #table_name ADD rowid int null — set the rowid vales to zero UPDATE #table_name SET rowid = 0 … Continue reading
Posted in Code, Snippets, SQL
Leave a comment
SQL – Synchronizing identity field between two tables
One thing that DBAs often have difficulty with is moving data from one database to another database. This may be to synchronize a development environment with databases or tables on other servers with the same data values. Fortunately MSSQL provides … Continue reading
Posted in Code, Snippets, SQL
Leave a comment
CFSelect Multiple and ListQualify
If you need a multiple selection list and need to display its values dynamically from a query you can do this in one line of code within your form. <cfquery name=”getstatus” datasource=”myDSN”> select All as status from orderstable UNION ALL … Continue reading
Posted in Code, Coldfusion, Snippets, SQL
Leave a comment