rawbee
Replies to this thread:

More by rawbee
What people are reading
Subscribers
:: Subscribe
Back to: Computer/IT Refresh page to view new replies
 SQL Problems n Tips

[Please view other pages to see the rest of the postings. Total posts: 26]
PAGE: <<  1 2  
[VIEWED 11753 TIMES]
SAVE! for ease of future access.
The postings in this thread span 2 pages, go to PAGE 1.

This page is only showing last 20 replies
Posted on 05-15-08 11:36 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Hey Sajha guys,

This thread is dedicated to all SQL professonals/Learners where we can discuss about SQL problems. you can post any tips related to SQL. Hopefully you guy will post ur poblems n tips to share with other sajha pps

thanks


 
The postings in this thread span 2 pages, go to PAGE 1.

This page is only showing last 20 replies
Posted on 05-15-08 4:18 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Great Job rawbee!!

Hey guys, I know this thread is not meant for this, but if u guys really want to start learning from scratch follow this link, its really helpful. This is for the beginnners.

http://www.w3schools.com/sql/default.asp


 
Posted on 05-15-08 4:23 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Khusbhu am gonna post some begining vedio tutorial this weekend.

and thanks for techguy. really appriciate for ur support.

keep posting....


 
Posted on 05-15-08 10:25 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

some other small tip for starters are

NULL is not equal to '' (blank)some time you save '' in your rows thru apps and web apps so to help with that try

SELECT * FROM SOMETABLE WHERE ISNULL(COLUMNNAME, '')<>''

i like to play with isnull a lot
lets say u have a proc with @value1 int=NULL lets say you want to filter the rows when the @value1 is not null

fastest way to do this is

SELECT * FORM SOME TABLE WHERE ISNULL(@value1, COLUMNYOUWHATTOFILTERBY)=COLUMNYOUWHATTOFILTERBY

similarly another ISNULL trick to substitute CASE is

lets say you have a query

SELECT
     COLUMN1,
    CASE COLUMN2 IS NOT NULL THEN
          COLUMN2
     ELSE
           COLUMN3
     END AS SOMECOLUMNNAME

You can do the same with

SELECT COLUMN1, ISNULL(COLUMN2, COLUMN3) AS SOMECOLUMNNAME

 


 
Posted on 05-16-08 8:53 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Thanks Cyberdude..keep posting ur tips...\

TIPS : How to backup database with datetimestamp in file name?

USE master;

DECLARE @FileName NVARCHAR(1024)

SET @FileName = 'F:\data\AdventureWorks2008\backup\AW2008'+REPLACE(REPLACE(CONVERT(varchar(100), GETDATE(), 100),':','_'),' ','_')+'.BAK'

SET @FileName = REPLACE(@FileName,'__','_')

PRINT @FileName

BACKUP DATABASE AdventureWorks2008 TO DISK = @FileName WITH NOFORMAT, INIT, NAME = N'AdventureWorks2008-Full Database Backup'

GO

Is that helpful for you????????

Continue..............


 
Posted on 05-20-08 11:14 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Tips :How to count Sundays between two dates?

USE AdventureWorks

DECLARE @StartDate DATETIME, @EndDate DATETIME

SET @StartDate = '2009-01-01'

SET @EndDate = '2010-06-01'

SELECT Sundays=COUNT(*)

FROM (SELECT TOP (DATEDIFF (DAY, @StartDate, @EndDate) +1)

[Date] = DATEADD(DAY, ROW_NUMBER()

OVER(ORDER BY c1.name, c2.name), CONVERT(char(10),@StartDate-1,110))

FROM sys.columns c1

CROSS JOIN sys.columns c2) x

WHERE DATEPART(dw,[Date]) = 1;

 

Result:

Sundays
74

 

Continue...................


 
Posted on 05-20-08 11:34 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

रवी त खतराको SQL गुरु रहेछ यार।

 

Last edited: 20-May-08 11:46 AM

 
Posted on 05-20-08 1:29 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

hehe  suman2 . testo खतरा ni chhunia just working this fields from couples of years. so just sharing my experiances and trying to get some tips from others too.....
 
Posted on 05-21-08 9:39 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Hello guys,

Sorry for unable to post video turotrials last weekend. actually those file are in WMV and huge in size. I am trying to convert into another format but dint get any free software for that. Do you guys have any idea for those software that converts WMV file and can split files?


 
Posted on 05-21-08 11:31 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Hi rawbee,

Its nice you have started the thread for SQL tips..really good.. I am a beginner and wanted to work as a DBA rather than a developer coz i dont have dev skills.. but want to learn. I know all the things like scipts all the things but the problem is like i have no confidence in writing scripts or you can say i do not know to create logics.. Can you give me tips what kind of job will be there and what you have to do?? Your project experience I mean....

Thanks


 
Posted on 05-21-08 12:22 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Stylish:

It is always good to start with Developer. I started my career as a BA and then Oracle Dev/DBA and then now in both SQL and Oracle.

there are few standard things that you have to do as a DBA:

1. Writing Scripts such as restore db, backup db, sps to generate reports of several jobs in the server, script to monitor the performacne of the database, finding size, growth of the databases to find the bottlenecks, and etc.

2. SPs and sheel script to maintain, manage and tune the database.

3. Backup the DBs.

4. Restore the DB.

5. Check the jobs every day to make sure they are running properly and fix them if failed..

6. Make database up and running.

7. Tune and optimize the database.

 

These are standard jobs i do as a DBA. There will be a whole list.

