Posts
 
Reputation
Joined
Last Seen
Ranked #169
Strength to Increase Rep
+11
Strength to Decrease Rep
-2
100% Quality Score
Upvotes Received
44
Posts with Upvotes
42
Upvoting Members
30
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
38 Commented Posts
4 Endorsements
Ranked #397
Ranked #157
~153.13K People Reached
About Me

Database Administrator. Web and database development professional. MCP: Microsoft Certified IT Professional: Database Administrator. Microsoft Certified Technology Specialist: SQL Server 2005.

Interests
rock music, web development, and databases
Favorite Tags

516 Posted Topics

Member Avatar for keanan

Hello, I use [URL="http://www.phpclasses.org/browse/file/919.html"]class.phpmailer.php[/URL]. It works for Yahoo, Hotmail, GMail, and I'm sure many others that I haven't tested. It also includes an example which is easy to follow.

Member Avatar for swati_7
0
3K
Member Avatar for nikesh.yadav

Here's a function I use sometimes. It explodes the address to get the domain name. It then checks for a Mail Exchange on the domain. This will work for bogus domain names but won't do anything for email addresses like [icode]bill@hotmail.com[/icode] or [icode]suzie@yahoo.com[/icode]. Try to keep in mind, there is …

Member Avatar for pritaeas
0
6K
Member Avatar for Ravenous Wolf
Member Avatar for ramseswar

Use Sessions for authentication. They will log the user off when the browser is closed. You shouldn't need to store a value in the db unless you want to show users activity (last login at...)

Member Avatar for cecece
0
1K
Member Avatar for cmgdev

I guess you mean this: [icode] <a href="http://www.google.com"> <img src="<?php echo get_bloginfo('url') ?>/serv67/cmg2/img/blog2.jpg" alt="pic" /> </a>[/icode]

Member Avatar for JorgeM
0
859
Member Avatar for lydia21

In order to submit variables to the second page, you'll have to find a way to get them inside of the form on the first page. On the first page, your form is empty, i.e. no variables actually make it in between the <form> and </form> tags. Use your loop …

Member Avatar for piyush16791
0
147
Member Avatar for agr8lemon

Not sure about the unique part, as a unique constraint will only support one null value in the column. It sounds like you potentially could have many. Use a check constraint to verify both aren't null: [code] ALTER TABLE TableA ADD CONSTRAINT CK_BothDepartsNotNull CHECK (departA IS NOT NULL OR departB …

Member Avatar for adam_k
0
1K
Member Avatar for solomon_13000

There are several ways to do this. Fortunately you at least have a primary key. Be smart and backup the database before attempting. Here's an example solution using a CTE: Create the test tables and populate: CREATE TABLE PassportTest( Id int not null ,Name varchar(25) not null ,IdentityNo1 char(5) null …

Member Avatar for buddylee17
0
157
Member Avatar for Fost

The master database has a scalar function, fn_varbintohexstr, for this. Example: DECLARE @text varchar(256), @varbinary varbinary(256); SET @text = 'A1B2C3'; SET @varbinary = cast(@text as varbinary(256)); SELECT @text OriginalString , sys.fn_varbintohexstr(@varbinary) HexString /* returns nvarchar(max)*/

Member Avatar for buddylee17
0
139
Member Avatar for MidiMagic

It's not pretty nor creative but is Valid XHTML 1.0 Strict: [code=html] <ol> <li style="font-size:24px"> <span style="font-size:12px">This text is 12px. The bullet number is 24px.</span> </li> <li> <span style="font-size:12px">This text is 12px. The bullet number is 12px.</span> </li> </ol> [/code]

Member Avatar for JesusFreak83
0
2K
Member Avatar for pete harby
Member Avatar for wandie

This is pretty common for programmers new to php. We'll need to see more code. Are you using echo or print before the header? [URL="http://www.tech-recipes.com/php_programming_tips1489.html"]Here's[/URL] an article about the error.

Member Avatar for Ami_Bogus
0
170
Member Avatar for kimmi_baby

This article was written in 2007 but still applies: http://www.search-this.com/2007/03/12/no-margin-for-error/ Priceless information for anyone in CSS hell.

Member Avatar for buddylee17
0
231
Member Avatar for aodpreacher

Yeah, you probably don't want to limit yourself to web development. Either stick with CS or find something that involves security. My school had an Master in Information Systems and E-Commerce degree that was pretty close to what your looking for.

Member Avatar for bjelline
0
296
Member Avatar for allena

JavaScript is executed by the browser on your local machine. JSP is executed by the server which hosts the site. So when you visit a page written in jsp, the server executes the jsp and then delivers the page across the internet connection to your browser. If any JavaScript is …

Member Avatar for umorenpaul
0
947
Member Avatar for ibpet11

Use the bit datatype for boolean. Valid values are 0 or 1. In the below example, Active is the bit column with a default value of 1 (true). [code=sql] CREATE TABLE ActiveUsers (UserId int NOT NULL, Active bit NOT NULL default 1) /*Register User*/ INSERT ActiveUsers (UserId) VALUES (123) --Whatever …

Member Avatar for buddylee17
0
90
Member Avatar for Srcee

I'm assuming by menu, that you mean a drop-down menu populated from a web application. Being a programmer, you'll have the tendency to perform iterations over result sets. This will perform very poorly when your row count gets higher. Save the iterations for after the db gives you back the …

Member Avatar for buddylee17
0
231
Member Avatar for jacksantho
Member Avatar for buddylee17
0
321
Member Avatar for webguru07

Try this. I haven't tested it but it should do the trick. The key is to use the @ sign on line 2 to prevent the error message from showing up on the clients browser. Also, if you add or die(mysql_error()) to the end of line 2, the script will …

Member Avatar for Vonzarovitzch
0
3K
Member Avatar for dominic23jones

Photoshop is the industry leader in photo editing. It's the program that almost every professional photographer uses. It's also great for editing images and exporting to the web. However, if you are looking to become a better web designer, you may find that Adobe Fireworks is what you are looking …

Member Avatar for IkramMirza
0
329
Member Avatar for enzogoy

An easy way to create an xls file from php is to create a tab delimited file with an xls extension. Here's an easy example. Create a folder named files and save the following php file in the same directory as the folder. [code=php]<?php $file="files/test.xls"; $f = fopen($file, "w+"); fwrite($f,"A1\tB1\t\nA2\tB2\tC2\t\n\t\tC3"); …

Member Avatar for mafhh14
0
5K
Member Avatar for Silent-Regret

Try modifying the following to pull from the table, rather than comparing the date variables: [code] DECLARE @intime DATETIME DECLARE @outime DATETIME DECLARE @time int--total seconds DECLARE @days int, @hours tinyint, @minutes tinyint, @seconds tinyint SET @intime = GETDATE() SET @outime = DATEADD(S, 3663, @intime) SET @time = DATEDIFF(S,@intime,@outime) SET …

Member Avatar for Silent-Regret
0
238
Member Avatar for waqar100

urtivedi has given you 2 good examples that will work. In SQL Server 2008, there's a 3rd option which utilizes the new [B]date[/B] datatype: [code] SELECT * from tablename where CAST(starttime AS date) = CAST(endtime AS date) [/code] [url]http://msdn.microsoft.com/en-us/library/ms186724.aspx#DateandTimeDataTypes[/url]

Member Avatar for buddylee17
0
105
Member Avatar for moone009

What is the point of the routesequence?? You're just storing the same value twice... Also, each row should be unique, whether it be an identity on the id or a composite value. Rows 1 & 2 are duplicates, as are 6 & 7. This design violates first normal form, will …

Member Avatar for moone009
0
184
Member Avatar for hhaannyy
Member Avatar for AngelicOne

Here's a simple example of how to use output variables in stored procedures: [code] CREATE PROC dbo.ReturnString @string VARCHAR(500) ,@outputString VARCHAR(500) OUTPUT AS SET @outputString = @string GO [/code] Then to call the stored procedure, you'll want to declare a variable and assign the value like so: [code] DECLARE @output …

Member Avatar for buddylee17
0
139
Member Avatar for axman1000

This will work with 2008. With 2005 or earlier, you'll need to use datetime and the convert to varchar to strip the time portion off. [code] DECLARE @yesterday DATE SET @yesterday = DATEADD(D,-1,GETDATE()) [/code]

Member Avatar for axman1000
0
229
Member Avatar for f_atencia

You can't insert into 2 tables with one statement. You can grab the identity of the parent table and insert into the child table with 2 statements: [code] DECLARE @AppValId int INSERT Products (Item) VALUES ('Pepsi') SET @AppValId = @@IDENTITY INSERT ProductAttributes (ApplicationValueID,Attribute,Value) VALUES (@AppValId,'Price','2.99') [/code]

Member Avatar for buddylee17
0
106
Member Avatar for aplee

Your subquery is returning multiple rows. This could be fixed with a join: [code] update ML set ML.rptprobtype = MD.[Problem Type] FROM tbl_M_MasterLogs ML JOIN tbl_rpt_MasterData MD ON ML.CaseNo = MD.CaseNo [/code]

Member Avatar for buddylee17
0
170
Member Avatar for judithSampathwa

If your SQL Server is 2005 or greater, you can use EXCEPT and INTERSECT to find these. List email addresses that are in both Table1 and Table2: [code] SELECT email FROM Table1 INTERSECT SELECT email FROM Table2 [/code] List email addresses that are in Table1 but not in Table2: [code] …

Member Avatar for buddylee17
0
122
Member Avatar for MARKAND911

Use BETWEEN and cast the varchar to date: [code] select * from mytable where dtcreated BETWEEN CAST(fromdate AS DATE) and CAST(todate AS DATE) [/code] Edit: This works on SQL Server 2008 and up. Cast to datetime if you are using an earlier version.

Member Avatar for Akash Saikia
-1
197
Member Avatar for moone009

Assuming SQL Server 2005 +. The maintenance plan is typically an ssis package stored either in the database or on the file system. Yes, you can edit these packages just like any other SSIS package. Expand Management-> Maintenance Plans and double click the plan. The plan should open for editing. …

Member Avatar for buddylee17
0
65
Member Avatar for vsmash

It's not difficult if you are already familiar with SSIS. Having experience in .net development will be a big plus as well, as 2005 supports vb.net and 2008 supports both vb.net and c#.

Member Avatar for vsmash
0
212
Member Avatar for emaduddeen

Defining the column as Identity, means that each value is unique and will never repeat. It is an identifier for the row.

Member Avatar for emaduddeen
0
182
Member Avatar for azharrumani09

First, please use code blocks when posting code examples. Example: [noparse][code]--put your code here[/code][/noparse]. Second, you are using a cursor to loop through and populate dynamic sql. Cursors should be a last resort and the same goes for dynamic sql. This code will be a nightmare to maintain and debug. …

Member Avatar for BitBlt
0
220
Member Avatar for gmark@svs.com

There are many ways to export data: 1.) Export data wizard 2.) SSIS 3.) bcp utility 4.) clr stored procedure . . . It's all up to what you are comfortable with.

Member Avatar for BitBlt
0
236
Member Avatar for fiju

See here: [url]http://sqlblog.com/blogs/peter_debetta/archive/2007/03/09/t-sql-urldecode.aspx[/url] You could also create a CLR function utilizing the HttpUtility.UrlDecode Method.

Member Avatar for debasisdas
0
81
Member Avatar for lordmwesh

The easiest way to bring the db back online would be to drop it then attach the db, specifying the correct data and log files. Dropping the db is key, because it will clear the db's info from the master and insure that your attachment will be clean. [code] ALTER …

Member Avatar for vuyiswamb
0
190
Member Avatar for raghujosh

You have to declare the variable @letter and assign it a value: [code] DECLARE @letter CHAR(1) SET @letter = 'A' SELECT First_Name FROM dbo.Names WHERE First_Name LIKE '%' + @letter + '%' [/code]

Member Avatar for raghujosh
0
142
Member Avatar for moone009

Use a GROUP BY with the HAVING clause. Haven't tested, but it should work. [code] select PREMISEADDRESS1 from PREMISE PREM inner join STATUS ST on PREM.LOCATIONID = ST.LOCATIONID inner join SUPPLIES SUP on ST.STOPID = SUP.STOPID group by PREMISADDRESS1 HAVING COUNT(SUP.ITEMID) > 10 [/code] [url]http://msdn.microsoft.com/en-us/library/ms180199.aspx[/url]

Member Avatar for buddylee17
0
79
Member Avatar for varsha solshe

Use [B]osql[/B]: Start->Run->cmd This will connect to the default instance on your local machine and return the instance information: osql -E -q "SELECT @@VERSION" [url]http://msdn.microsoft.com/en-us/library/aa213088%28v=sql.80%29.aspx[/url]

Member Avatar for ronwarshawsky
0
96
Member Avatar for MrCapuchino

Yes, you can install multiple instances of sql server on the same box without any issues. It's fairly common for developers to install Sql Server Express with Visual Studio and then later install a full version of Sql Server.

Member Avatar for MrCapuchino
0
189
Member Avatar for wewehalim

Right click the connection manager and select properties. Scroll through the properties until you see Expressions. Add an expression for the Connection String property. [code="SSIS"]"C:\\filename " + (DT_WSTR,4)YEAR(@[System::StartTime]) + RIGHT("0" + (DT_WSTR,2)MONTH(@[System::StartTime]), 2) + RIGHT("0" + (DT_WSTR,2)DAY(@[System::StartTime]), 2) + ".csv"[/code] will return C:\filename 20110128.csv. The date in the filename will …

Member Avatar for buddylee17
0
60
Member Avatar for chaoticabyss99

Sql server is designed to be ran on a server, and that's why it says server name. It's the computer name. If you have multiple instances of sql server installed, then it will be computer name\instance name. Also, since the management studio and the database engine are both on the …

Member Avatar for chaoticabyss99
0
205
Member Avatar for judithSampathwa

The width and height are in the properties panel. Also, make sure you are viewing the reports in IE. I don't know why they can't make the reports cross browser compatible, but they won't render or export correctly in other browsers.

Member Avatar for judithSampathwa
0
173
Member Avatar for realnsleo

If you have a good product and think it will make money, do what every other startup company does. Go to the bank, take out a loan, and buy the encoder on the idea that it will pay for itself.

Member Avatar for Moderns
0
105
Member Avatar for DCSS

Well, lets see. Many users can be associated with a certificate and Many certificates can be associated with a user This is simply a many to many relationship. Here's a suggestion: [code] CREATE TABLE Users( userid int identity not null primary key, username varchar(25) unique not null ) CREATE TABLE …

Member Avatar for DCSS
0
197
Member Avatar for saurabhtiwari

This logic is better placed in a stored procedure that can be called from the application. There is no reason to loop through a result set and send a sql command across the network for each individual update. [code=sql] UPDATE perclientreport SET Bill = (Extrausage * 1024)/100 WHERE Bill > …

Member Avatar for ShahanDev
0
114
Member Avatar for sarifah

The database engine runs under a user context. You can open services (Start->run->services.msc) and scroll down to SQL Server (MSSQL Server). Note the user under 'Log On As'. This user must have permissions to that directory.

Member Avatar for buddylee17
0
265
Member Avatar for Tank50

[code]--This will tell you about error 8114 SELECT description FROM master..sysmessages WHERE error = 8114 AND severity = 16 AND msglangid = 1033 [/code] Try wrapping your code in try catch to get more details. Example: [code] BEGIN TRY --This will cause an error DECLARE @number int SET @number = …

Member Avatar for buddylee17
0
671

The End.