BookmarkSubscribeRSS Feed
dearshukla
Calcite | Level 5

Dear All,

I want to create report which has booking and payment details within a time period. I have import tables supplier master, booking master & payment master in LASR lib. Now tell me how can I write custom query to pass date range for booking and payment and how I can use its output for designing a report. 

8 REPLIES 8
RW9
Diamond | Level 26 RW9
Diamond | Level 26

This is not a contract work site, just a Q&A board.  If you have specific questions, please post them, showing test data, what you want out, hat you have tried etc.

To learn things, there are many resources out on the web, there is the SAS videos:

http://video.sas.com/

For SQL:

https://www.w3schools.com/sql/

 

As for designing a report I thought VA was made to make it as simple as possible to create reports?

dearshukla
Calcite | Level 5
Hi,
I don't want to show any test data also not want to learn SQL. I have sql query near by 102 lines which give me, my required data.
Is it possible to write same query in SAS? I have already imported all related tables in LASR Library.
LinusH
Tourmaline | Level 20
If that query is from Data Builder it's already executing in "SAS".
But why don't you just try?
Data never sleeps
dearshukla
Calcite | Level 5

hi,

Presently I am doing same. 

First I am creating & executing view query and saving result as a data table.

I have also tried to unlock the code and tried to write sql query but I didn't get success.  

Is there any other way to write sql query for data.

SASKiwi
PROC Star

The usual way to prepare data for SAS VA is to do it in traditional SAS outside of VA. There you can write any SQL or SAS code.

 

One way to define a date range would be to create a SAS table containing the dates you want. You then load that into LASR and use it to populate filters, sliders etc. Another way is to create a calculated item inside VA when you a building a report.

 

 

LinusH
Tourmaline | Level 20
Ah the objects within VA doesn't generate any SAS code, hence you cannot insert your own query.
As stated, SQL is used to prepare data for VA/LASR. Not in LSR/VA.
Data never sleeps
dearshukla
Calcite | Level 5

How can I use SQL to query for data preparation? When we use design then SAS generate code automatically. But for manual query there is no option to doing this. Is any there any way to prepare data by manual query?

SASKiwi
PROC Star

SAS Studio is the interface you can use in SAS VA to write SQL code as well as traditional SAS code. It comes as standard with SAS VA. You can also use SAS Enterprise Guide if that is available to you.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 8 replies
  • 1786 views
  • 0 likes
  • 4 in conversation