[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

SQL

SQL (Structured Query Language) is designed to be used in conjunction with relational database products as of a means of working with sets of data. SQL consists of data definition, data manipulation, and procedural elements. Its scope includes data insert, query, update and delete, schema creation and modification, and data access control.

Share tech news, updates, or what's on your mind.

Sign up to Post

Write a query to get CustNo, VisitDate, NumberOfDaysFromFirstVisit
0
KuppingerCole Reviews AlgoSec in Executive Report
KuppingerCole Reviews AlgoSec in Executive Report

Leading analyst firm, KuppingerCole reviews AlgoSec's Security Policy Management Solution, and the security challenges faced by companies today in their Executive View report.

Is it possible to take back up automatically everyday using SQL Server workbench?
0
LVL 55

Expert Comment

by:Mark Wills
I think you should be Asking a Question (and not a Post) : https://www.experts-exchange.com/askQuestion.jsp

And when asking, please clarify if MySQL (has workbench)  or MS SQL Server  (has Management Studio SSMS)

Cheers,
Mark Wills
Topic Advisor
0

Author Comment

by:Varun Walia
Work bench
0
If I want to pursue a career as a Data Analyst and I have limited data analysis skills in addition to SQL, Python, HTML, CSS and Microsoft Office Suite experience, are there any certifications I could take to bolster my credentials as a Data Analyst?
1
I'm using VS2010 with SQL Server back end and would now like to start using Data Source to connect rather then coding in appconfig. Can you refer me to an example please.
0
LVL 17

Expert Comment

by:Dustin Saunders
Frank,

Looks like you made this a post rather than a question.  You may want to open up a new Question to attract answers to your query.
0

Author Comment

by:Frank De Carpenter
Sorry about this Dustin. I will change it a question. Thanks
0
I have a request of how to write a Execute SQL task in SSIS.   More of a fail safe for when a vendor's file does not make it to our system.    This is causing the below issue.

I have a SQL job that pulls using a WINSCP Windows task script to retrieve the latest CSV file from a SFTP site.   Then the SQL job Step 2 sends the file to the SSIS package for loading into SQL.   The problem occurs when the SFTP site does not receive a new file.  
Step 1 does not fail because it successfully retrieved the latest file, however, Step 2 using the package fails because the file that was pulled already exists from the previous pull.   I need a way to check in the SSIS package to see if the dynamic named CSV file exists before processing.    I am very green to writing variables and I have never used the Script task command.  Is there a way to do this check before my package kicks off the For each file task by using the Execute SQL task  ?    

As a side note, I do not have permissions to delete older files off of the SFTP site.    And, even though the SQL Job Step 2 says it failed, it still executes the CSV file so now I have duplicate records for the same day.

Please advise exact steps as I am a beginner.

0

Author Comment

by:JOELL MERRITT
Oh ok !   Sorry!  :)
0
LVL 27

Expert Comment

by:Brian B
0
sql query
i have a table which has got market name, balance and datediff shows how many day between getdate() - invoice date
select market,convert(varchar,convert(money,sum(balance),1)) as [AR Receivables] from #arreceivables group by market order by market

i am trying to get like eg: market name total balance between 0 -30 days 30 -60 days, 60 -90 days and 90 + days.

Can someone help me with the query please
0
LVL 27

Expert Comment

by:Brian B
You have entered this as a post, but it looks like you are asking for help. To get the best response from the Experts, you should probably re-submit this as a question using the "ask a question" button at the top of the page, or this link: https://www.experts-exchange.com/askQuestion.jsp

If you do ask a question, please post the link to it back here so others can find your question and help you more quickly.

Please see here for further details: http://support.experts-exchange.com/customer/portal/articles/756544-how-to-succeed-at-ee-as-an-asker
0
This is a basic sp but it returns a 1 properly but will not return anything when the statement is true. I'm sure my null trapping is not correct. Also not sure I dealt with the output parameter correctly in terms of how I set it equal to the case statement.
@pi_enterprise_id  CHAR(5),
@pi_practice_id  CHAR(4),
@txt_pregnum            INT,
@problem                  VARCHAR (150),
@pi_cur_person_id  UNIQUEIDENTIFIER,
@datefield            VARCHAR(10) OUTPUT
)
AS

select  @datefield = (CASE WHEN (datefield is null or datefield = '') then '2'
ELSE '1'
END)
from ob_problem_list_
where person_id = @pi_cur_person_id
and pregnum = @txt_pregnum
and problem = @problem
and cpsp_problem_indicator = 'Y'

0
Want to build powerful, database-driven websites? You can learn how in the November Course of the Month, with a focus on PHP, MySQL, and CakePHP MVC framework.
0
Hi! To avoid going via a OS file, I want to write my Oracle script's output directly to the OLEDBDATAAdapter system.data.datatable from Oracle OraOLEDB.Oracle.

When I send a regular SELECT...someting, it is returned fine. However, I need to do some additional tweaking after that, so I am using a procedure and some additional code in SQL to achieve this. Creating an OS-file and send the result out there, works fine. But rather than doing that, it would be much more convenient and secure to do it directly into the system.data.datatable of OLEDBDATAAdapter.

Can anyone give any advice as how to achieve this? As you probably understand, this isn't my main area of expertise :-)

Thanks for any help!

Brgds
IVer in Oslo
0
LVL 65

Expert Comment

by:☠ MASQ ☠
Iver, use this link and ask a question of our Oracle experts
https://www.experts-exchange.com/askQuestion.jsp
0
0
Powerful Yet Easy-to-Use Network Monitoring
Powerful Yet Easy-to-Use Network Monitoring

Identify excessive bandwidth utilization or unexpected application traffic with SolarWinds Bandwidth Analyzer Pack.

I seem to recall that it is possible to get instant help from an expert via Experts Exchange.  Is that still the case?  What I need is MSAccess VBA and SQL.
0
LVL 22

Expert Comment

by:David Atkin
1
LVL 19

Expert Comment

by:Kyle Santos
Hi Biggles1,

You are correct and the two comments above mine are where you would need to go and create a new request to get 1:1 help.  =)
0
Your access to October’s Course of the Month expires today! Enroll now and begin adding Microsoft SQL to your professional skills.
0
v2-native-ad-no-button.pngOnly five days left to enroll in October’s Course of the Month! Once you enroll, you’ll have 30 days to complete the Microsoft SQL Server and Database Concepts course.
0
I am trying to do a nested if statement in Crystal Reports.
I have 3 company names based on a company id, so if id=1 then "company A" if id=2 then "company B" else "company C" but I can't get it to work, I get an error when saving the formula that "The remaining text does not appear to be part of the formula" and it highlights everything after my first variable. Can anyone show me the proper syntax for this formula. I am completely new to sql
0
LVL 102

Expert Comment

by:mlmcc
You should really ask this as a question
https://www.experts-exchange.com/askQuestion.jsp

If  test then result
ELSE if test then result
Else result
mlmcc
0
native-ad-no-button.pngThe end of October is approaching and you only have nine days left to enroll in our Microsoft SQL Server and Database Concepts course. Enroll today and take advantage of this complimentary Course of the Month training.
4
Have you enrolled in this month’s complimentary course? Enroll now for a free Microsoft SQL Server and Database Concepts course. Get 7+ hours of step-by-step SQL training, including possible topic interview questions.
0
I've a stored procedure SP1 built. It has 8 columns n 6 rows. I also created a table T1 with exact 8 columns as SP1 and this table is empty. How do I insert 6 rows from SP1 into T1? Does the insert statement need to be inside the stored proc SP1 or can be it a separate query?
0
LVL 129

Expert Comment

by:Andrew Hancock (VMware vExpert / EE MVE^2)
You may want to post this Question, in the Microsoft SQL Server, SQL, Query Syntax topic areas, to get an Answer.
0

Author Comment

by:LION KING
Thank you Andrew.
0
How to create a 4 quarter rolling calendar / period in sql server? For instance, if Table A as a date field - DATE1.
0
v2-native-ad-no-button.pngDo you work with and analyze data? Enroll in October’s Course of the Month to get step-by-step SQL training. Learn SQL to quickly and efficiently store and retrieve data!
0
Become an IT Security Management Expert
Become an IT Security Management Expert

In today’s fast-paced, digitally transformed world of business, the need to protect network data and ensure cloud privacy has never been greater. With a B.S. in Network Operations and Security, you can get the credentials it takes to become an IT security management expert.

native-ad-no-button.pngOctober’s Course of the Month is available! Enroll today to get 7+ hours of step-by-step Microsoft SQL Server training.
4
hi i  have 3 tables in sql server and i want to save all 3 table data into one new table WIN_20170930_221232.JPG
any help me?
0
LVL 61

Expert Comment

by:Kevin Cross
You should post this as a Question and it will draw in Experts within the areas you designate.  It looks like you will want to ask about how to JOIN data.  Good luck!

Ref: http://support.experts-exchange.com/customer/portal/articles/756544-how-to-succeed-at-ee-as-an-asker
0
LVL 61

Expert Comment

by:Kevin Cross
Welcome to Experts Exchange by the way!
0
2
Modified all long running SQL Agent jobs so that the end-of-process email notification also plays Boyz II Men's 'End of the Road'.   Management approved this and also proposed Johnny Cash 'Ring of Fire' for error notifications.
4
LVL 19

Expert Comment

by:Kyle Santos
Endorsed for the band ref.
0
A technology that is kind of a fad,but will probably last but be not as popular are the no sql databases. They have there place for certain applications, but I don't believe they will replace SQL databases. Having to know how you are going to query before you store your data is just not realistic.  
3
We had a partner replace a drive on the database server, when he resorted the database(s) on Friday all are now in SUSPECT mode and are inaccessible. We are not dba's and need help can anyone please help.  Sql 2012 r2.

Thank you
SORRY I posted this in the incorrect place I will not do this again
0
LVL 18

Expert Comment

by:Alex Green
1
LVL 21

Administrative Comment

by:Andrew Leniart
Hi Steven,

What you have done is made a "Post" here.

To get expert help, you need to "Ask a Question" so that more experts are able to see that you need help. Click the Big blue button near the top of your screen.

Ask-a-Question.png

The following link also explains more about asking for help at Experts Exchange..
http://support.experts-exchange.com/customer/portal/articles/336330

Regards,
Andrew
EE Topic Advisor
1

SQL

SQL (Structured Query Language) is designed to be used in conjunction with relational database products as of a means of working with sets of data. SQL consists of data definition, data manipulation, and procedural elements. Its scope includes data insert, query, update and delete, schema creation and modification, and data access control.