Let me know if you have any specific questions from Database perspective, i will be more than happy to answer or help you out whatever i know. Thank you and good luck

 


 
Posted on 05-21-08 1:37 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

stylish ji:

Yes I agree with acbel ji. Lots of guys think DBA is easier then Developer  considering only using GUI tools and wizards, in fact it’s true in some way but when you get real problems in DBA, you have to solve it immediately but as far for Developer they get certain deadlines for specific task. And DBA jobs are more responsible and risky job too.

 

If you have developer experience you can move into DBA easily DBA-Dev is not so easy. In MS SQL the main Tasks are:

  • Installing and upgrading SQL Server
  • Monitoring the database server's health and tuning it accordingly
  • Using storage properly
  • Backing up and recovering data
  • Managing database users and security
  • Establishing and enforcing standards
  • Performing data transfer
  • Setting up and maintaining data replication
  • Setting up server scheduling
  • Providing 24-hour access
  • Working with development teams

But if you chose as MS SQL developer you have 3 major fields make you carrier:

-         Report Developer

-         ETL(Integration service) developer

-         Data Analyst

 

The main Responsible for developer as vary on their job but basically the following main tasks are:

-         Write a function and store procedures.

-         Quarry tuning

-         Develop , maintain and deploy packages(for ETL dev)

-         Develop , maintain and deploy Cubes and dimension (for Analyst)

-         Develop , maintain and deploy Reports( for Reporter)

 

I would suggest you go for reporting. Its best way to start of SQL developer. And job market for Report developer is really good.

 

So all the best….

 


 
Posted on 05-21-08 1:52 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

साथीहरु प्रती घण्टा कती पाउनु हुन्छ SQL सर्भरको जागिरमा? म आहेले प्रती घण्टा $३५.00  मा काम गर्दै छु। आहेले बजार तेती राम्रो छैन। तीन बर्ष अगाडि मैले $४५.00 पाएको थिए। 
.....................................................................................

सुमन अनवर सुमन


 
Posted on 05-21-08 2:05 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

suman, are you sure are you working on $35? If you are a DBA(Production Support) this is way too less. I do not want to say how much i get but the billing rate for the DBAs (SQL or Oracle or Sybase), should be more than $70 ( at least 70). Market is good as far as i know.

Any way good luck and if you guys want to know each other, contact me in here in Sajha and we will do formal chinjan.

Life is SQLized dudes....


 
Posted on 05-21-08 2:16 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

if you going thro dhoti consultancy ur range will be $30-40 without realtime experiance but if you find by urself ur range will be $60-80depending upon ur experiance...

 


 
Posted on 05-21-08 2:44 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

SQL Server Release History
Version Year Release Name Codename
4.21
(WinNT)
1993 SQL Server 4.21 -
6.0 1995 SQL Server 6.0 SQL95
6.5 1996 SQL Server 6.5 Hydra
7.0 1999 SQL Server 7.0 Sphinx
- 1999 SQL Server 7.0
OLAP Tools
Plato
8.0 2000 SQL Server 2000 Shiloh
8.0 2003 SQL Server 2000
64-bit Edition
Liberty
9.0 2005 SQL Server 2005 Yukon
10.0 2008? SQL Server 2008 Katmai

सुमन अनवर सुमन

Last edited: 21-May-08 02:58 PM
Last edited: 03-Jun-08 01:51 PM
Last edited: 03-Jun-08 01:58 PM

 
Posted on 06-01-08 5:47 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

launa malai ta install garna nai aayana ki kya ho. i am trying to install sql server 2005 express and i think i almost installed it but could not be able to see the sql window.

 

once i installed, i click start-sql server 2005-configuration too- sql server configuration manager

aba k garne.

Last edited: 01-Jun-08 05:51 PM

 
Posted on 06-01-08 8:03 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Hi rawbee and acbel44,

Thanks for the tips. I am gonna learn now seriously..

 


 
Posted on 11-13-08 11:21 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

lets start sharing your porblem and tricks in SQL once again.....common sajha guys

check out some of my collection articles and tricks

http://rawbeez.livejournal.com/


 
Posted on 11-13-08 11:47 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Category :Problem

 

I'm getting "No more data to read from socket" error. It happens on only one DB server. Tried the same on other servers..takes time, but atleast returns data.

Previously, we had to reboot the server and it worked fine for sometime, but now even if we reboot it, no use.

Any idea?

Oh yeah, its Oracle.


 
Posted on 11-13-08 12:30 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

guys any Oracle exports??? pls help prankster
 



PAGE: <<  1 2  
Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 200 days
Recommended Popular Threads Controvertial Threads
TPS Re-registration case still pending ..
Anybody gotten the TPS EAD extension alert notice (i797) thing? online or via post?
TPS EAD auto extended to June 2025 or just TPS?
Those who are in TPS, what’s your backup plan?
I hope all the fake Nepali refugee get deported
Toilet paper or water?
ढ्याउ गर्दा दसैँको खसी गनाउच
Mamta kafle bhatt is still missing
ChatSansar.com Naya Nepal Chat
whats wrong living with your parents ?
TPS advance parole Travel document i-131, Class of Admission ?
Tourist Visa - Seeking Suggestions and Guidance
Now Trump is a convicted criminal .
MAGA #FAFO
Ajay Kumar Dev sentenced to 378 yrs
Biden said he will issue new Employment visa for someone with college degree and job offers
Why Americans reverse park?
Problems of Nepalese students in US
Nepali Passport Renewal
Biden out, Trump next president, so what’s gonna happen to TPS, termination?
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters