AUX URL's

Hello,

Does anyone know off-hand what the SQL script to run all of the AUX Performance URL's for one Season is?  

We have roughly 140 Classes (AUX Performances) for one Semester (Season) and I need to run a script that will capture all of the individual:

 /auxiliary/Reserve.aspx?p=### URL's

Corresponding Performance ID's

Corresponding Peformance Names

at once so I can export them, but I can't remember what it is.

Thanks!

  • Just select all the of the aux performance numbers a append it the string using season number and anything else you need to filter in the where clause.

    example:

    select

    Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

    'http://patrons.imaginationstage.org/auxiliary/Reserve.aspx?p='+perf_no as AUX_URL

    from t_perf

    where season_no =  ####--some number

     

  •  

    DECLARE @season_id int = <season_id>;
    SELECT
    	'/auxiliary/Reserve.aspx?p=' + CONVERT(varchar,p.perf_no) as URL_str,
    	p.perf_no,
    	i.description	
    	FROM T_PERF p
    	JOIN V_INV_TKW_LIST ik ON p.perf_no = ik.perf_no
    	JOIN TR_TKW k ON ik.tkw = k.id
    	JOIN TR_TKW_CATEGORY kc ON k.category = kc.id
    	JOIN LTR_TN_EXPRESS_WEB_DEFAULTS wd ON kc.id = wd.AUX_TKW_Category_ID
    	JOIN T_PROD_SEASON ps ON p.prod_season_no = ps.prod_season_no
    	LEFT JOIN T_INVENTORY i ON p.perf_no = i.inv_no
    	WHERE ps.season = @season_id
    	ORDER BY p.perf_no ASC;

     

    Edit: had to make it the -slightest- bit more technically correct :-)



    [edited by: Nick Reilingh at 11:53 AM (GMT -6) on 16 Nov 2015]
  • That was quick - thank you both!