Sponsored White Papers, Webcasts, and Downloads
TechRepublic Resources
- Convert numbers to fractions using SQL Server
- I recently worked on an interesting problem that involved converting a decimal number to a fraction value in SQL Server. At first glance, it seemed reasonably simple, but after digging into the actual code a bit, I realized it was rather challenging. Here's how you can write...
- Tags: Fraction, Microsoft SQL Server, Server, VARCHAR, Tim, Databases, Enterprise Software, Software, Data Management, Tim Chapman
- Blog posts 2008-04-30
- Sorting character strings using SQL Server
- You are probably familiar with the built-in sorting abilities of SQL Server for columnar data, but what if you need to sort character strings stored in SQL Server fields? Even though this may not be a common need for most users, this issue may come up from time to time. I'll demonstrate...
- Tags: Algorithm, Function, Microsoft SQL Server, Server, String, Character, VARCHAR, Tim, Engineering, Databases, Enterprise Software, Software, Data Management, Tim Chapman
- Blog posts 2008-03-03
- MS Access 2000 Leading zeros
- Is there a way of adding and storing leading zeros to a number in a table field without them being entered?ie; 7001 to be stored as 007001 and35035 stored as 035035Sort ofYou'll need to make the column a char type if you want to store it, or you could just...
- Tags: jonb@..., Microsoft Corp., VARCHAR, Microsoft Access
- Discussion threads 2007-09-14
- access 2002 and calculating time fields
- I have created a access database whose table consists of records with a overtime data field containing hours and minutes (HH:MM). I would like to create a total field at the end of the report that will give me the total over time for all records.How can I do...
- Tags: access 2002, CONVERT, integer, office 2002, office xp, OVERHOURS, OVERMINUTES, shawnj985@..., SQL, VARCHAR, windows
- Discussion threads 2006-02-03
- SQL basics: String data types
- Data type implementations vary from database to database, but a working knowledge of the SQL specification will always give you a good idea of what's going on. This article breaks down the basic rules of deploying string data types.SQL data types dictate how a field's content will be handled, stored,...
- Tags: Storage, Databases, Shelley Doll, SQL, data type, CHARACTER VARYING, database
- Technical articles 2002-09-18
Additional Resources
- About sql server 2k trigger/procedure
- When a table is modified, I want a trigger to export the data of table to a file,such as *.txt or other. I have tried to realize that by using following codes, but failed. create trigger tr_ActionLog on ActionLog for update,insert, delete AS SET NOCOUNT ON --declare @strSql varchar(255) exec dbo.ExportData2Csv 'liulzh',...
- Tags: Databases, @strSql, ActionLog
- Q&A 2005-06-01
- Dynamically adding a column to temp table
- Hi,I am trying to Dynamically add a column and also update the temp table. But I am getting error message like "Server: Msg 170, Level 15". Is there any way that I can solve this. Very urgent. Thanks in advance. My code goes like this. set @tempvar = 'name' +...
- Tags: laxmijk11@...
- Discussion threads 2007-09-26
- SQL constraint question
- Hello, does anyone know how to do this? I'm supposed to for an assignment and dont even know how to begin. I was hoping someone might be able to explain it. Using the following CREATE TABLE statements, add AND EXPLICITLY NAME the listed constraints specified for each table. Use the...
- Tags: bradq@..., CREATE TABLE, Null, programming, SQL, VARCHAR2
- Q&A 2005-11-08
- Microsoft Query
- I have created a sql query with table variables when I run the SQL in microsoft query it brings back the data, however when I try to return the data to excel it drops all the information & when I try to edit the query the SQL statement is blank.1....
- Tags: #SessionsByRegion, Microsoft Corp., Peter.mcauley@..., SessionsByRegion, software, SQL
- Q&A 2005-06-08
- MySQL and MySQL SELECT
- does anybody know why this works in MySQL monitor and not with PHP& MySQL??mysql> use test_db;Database changedmysql> select * from authorised_users;+--------------+------------------+--------------+---------------+----------+-------------+| user_name | company | user_id | user_password | account | access_code |+--------------+------------------+--------------+---------------+----------+-------------+|...
- Tags: OPEN SOURCE, Databases, paulcheung@..., MySQL, PRI, Nancy
- Discussion threads 2007-09-21
- Boost performance and use less disk space with hash keys
- Question on sample SPI don't see where you are referencing the calculated field Name_GroupName_hb. Your SP example shows a comparison of @id against hashkey, but you are creating the hashkey field on the fly. Are you saying I should create a field in the Department table called Name_GroupName_hb...
- Tags: @id, LIKE, Name_GroupName_hb, sql server, strings, hashkey, SirPssD, software, disk, performance
- Discussion threads 2006-03-07
- Insert varchar value to number field
- Can i insert the values like thisINSERT INTO sara SELECT To_Numberagreementid from empHere sara table have agreementid as number(18,4)emp table have agreementid as varchar(255) but it contains only number in that field.While inserting i got ORA-01722 INVALID NUMBER error. I check there is not character in that field.Can anybody help...
- Tags: INSERT, SELECT
- Discussion threads 2006-06-08
- Building a data values dictionary with SQL
- Include Object OwnerA useful little utility is you need that type of thing.I'd suggest adding an owner to the results table to allow for different people owning the same table / view.Automate the ProcessYou could automate the process so it goes through the entire database - see below.(I've excluded the...
- Tags: GO CREATE VIEW, kenneth.leake@..., Null, SELECT, SELECT Name, software, SQL
- Discussion threads 2005-04-26
- SQL Output
- Hi thereI need to have a basic select statement to run automatically, which I can do, but I need the results to be saved to a txt file and then emailed to a group of users, I used to do this in oracle by using the spool statement, any ideas?hi,may...
- Tags: Declare @mailRecipients, e-mail, header, job, software, SP, SQL, tim.williams@...
- Q&A 2005-10-05
- SQL Server 2000 Grouping...?
- Tables Alias---------------------- --------------Employees eeSkills skEmp_skills eseEmployee fields (table for all employees, listing only relevance fields)Emp_id PKLast_nameFirst_nameEmp_deptSkill Fields (table for all skills, listing ony relevant fields)Skill_id PKSkill_descEmp_Skill fields table which assigned employees skills are maintainedSkill_idEmp_idThe employee table is your typical employee table. There are unique emp_id’s for all employees. This report will...
- Tags: #tmpTest VALUES, Cook Supervisor Barker, Mickey DFGHJjklm Prep Cook Frost, Microsoft SQL Server, Microsoft SQL Server 2000, parier, programming, tmpTest VALUES
- Q&A 2006-02-27
- Cleaning up imported data in SQL Server
- Arthur Fuller describes how his server was able to analyze the content of hundreds of columns in 62 million rows in about an hour. Get all the details in this SQL Server tip. My current project involves a 62 million row table with more than 500 columns. The...
- Tags: Microsoft SQL Server, Arthur Fuller, Databases, server, SQL Server Newsletter, Column, Enterprise Software, Servers, Software, Data Management, Hardware
- Technical articles 2007-02-05
- SQL Server Dates Pre 1900
- I am using DTS to transfer data from a Progress database to SQL Server 2000. Unfortunately, due to poor data collection, there are dates prior to 01/01/1900 in the progress database that cause the process to fail (I believe due to the fact that SQL does not support dates prior...
- Tags: dateTime, Microsoft SQL Server, munrrob, programming, server
- Q&A 2006-01-30
- sql function
- how to use exec statement in udf function to excute a variable which given as select statementDo you meanDeclare @MyQuery VarChar(500)Select @MyQuery = "Select * From MyTable"Execute (@MyQuery)You have to put the parentheses in.
- Tags: software, SQL, thiyagarajan.srinivasan@...
- Discussion threads 2007-01-02
- Creating a Text box that calculates a sum.
- I've created a database, 1 table has VesselIDPK, date, tank name (e.g. 1, 12 Mar 2007, Pacific Princess), tankTypeFK and the other has TankTypeIDPK, type (e.g. 1, Small, Large, Medium). They are related so it shows for each VesselIDPK this is the type of Tanks.I've created a report that pulls...
- Tags: Databases, r_ramlogan@..., VesselIDPK
- Discussion threads 2007-04-27
- Building a data values dictionary with SQL
- When a client asked a developer to construct a data values dictionary, the client was actually referring to a list of the distinct values in various columns and tables. Check out the basic SQL that was developed to fulfill this client's request. TechRepublic's free SQL Server newsletter, delivered each...
- Tags: SQL, Databases, Arthur Fuller, Programming languages, data values dictionary, distinct value, SELECT DISTINCT, SQL Server Newsletter, TechRepublic Inc., Procedure, Column, Software Development, Software/Web Development, Enterprise Software, Software, Data Management
- Technical articles 2005-04-25
- << Previous
- page 1 of 1
- Next >>